Learn about webhook and API triggers here in this article.
This article covers the following topics:
What are Triggers?
Triggers represent significant events that initiate a Flow. Each trigger operates in real-time, ensuring that data is transmitted as the event takes place.
Triggers serve as the foundational step in a Flow scenario.
Types of Triggers
Webhook Triggers
Upon initiating the Flow, it enters a waiting state for a specific HTTP request directed to a designated URL. Each trigger is equipped with its own internal filter, which identifies the conditions under which a request will activate the corresponding trigger.
For example, consider a trigger named "New Deal"; the automation process will commence only when a request containing the "New Deal" indication is sent to the webhook's URL. Additionally, this trigger can issue further requests to the API to retrieve more comprehensive data.
The Flow scenario is activated as soon as the request is received.
Note: In instances where multiple webhook requests arrive simultaneously, they are processed sequentially in the order of their arrival.
API Triggers
This trigger type interacts with the system's API to check for new or modified entities. Typically, it looks for data from the past hour, although it can extend its search window if needed.
By default, the trigger operates on a one-minute schedule.
When the trigger is activated, it requests data for the following hour and receives a data array in response. Each entity within this array is treated individually. For instance, if the trigger identifies five "Deals", it will execute the Flow action five times. The Flow retains a record of the IDs for the entities it processes.
Therefore, if the same IDs appear in a subsequent query, the scenario will not be executed again. If the trigger is set to monitor changes, it also tracks the date of modification for each entity.
If an ID is received again, but the date of change differs, the Flow scenario will be triggered again for that entity.
If there is no new data available, the Flow's log will indicate "No data." Additionally, errors may arise due to credential issues or difficulties in connecting to a third-party server. In such cases, the third-party system will return an error message.
Scheduled Triggers
Another powerful trigger is the Scheduled Trigger. This allows you to configure a flow to run automatically on a customized schedule. With this trigger, you can set specific dates, times, and recurring intervals to ensure your flow executes exactly when needed—whether that’s every 10 minutes, every hour, daily, weekly, monthly, or at another frequency. This feature is perfect for automating routine tasks, keeping data up-to-date, or triggering actions at consistent times without manual intervention.
To start your flow on a custom schedule, simply search "Scheduled Trigger" in the app/connector dropdown in the first step of your flow
Then customize the days and time windows and update-intervals you want the flow to run on
Below are example use-cases to help you see how Scheduled Triggers can hel your team:
- Data Cleanup: Schedule a flow to archive or delete outdated records from your database every month.
- Report Generation: Every Monday at 9:00 AM, send an email and slack message to your team with a URL to a knack page of charts/reports containing last weeks sales figures
- Appointment Reminders: Set up daily triggers to send reminders to customers about their scheduled appointments the next day.
- Inventory Syncing: Run a flow nightly to take the inventory level figure from the source-of-truth system, and then update inventory levels in multiple other downstream systems.
- Task Notifications: Schedule daily or weekly notifications to assign and remind team members of pending tasks.
Troubleshooting Triggers
- To modify the connection settings, you must first pause the Flow. Similarly, if you need to edit the Field Settings to map your fields, please ensure the Flow is paused as well.
- The Flow's Log history serves as an invaluable resource for diagnosing and understanding any issues that may occur within your Flow.