The Poller trigger periodically checks the data source for updates. After you configure it, Poller checks for new data periodically using the polling URL of a data source. The Poller is ideal for use cases where real-time updates are unavailable or when the frequency of updates is low.

Overview

The Poller operates on the concept of polling, where the trigger periodically sends requests to the polling URL for new data. You can configure the Poller to receive the incoming event notifications and start the subsequent automation based on the notification. The poller URL of the application serves as the endpoint that the trigger polls for new events.

You can configure the Poller for a GET call or POST call. You must add the header parameter, query parameter, context management details, and JSON filter when configuring Poller. The POST option includes a provision to add a request body. You can use this option to send data to the poller URL that requires additional data for the events.

Settings

The following settings are available in Listener trigger:

Settings panel of Poller

Name
Specify a name for the Poller
Polling URL
Specify the polling URL of the application.
Request type
Select the API request type. Poller supports GET and POST methods.
  • GET - You can use the GET method to fetch the event details.
  • POST - You can use the POST method to limit the response data. The POST method has a provision to add a request body. This option acts as a filter to limit the response data.
Request body
Enter the request body for the POST method. You can add the request body in formats such as TXT, JSON, XML, and HTML.
Polling interval
Set the frequency for polling the URL for new information. You can set the interval in Minutes, Hour, or Day. The minimum limit for the interval is 5 minutes.
Authentication Mode
Specify the authentication mode for the trigger. You can choose No Authentication or OAuth2 - Control Room managed.
Connection
Use the Pick button to choose an existing OAuth connection as the authentication mode. Ensure that the connection is set up and active.
Add Header
Specify the header parameters that are applicable for the polling request. You can add authentication headers and other unique parameters that must be included in the request header.
Enable the Add Header check box and click Add header to open the Item modal. Specify the header parameter name and values in the Item modal.
Add Query parameter
Specify the query parameters that are applicable for the polling request. Enable the check box and click Add header to open the Item modal.
Enable the Add Query parameter check box and click Add query to open the Item modal. Specify the query parameter name and values in the Item modal.
Context management
Define the context management for any dynamic parameters. The trigger uses context as a polling checkpoint to ensure that it fetches the information updated after the last checkpoint. You can define context management for polling URLs, header and query parameters. Define the parameter as a string and use that string to define the context.
For example, the Gmail API for polling uses the history ID of an email to determine the changes in the mailbox. When you configure a Poller trigger for the Gmail inbox, you can define the history ID in either the polling URL as https://gmail.googleapis.com/gmail/v1/users/me/history?startHistoryId={{historyID}} or add a query parameter with key startHistoryId and value historyID. You can then configure the context for the history ID with the history ID of the last email that the inbox received as the checkpoint for polling. You must also add the JSON node where the history ID is captured in the response payload in Update context field. This ensures that the trigger picks the ID of the last received email as the starting history ID every time the trigger is run.
Enable the Context management check box and click Add context to open the Item modal. Specify the context key and values in the Item modal. You can select one of the following as the condition to update context:
  • Json expression: Select this option to set a JSON node of the response payload as the context.
  • Current timestamp (Unix): Select this option to set the Unix epoch timestamp of the query parameter as the context.
  • Current timestamp (ISO 8601): Select this option to set the ISO 8601 timestamp of the query parameter as the context.
Json filter
Specify a filter for response data. This setting allows you to filter the data as per your requirements. For example, if the JSON data contains records with multiple lengths such as 1, 5, 10, 25, and 30, you can define the JSON filter to as record.length>10, this filter discards the records with a length less than 10.
Response
Select a record variable to save the trigger response data. The automation saves the trigger response data in a key-value pair format. After you execute the bot, go to the Audit log page and select the Bot run by trigger event to view the response data.