Creating a GraphQL polling trigger for the Zapier integration
At times, Brightspot may not have a topic type for the scenario in which you want Brightspot to initiate a Zapier zap (for example, you have a task that creates a record in the database each time it runs, and you do not have an associated topic type for this record). In these scenarios, you can use a polling trigger to notify Zapier about the new record.
Polling triggers periodically check for updates or changes in data at specified intervals. They serve as a way for Zapier to ask Brightspot if new data of a certain type exists at a certain interval. In this case, GraphQL polling triggers require that a GraphQL query returns data in chronological order and with a unique ID so that Zapier knows that it is a new record.
To create a GraphQL polling trigger for the Zapier integration:
- Click > Admin > Zapier.
- From the Create list, select GraphQL Polling Trigger, then click New.
- Enter an internal name for this asset. Brightspot uses this name internally, such as in the search panel and recent activity widget. This name is not visible to visitors to your site.
- In the Description field, enter a description about what this polling trigger achieves.
- In the Zapier Label field, enter a value that will appear when creating actions in Zapier. Use something short but descriptive of the what the query achieves (for example,
Publish New Article
). - Under Endpoint, select the GraphQL API endpoint you added that you associated to the API client. For details, see Adding Zapier endpoints for the Zapier integration.
- Under Query, enter the desired query. Brightspot recommends using the GraphQL explorer to more easily build the query from the schema.NoteTo use the GraphQL explorer, you must have the developer permission
HTML Toggle
. - Under Results Path, enter the appropriate keys to flatten the response so that it is at the root level. A raw response causes the polling trigger to fail.
- Click Publish.