Custom Webhooks: Automatic Triggers
In Fastn, webhooks enable event-driven automation, so your workflows respond instantly to external changes without the need for constant checking or manual input.
Last updated
In Fastn, webhooks enable event-driven automation, so your workflows respond instantly to external changes without the need for constant checking or manual input.
Last updated
Webhooks are a way for applications to communicate with each other in real time. When something happens in one system—like a new order being placed or a form being submitted—it can send a message, known as a webhook event, to Fastn. This message can then automatically trigger a flow you've set up.
You can create a custom webhook tailored to your use case by following these steps:
From the left side menu navigate to the Webhook page and then click on Add Webhook.
Enter a descriptive name for your webhook
Dead Letter Queue : Enable the dead letter queue settings if necessary. Dead letter queues store messages that cannot be delivered, providing a safety net for your webhook.
Select an Event Model : These models can be selected to apply to incoming input events.
Webhook ID : If desired, enter a unique identifier as the webhook ID. This step is optional and can be used for additional customization or tracking purposes.
Register : Finally, click on button to complete the webhook registration process.
Routes give users a webhook url which can be tied to a route. A configured route will run its assigned flow every time the webhook url is triggered externally.
After registering your webhook, configure routes to specify how the incoming data should be processed.
To add a route, click on "Add Route".
Provide a name for the route to identify it later
Select the destination API where you want to add the route .
Add Pattern Filters : Pattern filters are criteria or conditions applied to incoming data to selectively process or route specific events based on defined patterns.
To add Pattern Filters, follow the steps below:
Click on the Pattern Filters section.
Add the key that you want,for example type .
Choose the operator that you want, for example Equals .
Add the value that you want, for example,user .
Add Headers : After defining the criteria for processing data using patterns and filters, you have the option to further customize the outgoing HTTP request by adding headers. Headers provide additional instructions and details to the destination where the webhook payload is sent.
To add Headers, follow the steps below:
Click on Add in Headers section.
Add the key that you want, for example , Content-Type .
Add the value that you want, for example, application/json
Add the value that you want, for example, user
Batch Window: Use this to define the size of a batch to be processed
Add Description : Once you have added headers for your webhook route, it's beneficial to add descriptions to provide additional context and understanding of the specific route. Enter a brief and informative description that highlights the purpose or functionality of this particular route.
Click on Configure to save your route settings, and then click on Next.
After registering and configuring routes for your webhook on fastn.ai, you have the option to set up triggers for your webhook.
Triggers can be configured for auto-triggering the webhook and its configured workflow based on a schedule.
Follow these steps to set up the trigger for your webhook:
Click on the "Enable Schedule" toggle to activate the scheduling feature .
Choose between two scheduling options: Time or Rate depending on your requirements.
Choose the destination API: where the webhook payload will be sent.
Click on the Save button : to confirm your trigger.