Skip to main content
Granola sends a webhook when the AI summary for a meeting note is ready. Point it at a Trigger.dev hosted endpoint, and every new note starts a run: the run fetches the transcript with Granola’s API and hands it to an agent. This guide shows the key parts: receiving the webhook, fetching the note, and running the agent.

What you need

  • A Trigger.dev project
  • A Granola account on a Business or Enterprise plan, which webhooks and API keys need, and a Granola API key (grn_...)
  • An API key for your model (the example below uses the Vercel AI Gateway)

How it fits together

When a note's AI summary is ready, Granola sends a note.generated webhook to the Trigger.dev agent. The agent fetches the note and its transcript with Granola's Get Note API.
  1. Granola sends a note.generated webhook when a note’s first AI summary is ready.
  2. Each note starts one run of the agent.
  3. The run fetches the note and transcript, and the agent works on it.

1. Receive new notes as a webhook

Define a hosted endpoint for Granola. It checks the Standard Webhooks signature on every request before your code runs. The webhook payload has the note’s ID, but not its content:
src/trigger/granola.ts
Run npx trigger.dev@latest dev and copy the endpoint’s URL from the Webhooks page. In Granola, open Settings > Connectors > Webhooks, set up a webhook with that URL and the note.generated event: Granola's webhook setup dialog, asking for the destination URL Granola shows the signing secret (whsec_...) once, so set it on the endpoint straight away:

2. Start one run per note

Subscribe a handler that only accepts note.generated and triggers the agent task. Use the note ID as a global idempotency key, so a retried delivery doesn’t start a second run for the same note. Granola retries failed deliveries for up to four days, and idempotency keys last 30 days by default:
src/trigger/granola.ts
Other events, such as note.edited, show up as FILTERED on the endpoint’s Deliveries tab.

3. Fetch the note and its transcript

Call Granola’s Get Note API with include=transcript. Each transcript entry has a speaker.source: microphone is you, speaker is everyone else:
src/trigger/granola.ts
Set GRANOLA_API_KEY in your .env file for dev, and in the dashboard’s environment variables for production.

4. Run the agent

The task fetches the note and hands the transcript to a model with the AI SDK. Give the agent whatever tools it needs:
src/trigger/granola.ts
The transcript is what people said in your meeting. Treat it as data in the system prompt, and give the agent read-only tools.
To test without a meeting, trigger note-agent from the dashboard’s Test page with the ID of a note you can read (not_...). The next time a meeting’s summary is ready, the run starts on its own.

Next steps

  • Granola webhooks: verification and setup
  • Webhook filters: run a subscriber only for some events
  • Idempotency: keep a retried webhook from starting a second run
  • Granola API: the note’s fields, including summary_markdown and attendees
  • To deploy, run npx trigger.dev@latest deploy, set GRANOLA_API_KEY in production, add a second Granola webhook for the production endpoint’s URL, and set that webhook’s signing secret with npx trigger.dev@latest webhooks set-secret granola --env prod