Skip to main content
Triggers (also called sources) are different from actions - they are not invoked directly by end users, but rather by events that happen on a third-party service. For example, the “New File” source for Google Drive will be triggered every time a new file is created in a specific folder in Google Drive, then will emit an event for you to consume. All this means is that actions can be invoked manually on demand, while sources are instead deployed and run automatically when the event they are listening for occurs.

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

Setting the polling interval

Some app-based triggers poll for new events rather than using webhooks. For these polling-based triggers, you can configure how frequently the trigger checks for new events by setting the intervalSeconds property in the timer configuration. The polling interval is defined in the configuredProps when deploying a trigger:
TypeScript

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
To avoid emitting historical events on deploy, set emit_on_deploy to false when deploying the trigger

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:
Deploy a source for your users:
If the source deployment succeeds, the response will contain the information regarding the state of the source, including all the component’s props metadata, as well as their values. It will also contain its name, creation date, owner, and most importantly its unique ID, which can be used to manage the source in the future (e.g. delete it). The response for the request above would look like this:
In the example above, the source ID is 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 seconds
  • cron: Define a custom cron schedule and optionally define the timezone. For example:

Example response

New emails received

Generate a unique email address for your customers to emit events to

Example response

Webhook signatures

When Pipedream delivers events to your webhook_url, each request includes an x-pd-signature header you can use to verify the request is authentic. See Webhook signatures for setup and validation details.