Apify Trigger

Start the workflow when a run of an Apify Actor or task ends.

v1.1.0Source

Install

Run Apify Actors and tasks, get runs, dataset items, and key-value store records, fetch web pages, and start a workflow when a run of an Actor or task ends. Use it for web scraping and data extraction.

Apify@zerodot/apifyInstall
  1. Open System, then Nodes.
  2. Find Apify and click Install.
  3. Use the new nodes at once. You do not restart.

How it works

Apify Trigger (trigger.apify) is a trigger node in the Apify package (@zerodot/apify): Start the workflow when a run of an Apify Actor or task ends.

Starts a run when a run of an Actor or a task ends. Set Resource to Watch (Actor or Task), the Actor or the Saved Tasks Name or ID, and the Event Type:

  • Succeeded (default), Failed, Timed Out, Aborted
  • Any: all four events

When the workflow is published, the trigger makes the webhook at Apify (POST /v2/webhooks) with the Actor or task as the condition. When the workflow stops, the trigger removes the webhook. You do not set anything in Apify Console. The address of the trigger must be reachable from the internet.

The output is the body that Apify sends: { userId, createdAt, eventType, eventData, resource }. resource is the run. The trigger ignores an event that you did not select.

Apify has no signature for webhooks. The address of the trigger has a secret token, so keep the address private.

Logins it can use

  • Apify API key (apify.apiKey): apiKey is an API token from Apify Console > Settings > API & Integrations. The token is secret. The Test button calls GET /v2/users/me.
  • Apify OAuth2 (apify.oauth2): sign in with an Apify account (authorization code with PKCE, scopes profile and full_api_access). It needs the clientId of an OAuth app. zerodot keeps and refreshes the tokens.

Guides and related hubs