AI agents with Firecrawl webhooks

Receive Firecrawl webhooks on Trigger.dev and use them to start, resume or message your AI agents.

Get started now

What you can do with Firecrawl webhooks

Start an agent

Firecrawl events can start a new agent run. For example, an agent that works through a Firecrawl crawl when it finishes.

Resume an agent

An agent can pause until the Firecrawl event it needs arrives, for up to 90 days, and costs nothing while it waits.

Message an agent

Firecrawl events can land in a running agent's conversation, so it acts on them with full context.

Events you can receive from Firecrawl

Some of the events Firecrawl sends. Your agent can filter on any of them.

crawl.started

Crawl started

crawl.page

Crawl page scraped

crawl.completed

Crawl completed

batch_scrape.page

Batch scrape page scraped

extract.completed

Extract completed

agent.failed

Agent failed

Example

An agent that works through a Firecrawl crawl when it finishes

import { webhook, webhooks } from "@trigger.dev/sdk";
export const firecrawl = webhooks.endpoint.define({
id: "firecrawl",
source: webhooks.firecrawl(),
});
export const firecrawlEvents = webhook({
id: "firecrawl-events",
endpoint: firecrawl,
filter: "event.type == 'crawl.completed'",
onEvent: async ({ event }) => {
// Start, resume or message your agent with the event
console.log(event);
},
});

Handled for you

Verified for you

webhooks.firecrawl() checks the X-Firecrawl-Signature header on every request. Bad requests are rejected before anything runs.

Retries don't run twice

Retries are matched on event.webhookId, so a retried webhook doesn't start a second run.

Filter before anything runs

Only the Firecrawl events you care about start a run. Filtered webhooks use no compute.

See every delivery

Every webhook is recorded with its payload, headers and the agents it reached, so you can debug it and replay it.

Get started

  1. 1

    Set up the agent

    Copy the starter prompt into your coding agent, like Claude Code, Cursor or Codex. It creates a Trigger.dev project and adds the webhook endpoint. Prefer to write it yourself? Start from the example above.

  2. 2

    Add the webhook in Firecrawl

    Deploy your project, or run trigger dev, and the endpoint appears on the Webhooks page of the Trigger.dev dashboard with its URL. Add that URL in Firecrawl's webhook settings and pick the events you need. The endpoint's Copy setup prompt button gives your coding agent the exact steps.

  3. 3

    Add Firecrawl's webhook secret

    Copy the webhook secret from Firecrawl. Then on the endpoint's page in the Trigger.dev dashboard, choose Set signing secret and paste it in, so Trigger.dev can check every request really came from Firecrawl.

  4. 4

    Try it

    Send a test event from Firecrawl, or use the endpoint's Test tab. It appears on the endpoint's Deliveries tab, with the agents it reached.

Related integrations

Ready to build with Firecrawl webhooks?

Declare an endpoint, deploy, and paste the URL into your provider.

Get started for free