Categories of triggers
These are 2 categories of triggers you can deploy on behalf of your end users:Refer to the full Connect API reference to list, retrieve, delete, and manage triggers for your user.
App-based event sources
- Listen for events that occur in other systems: for example, when a new file is added to Google Drive or when a new contact is created in HubSpot
- Deploying these triggers requires that your customers first connect their account using Pipedream Connect Managed Auth, since the triggers are deployed on their behalf using account
- Refer to the quickstart above to get started
Handling test events
- Many event sources attempt to retrieve a small set of historical events on deploy to provide visibility into the event shape for end users and developers
- Exposing real test events make it easier to consume the event in downstream systems without requiring users to trigger real events (more info)
- However, this results in emitting those events to the listening webhook immediately, which may not always be ideal, depending on your use case
- If you’d like to avoid emitting historical events, you can deploy a trigger without defining a
webhook_url
, then update the listening webhooks for the deployed trigger after roughly a minute
Native triggers
- You can also deploy native triggers, which don’t require any authentication from your end users, so you should skip the account connection process when configuring these triggers
- Because these triggers don’t use a connected account from your end users, APIs to deploy and manage them are slightly different (see below)
Deploying a source
Because sources are exercised by events that happen on a third-party service, their semantics are different from actions. Once a source is configured, it must be deployed to start listening for events. When deploying a source, you can define either a webhook URL or a Pipedream workflow ID to consume those events. Deploying a source is done by sending a payload similar to the one used for running an action, with the addition of the webhook URL or workflow ID. Using the New Issue (Instant) source for Gitlab as an example, the payload would look something like this:dc_dAuGmW7
, which can be used to delete, retrieve, or update the source in the future.
Refer to the full Connect API reference for questions and additional examples.
Native trigger examples
HTTP Webhook
Generate a unique HTTP webhook URL for your end users to configure in any other upstream service.Example response
Schedule
Deploy a timer to act as a cron job that will emit an event on a custom schedule you or your users define.Configured props
cron
(object)
When defining schedules, you can pass one of the following:
intervalSeconds
: Define the frequency in secondscron
: Define a custom cron schedule and optionally define thetimezone
. For example: