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
Was this helpful?
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
Was this helpful?
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 Triggers page and then click on Add Webhook.
Enter a Descriptive Name Provide a clear and meaningful name for your webhook to easily identify it later.
Select an Event Model Choose the event model(s) that should apply to incoming input events for this webhook.
Set a Webhook ID (Optional) Enter a unique identifier for the webhook if you want extra customization or tracking.
Register the Webhook Click the Register button to complete the webhook setup and activate it.
Routes provide you with a webhook URL that can be linked to a specific route. Each time this webhook URL is triggered externally, the route runs its assigned flow automatically.
Once you’ve registered your webhook, you can configure routes to define how incoming data should be processed.
To add a new route, simply click on “Add Route.”
Provide a Name for the Route Give your route a clear, descriptive name to easily identify it later.
Select the Destination API Choose the API endpoint where you want incoming data to be routed.
Add Pattern Filters Pattern filters are conditions applied to incoming data that let you selectively process or route events based on specific criteria.
To configure a Pattern Filter, follow these steps:
Open the Pattern Filters section in your flow or widget settings.
Add a key — this is the parameter you want to filter by (e.g., type
).
Select an operator — such as Equals
, Prefix, or Suffix.
Enter a value — for example, user
.
Add Headers: After setting up patterns and filters to define how data is processed, you can further customize the outgoing HTTP request by adding headers.
Click Add in the Headers section.
Enter the key for the header — for example, Content-Type
.
Enter the value for the header — for example, application/json
.
Add additional headers as needed—for example, a user token or API key.
Batch Window: Define the size of each batch to be processed. This controls how many events are grouped together before processing, optimizing performance and resource usage.
Add Description: After adding headers, it’s helpful to include a description for your webhook route. This provides context and clarifies the purpose or functionality of the route for future reference.
Save and Continue: Click Configure to save your route settings, then click Next to proceed.
Once you’ve registered your webhook and configured its routes on Fastn.ai, you can optionally set up triggers to automate when your webhook and its associated workflows run.
Triggers enable you to schedule automatic executions based on your preferred timing or intervals—no manual intervention needed.
Follow these steps to configure a trigger for your webhook:
Enable Scheduling Click the “Enable Schedule” toggle to activate the scheduling feature.
Select a Scheduling Option Choose between Time-based (specific times/dates) or Rate-based (fixed intervals) scheduling according to your needs.
Choose the Destination API Select the API endpoint where the webhook payload should be sent when triggered.
Save Your Trigger Click Save to confirm and activate your trigger settings.