@trigger.dev/sdk 4.8.5 → 4.8.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commonjs/v3/ai.d.ts +34 -8
- package/dist/commonjs/v3/ai.js +304 -168
- package/dist/commonjs/v3/ai.js.map +1 -1
- package/dist/commonjs/v3/auth.d.ts +4 -4
- package/dist/commonjs/v3/auth.js +21 -75
- package/dist/commonjs/v3/auth.js.map +1 -1
- package/dist/commonjs/v3/chat-client.d.ts +1 -1
- package/dist/commonjs/v3/chat.d.ts +1 -1
- package/dist/commonjs/v3/prompt.js +6 -8
- package/dist/commonjs/v3/prompt.js.map +1 -1
- package/dist/commonjs/v3/runs.d.ts +5 -1
- package/dist/commonjs/v3/runs.js.map +1 -1
- package/dist/commonjs/v3/sessions.js +10 -7
- package/dist/commonjs/v3/sessions.js.map +1 -1
- package/dist/commonjs/v3/shared.d.ts +2 -2
- package/dist/commonjs/v3/shared.js +16 -15
- package/dist/commonjs/v3/shared.js.map +1 -1
- package/dist/commonjs/v3/steeringContext.d.ts +35 -10
- package/dist/commonjs/v3/steeringContext.js +86 -14
- package/dist/commonjs/v3/steeringContext.js.map +1 -1
- package/dist/commonjs/v3/streams.js +10 -8
- package/dist/commonjs/v3/streams.js.map +1 -1
- package/dist/commonjs/v3/tasks.d.ts +2 -2
- package/dist/commonjs/v3/tasks.js.map +1 -1
- package/dist/commonjs/v3/test/mock-chat-agent.js +24 -13
- package/dist/commonjs/v3/test/mock-chat-agent.js.map +1 -1
- package/dist/commonjs/v3/toolOutputJson.d.ts +17 -0
- package/dist/commonjs/v3/toolOutputJson.js +241 -0
- package/dist/commonjs/v3/toolOutputJson.js.map +1 -0
- package/dist/commonjs/v3/webhooks.d.ts +8 -2
- package/dist/commonjs/v3/webhooks.js +20 -11
- package/dist/commonjs/v3/webhooks.js.map +1 -1
- package/dist/commonjs/version.js +1 -1
- package/dist/esm/v3/ai.d.ts +34 -8
- package/dist/esm/v3/ai.js +306 -171
- package/dist/esm/v3/ai.js.map +1 -1
- package/dist/esm/v3/auth.d.ts +4 -4
- package/dist/esm/v3/auth.js +22 -76
- package/dist/esm/v3/auth.js.map +1 -1
- package/dist/esm/v3/chat-client.d.ts +1 -1
- package/dist/esm/v3/chat.d.ts +1 -1
- package/dist/esm/v3/prompt.js +6 -8
- package/dist/esm/v3/prompt.js.map +1 -1
- package/dist/esm/v3/runs.d.ts +5 -1
- package/dist/esm/v3/runs.js.map +1 -1
- package/dist/esm/v3/sessions.js +10 -7
- package/dist/esm/v3/sessions.js.map +1 -1
- package/dist/esm/v3/shared.d.ts +2 -2
- package/dist/esm/v3/shared.js +16 -15
- package/dist/esm/v3/shared.js.map +1 -1
- package/dist/esm/v3/steeringContext.d.ts +35 -10
- package/dist/esm/v3/steeringContext.js +85 -14
- package/dist/esm/v3/steeringContext.js.map +1 -1
- package/dist/esm/v3/streams.js +10 -8
- package/dist/esm/v3/streams.js.map +1 -1
- package/dist/esm/v3/tasks.d.ts +2 -2
- package/dist/esm/v3/tasks.js.map +1 -1
- package/dist/esm/v3/test/mock-chat-agent.js +25 -14
- package/dist/esm/v3/test/mock-chat-agent.js.map +1 -1
- package/dist/esm/v3/toolOutputJson.d.ts +17 -0
- package/dist/esm/v3/toolOutputJson.js +238 -0
- package/dist/esm/v3/toolOutputJson.js.map +1 -0
- package/dist/esm/v3/webhooks.d.ts +8 -2
- package/dist/esm/v3/webhooks.js +20 -11
- package/dist/esm/v3/webhooks.js.map +1 -1
- package/dist/esm/version.js +1 -1
- package/docs/ai/observability.mdx +25 -19
- package/docs/ai/prompts.mdx +25 -19
- package/docs/ai-chat/actions.mdx +1 -1
- package/docs/ai-chat/anatomy.mdx +1 -1
- package/docs/ai-chat/backend.mdx +24 -24
- package/docs/ai-chat/background-injection.mdx +5 -5
- package/docs/ai-chat/chat-local.mdx +2 -2
- package/docs/ai-chat/compaction.mdx +47 -18
- package/docs/ai-chat/custom-agents.mdx +4 -4
- package/docs/ai-chat/error-handling.mdx +4 -4
- package/docs/ai-chat/fast-starts.mdx +8 -7
- package/docs/ai-chat/frontend.mdx +6 -2
- package/docs/ai-chat/lifecycle-hooks.mdx +11 -11
- package/docs/ai-chat/migrating-from-a-route-handler.mdx +4 -4
- package/docs/ai-chat/migrating-from-hydrate-messages.mdx +1 -1
- package/docs/ai-chat/overview.mdx +1 -1
- package/docs/ai-chat/patterns/branching-conversations.mdx +1 -1
- package/docs/ai-chat/patterns/database-persistence.mdx +2 -2
- package/docs/ai-chat/patterns/human-in-the-loop.mdx +1 -1
- package/docs/ai-chat/patterns/native-compaction.mdx +29 -9
- package/docs/ai-chat/patterns/persistence-and-replay.mdx +1 -1
- package/docs/ai-chat/patterns/redacting-telemetry.mdx +2 -2
- package/docs/ai-chat/patterns/skills.mdx +2 -2
- package/docs/ai-chat/patterns/sub-agents.mdx +1 -1
- package/docs/ai-chat/patterns/tool-result-auditing.mdx +1 -1
- package/docs/ai-chat/patterns/trusted-edge-signals.mdx +2 -2
- package/docs/ai-chat/patterns/version-upgrades.mdx +2 -2
- package/docs/ai-chat/pending-messages.mdx +5 -5
- package/docs/ai-chat/prompt-caching.mdx +7 -7
- package/docs/ai-chat/quick-start.mdx +2 -2
- package/docs/ai-chat/testing.mdx +9 -9
- package/docs/ai-chat/tools.mdx +9 -5
- package/docs/ai-chat/transcript-storage.mdx +2 -2
- package/docs/ai-chat/types.mdx +10 -3
- package/docs/apikeys.mdx +2 -1
- package/docs/cli-login-commands.mdx +12 -0
- package/docs/concurrency.mdx +40 -0
- package/docs/database-connections.mdx +1 -1
- package/docs/deploy-environment-variables.mdx +84 -2
- package/docs/deployment/trusted-publishing.mdx +4 -0
- package/docs/errors-retrying.mdx +25 -18
- package/docs/github-actions.mdx +1 -1
- package/docs/github-integration.mdx +32 -1
- package/docs/how-it-works.mdx +4 -2
- package/docs/introduction.mdx +1 -1
- package/docs/mcp-introduction.mdx +7 -1
- package/docs/mcp-remote.mdx +90 -0
- package/docs/oidc/azure.mdx +81 -0
- package/docs/oidc/databricks.mdx +99 -0
- package/docs/oidc/doppler.mdx +60 -0
- package/docs/oidc/gcp.mdx +109 -0
- package/docs/oidc/hugging-face.mdx +90 -0
- package/docs/oidc/openrouter.mdx +91 -0
- package/docs/oidc/snowflake.mdx +91 -0
- package/docs/oidc/vault.mdx +71 -0
- package/docs/oidc.mdx +2 -0
- package/docs/runs/metadata.mdx +1 -1
- package/docs/self-hosting/docker.mdx +2 -0
- package/docs/self-hosting/env/webapp.mdx +4 -1
- package/docs/self-hosting/kubernetes.mdx +2 -0
- package/docs/tasks/schemaTask.mdx +26 -13
- package/docs/tasks/streams.mdx +2 -2
- package/docs/troubleshooting.mdx +7 -0
- package/docs/webhooks/channels.mdx +6 -6
- package/docs/webhooks/connect.mdx +9 -75
- package/docs/webhooks/custom-providers.mdx +87 -0
- package/docs/webhooks/deliveries.mdx +7 -7
- package/docs/webhooks/filters.mdx +2 -2
- package/docs/webhooks/how-it-works.mdx +58 -0
- package/docs/webhooks/human-in-the-loop.mdx +3 -3
- package/docs/webhooks/linear.mdx +5 -3
- package/docs/webhooks/overview.mdx +20 -71
- package/docs/webhooks/own-handler.mdx +62 -0
- package/docs/webhooks/pricing-and-limits.mdx +13 -0
- package/docs/webhooks/providers/attio.mdx +38 -0
- package/docs/webhooks/providers/autumn.mdx +40 -0
- package/docs/webhooks/providers/cal-com.mdx +41 -0
- package/docs/webhooks/providers/calendly.mdx +41 -0
- package/docs/webhooks/providers/clerk.mdx +40 -0
- package/docs/webhooks/providers/discord.mdx +45 -0
- package/docs/webhooks/providers/docusign.mdx +41 -0
- package/docs/webhooks/providers/elevenlabs.mdx +41 -0
- package/docs/webhooks/providers/firecrawl.mdx +54 -0
- package/docs/webhooks/providers/github.mdx +46 -0
- package/docs/webhooks/providers/gitlab.mdx +41 -0
- package/docs/webhooks/providers/granola.mdx +44 -0
- package/docs/webhooks/providers/hookdeck.mdx +98 -0
- package/docs/webhooks/providers/infisical.mdx +41 -0
- package/docs/webhooks/providers/jira.mdx +41 -0
- package/docs/webhooks/providers/langfuse.mdx +40 -0
- package/docs/webhooks/providers/linear.mdx +45 -0
- package/docs/webhooks/providers/loops.mdx +40 -0
- package/docs/webhooks/providers/metronome.mdx +42 -0
- package/docs/webhooks/providers/mux.mdx +40 -0
- package/docs/webhooks/providers/openai.mdx +40 -0
- package/docs/webhooks/providers/pagerduty.mdx +40 -0
- package/docs/webhooks/providers/plain.mdx +41 -0
- package/docs/webhooks/providers/planetscale.mdx +40 -0
- package/docs/webhooks/providers/recall-ai.mdx +54 -0
- package/docs/webhooks/providers/replicate.mdx +41 -0
- package/docs/webhooks/providers/resend.mdx +44 -0
- package/docs/webhooks/providers/retell.mdx +41 -0
- package/docs/webhooks/providers/sentry.mdx +41 -0
- package/docs/webhooks/providers/shopify.mdx +49 -0
- package/docs/webhooks/providers/slack.mdx +48 -0
- package/docs/webhooks/providers/square.mdx +40 -0
- package/docs/webhooks/providers/stripe.mdx +86 -0
- package/docs/webhooks/providers/supabase.mdx +41 -0
- package/docs/webhooks/providers/tailscale.mdx +43 -0
- package/docs/webhooks/providers/typeform.mdx +42 -0
- package/docs/webhooks/providers/vapi.mdx +47 -0
- package/docs/webhooks/providers/vercel.mdx +40 -0
- package/docs/webhooks/providers/whatsapp.mdx +45 -0
- package/docs/webhooks/providers/workos.mdx +41 -0
- package/docs/webhooks/providers/zendesk.mdx +41 -0
- package/docs/webhooks/providers.mdx +53 -0
- package/docs/webhooks/quick-start.mdx +131 -0
- package/docs/webhooks/session-routing.mdx +6 -6
- package/docs/webhooks/signing-secrets.mdx +80 -0
- package/docs/webhooks/slack.mdx +11 -2
- package/docs/webhooks/verification.mdx +139 -0
- package/docs/webhooks/waiters.mdx +2 -2
- package/docs/webhooks/webhook-tasks.mdx +46 -0
- package/package.json +4 -5
- package/docs/migrating-from-v3.mdx +0 -332
- package/docs/webhooks/public-beta.mdx +0 -70
- package/docs/webhooks/sources.mdx +0 -252
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Jira webhooks"
|
|
3
|
+
sidebarTitle: "Jira"
|
|
4
|
+
description: "Receive and verify Jira webhooks with Trigger.dev. Check the HMAC-SHA256 signature in x-hub-signature and run a task for each Jira event, filtered on event.webhookEvent."
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
**`webhooks.jira()` verifies the HMAC-SHA256 signature Jira sends in `x-hub-signature` on every request.**
|
|
8
|
+
|
|
9
|
+
```ts /trigger/jira.ts
|
|
10
|
+
import { webhook, webhooks } from "@trigger.dev/sdk";
|
|
11
|
+
|
|
12
|
+
export const jira = webhooks.endpoint.define({
|
|
13
|
+
id: "jira",
|
|
14
|
+
source: webhooks.jira(),
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
export const jiraEvents = webhook({
|
|
18
|
+
id: "jira-events",
|
|
19
|
+
endpoint: jira,
|
|
20
|
+
onEvent: async ({ event }) => {
|
|
21
|
+
console.log(event);
|
|
22
|
+
},
|
|
23
|
+
});
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
To run a subscriber only for some events, add a [filter](/webhooks/filters) on `event.webhookEvent`.
|
|
27
|
+
|
|
28
|
+
| Setting | Value |
|
|
29
|
+
| --- | --- |
|
|
30
|
+
| Source | `webhooks.jira()` |
|
|
31
|
+
| Verification | HMAC-SHA256 in `x-hub-signature` |
|
|
32
|
+
| Credential | Secret you generate on Trigger.dev |
|
|
33
|
+
| Event type | `event.webhookEvent` |
|
|
34
|
+
| Jira docs | [Jira webhook docs](https://developer.atlassian.com/cloud/jira/platform/webhooks/) |
|
|
35
|
+
|
|
36
|
+
## Set up Jira
|
|
37
|
+
|
|
38
|
+
1. Start `trigger dev` or deploy, then copy the endpoint's **Webhook URL** from the **Webhooks** page.
|
|
39
|
+
2. Choose **Generate secret** on the Trigger.dev endpoint and copy the value.
|
|
40
|
+
3. As a Jira admin, open **System > WebHooks** and choose **Create a WebHook**. Enter the webhook URL, select the events your subscribers need, and paste the secret into **Secret**. Only webhooks an admin registers here are signed; webhooks registered by Connect or OAuth apps aren't, so the endpoint rejects them.
|
|
41
|
+
4. Send a test event from Jira, or use the endpoint's **Test** tab, and check the endpoint's **Deliveries** tab. See [Verify the connection](/webhooks/connect#verify-the-connection) if nothing arrives.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Langfuse webhooks"
|
|
3
|
+
sidebarTitle: "Langfuse"
|
|
4
|
+
description: "Receive and verify Langfuse webhooks with Trigger.dev. Check the HMAC-SHA256 signature in x-langfuse-signature and run a task for each Langfuse event, filtered on event.type."
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
**`webhooks.langfuse()` verifies the HMAC-SHA256 signature Langfuse sends in `x-langfuse-signature` on every request.**
|
|
8
|
+
|
|
9
|
+
```ts /trigger/langfuse.ts
|
|
10
|
+
import { webhook, webhooks } from "@trigger.dev/sdk";
|
|
11
|
+
|
|
12
|
+
export const langfuse = webhooks.endpoint.define({
|
|
13
|
+
id: "langfuse",
|
|
14
|
+
source: webhooks.langfuse(),
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
export const langfuseEvents = webhook({
|
|
18
|
+
id: "langfuse-events",
|
|
19
|
+
endpoint: langfuse,
|
|
20
|
+
filter: "event.type == 'prompt-version' && event.action == 'created'",
|
|
21
|
+
onEvent: async ({ event }) => {
|
|
22
|
+
console.log(event);
|
|
23
|
+
},
|
|
24
|
+
});
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
| Setting | Value |
|
|
28
|
+
| --- | --- |
|
|
29
|
+
| Source | `webhooks.langfuse()` |
|
|
30
|
+
| Verification | HMAC-SHA256 in `x-langfuse-signature` |
|
|
31
|
+
| Credential | Signing secret issued by Langfuse |
|
|
32
|
+
| Event type | `event.type` |
|
|
33
|
+
| Langfuse docs | [Langfuse webhook docs](https://langfuse.com/docs/prompt-management/features/webhooks-slack-integrations) |
|
|
34
|
+
|
|
35
|
+
## Set up Langfuse
|
|
36
|
+
|
|
37
|
+
1. Start `trigger dev` or deploy, then copy the endpoint's **Webhook URL** from the **Webhooks** page.
|
|
38
|
+
2. In the Langfuse project, go to **Prompts > Automations > Create Automation**. Choose the prompt version event and the actions (created, updated, deleted) your subscribers need, and set the request URL to the webhook URL.
|
|
39
|
+
3. Copy the signing secret Langfuse shows (it starts with `lf-whsec_`), then choose **Set signing secret** on the Trigger.dev endpoint.
|
|
40
|
+
4. Send a test event from Langfuse, or use the endpoint's **Test** tab, and check the endpoint's **Deliveries** tab. See [Verify the connection](/webhooks/connect#verify-the-connection) if nothing arrives.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Linear webhooks"
|
|
3
|
+
sidebarTitle: "Linear"
|
|
4
|
+
description: "Receive and verify Linear webhooks with Trigger.dev. Check the HMAC-SHA256 signature in linear-signature and run a task for each Linear event, filtered on event.type."
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
**`webhooks.linear()` verifies the HMAC-SHA256 signature Linear sends in `linear-signature` on every request.**
|
|
8
|
+
|
|
9
|
+
```ts /trigger/linear.ts
|
|
10
|
+
import { webhook, webhooks } from "@trigger.dev/sdk";
|
|
11
|
+
|
|
12
|
+
export const linear = webhooks.endpoint.define({
|
|
13
|
+
id: "linear",
|
|
14
|
+
source: webhooks.linear(),
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
export const linearEvents = webhook({
|
|
18
|
+
id: "linear-events",
|
|
19
|
+
endpoint: linear,
|
|
20
|
+
onEvent: async ({ event }) => {
|
|
21
|
+
console.log(event);
|
|
22
|
+
},
|
|
23
|
+
});
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
To run a subscriber only for some events, add a [filter](/webhooks/filters) on `event.type`.
|
|
27
|
+
|
|
28
|
+
| Setting | Value |
|
|
29
|
+
| --- | --- |
|
|
30
|
+
| Source | `webhooks.linear()` |
|
|
31
|
+
| Verification | HMAC-SHA256 in `linear-signature` |
|
|
32
|
+
| Credential | Signing secret issued by Linear |
|
|
33
|
+
| Event type | `event.type` |
|
|
34
|
+
| Linear docs | [Linear webhook docs](https://linear.app/developers/webhooks) |
|
|
35
|
+
|
|
36
|
+
## Set up Linear
|
|
37
|
+
|
|
38
|
+
1. Start `trigger dev` or deploy, then copy the endpoint's **Webhook URL** from the **Webhooks** page.
|
|
39
|
+
2. In Linear, open **Settings > API** and choose **New webhook**. Enter the webhook URL and select the resource types your subscribers need.
|
|
40
|
+
3. Linear generates the signing secret and shows it on the webhook's page. Copy it, then choose **Set signing secret** on the Trigger.dev endpoint.
|
|
41
|
+
4. Send a test event from Linear, or use the endpoint's **Test** tab, and check the endpoint's **Deliveries** tab. See [Verify the connection](/webhooks/connect#verify-the-connection) if nothing arrives.
|
|
42
|
+
|
|
43
|
+
## Build a Linear agent
|
|
44
|
+
|
|
45
|
+
To work issues inside Linear's agent session UI, use the `linear()` connector from `@trigger.dev/linear`. See [Linear agents](/webhooks/linear).
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Loops webhooks"
|
|
3
|
+
sidebarTitle: "Loops"
|
|
4
|
+
description: "Receive and verify Loops webhooks with Trigger.dev. Check the Standard Webhooks signature and run a task for each Loops event, filtered on event.eventName."
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
**`webhooks.loops()` verifies the Standard Webhooks signature Loops sends in the `webhook-*` headers on every request.**
|
|
8
|
+
|
|
9
|
+
```ts /trigger/loops.ts
|
|
10
|
+
import { webhook, webhooks } from "@trigger.dev/sdk";
|
|
11
|
+
|
|
12
|
+
export const loops = webhooks.endpoint.define({
|
|
13
|
+
id: "loops",
|
|
14
|
+
source: webhooks.loops(),
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
export const loopsEvents = webhook({
|
|
18
|
+
id: "loops-events",
|
|
19
|
+
endpoint: loops,
|
|
20
|
+
filter: "event.eventName == 'email.delivered'",
|
|
21
|
+
onEvent: async ({ event }) => {
|
|
22
|
+
console.log(event);
|
|
23
|
+
},
|
|
24
|
+
});
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
| Setting | Value |
|
|
28
|
+
| --- | --- |
|
|
29
|
+
| Source | `webhooks.loops()` |
|
|
30
|
+
| Verification | Standard Webhooks (`webhook-id`, `webhook-timestamp`, `webhook-signature`) |
|
|
31
|
+
| Credential | Signing secret issued by Loops |
|
|
32
|
+
| Event type | `event.eventName` |
|
|
33
|
+
| Loops docs | [Loops webhook docs](https://loops.so/docs/webhooks) |
|
|
34
|
+
|
|
35
|
+
## Set up Loops
|
|
36
|
+
|
|
37
|
+
1. Start `trigger dev` or deploy, then copy the endpoint's **Webhook URL** from the **Webhooks** page.
|
|
38
|
+
2. In Loops, go to **Settings > Webhooks**, add the webhook URL as the endpoint, and select the events your subscribers need.
|
|
39
|
+
3. Copy the endpoint's signing secret (it starts with `whsec_`), then choose **Set signing secret** on the Trigger.dev endpoint.
|
|
40
|
+
4. Send a `testing.testEvent` from the Loops settings page, or use the endpoint's **Test** tab, and check the endpoint's **Deliveries** tab. See [Verify the connection](/webhooks/connect#verify-the-connection) if nothing arrives.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Metronome webhooks"
|
|
3
|
+
sidebarTitle: "Metronome"
|
|
4
|
+
description: "Receive and verify Metronome webhooks with Trigger.dev. Check the HMAC-SHA256 signature in metronome-webhook-signature and run a task for each Metronome event, filtered on event.type."
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
**`webhooks.metronome()` verifies the HMAC-SHA256 signature Metronome sends in `metronome-webhook-signature` on every request.**
|
|
8
|
+
|
|
9
|
+
```ts /trigger/metronome.ts
|
|
10
|
+
import { webhook, webhooks } from "@trigger.dev/sdk";
|
|
11
|
+
|
|
12
|
+
export const metronome = webhooks.endpoint.define({
|
|
13
|
+
id: "metronome",
|
|
14
|
+
source: webhooks.metronome(),
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
export const metronomeEvents = webhook({
|
|
18
|
+
id: "metronome-events",
|
|
19
|
+
endpoint: metronome,
|
|
20
|
+
onEvent: async ({ event }) => {
|
|
21
|
+
console.log(event);
|
|
22
|
+
},
|
|
23
|
+
});
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
To run a subscriber only for some events, add a [filter](/webhooks/filters) on `event.type`.
|
|
27
|
+
|
|
28
|
+
| Setting | Value |
|
|
29
|
+
| --- | --- |
|
|
30
|
+
| Source | `webhooks.metronome()` |
|
|
31
|
+
| Verification | HMAC-SHA256 in `metronome-webhook-signature` |
|
|
32
|
+
| Credential | Signing secret issued by Metronome |
|
|
33
|
+
| Event type | `event.type` |
|
|
34
|
+
| Metronome docs | [Metronome webhook docs](https://docs.metronome.com/guides/platform-configuration/setup-webhooks) |
|
|
35
|
+
|
|
36
|
+
## Set up Metronome
|
|
37
|
+
|
|
38
|
+
1. Start `trigger dev` or deploy, then copy the endpoint's **Webhook URL** from the **Webhooks** page.
|
|
39
|
+
2. In the Metronome app, go to **Developer > Notifications > Webhooks > Add** and enter the webhook URL.
|
|
40
|
+
3. Copy the webhook's secret key, then choose **Set signing secret** on the Trigger.dev endpoint.
|
|
41
|
+
4. Create the notifications your subscribers need, such as a low credit balance alert, under **Developer > Notifications > Create Notification**.
|
|
42
|
+
5. Send a test event from Metronome, or use the endpoint's **Test** tab, and check the endpoint's **Deliveries** tab. See [Verify the connection](/webhooks/connect#verify-the-connection) if nothing arrives.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Mux webhooks"
|
|
3
|
+
sidebarTitle: "Mux"
|
|
4
|
+
description: "Receive and verify Mux webhooks with Trigger.dev. Check the HMAC-SHA256 signature in mux-signature and run a task for each Mux event, filtered on event.type."
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
**`webhooks.mux()` verifies the HMAC-SHA256 signature Mux sends in `mux-signature` on every request.**
|
|
8
|
+
|
|
9
|
+
```ts /trigger/mux.ts
|
|
10
|
+
import { webhook, webhooks } from "@trigger.dev/sdk";
|
|
11
|
+
|
|
12
|
+
export const mux = webhooks.endpoint.define({
|
|
13
|
+
id: "mux",
|
|
14
|
+
source: webhooks.mux(),
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
export const muxEvents = webhook({
|
|
18
|
+
id: "mux-events",
|
|
19
|
+
endpoint: mux,
|
|
20
|
+
filter: "event.type == 'video.asset.ready'",
|
|
21
|
+
onEvent: async ({ event }) => {
|
|
22
|
+
console.log(event);
|
|
23
|
+
},
|
|
24
|
+
});
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
| Setting | Value |
|
|
28
|
+
| --- | --- |
|
|
29
|
+
| Source | `webhooks.mux()` |
|
|
30
|
+
| Verification | HMAC-SHA256 in `mux-signature` |
|
|
31
|
+
| Credential | Signing secret issued by Mux |
|
|
32
|
+
| Event type | `event.type` |
|
|
33
|
+
| Mux docs | [Mux webhook docs](https://www.mux.com/docs/core/verify-webhook-signatures) |
|
|
34
|
+
|
|
35
|
+
## Set up Mux
|
|
36
|
+
|
|
37
|
+
1. Start `trigger dev` or deploy, then copy the endpoint's **Webhook URL** from the **Webhooks** page.
|
|
38
|
+
2. In the [Mux webhook settings](https://dashboard.mux.com/settings/webhooks), select the environment your app uses and add the webhook URL. Mux sends every event in that environment.
|
|
39
|
+
3. Copy that webhook's signing secret, then choose **Set signing secret** on the Trigger.dev endpoint.
|
|
40
|
+
4. Send a test event from Mux, or use the endpoint's **Test** tab, and check the endpoint's **Deliveries** tab. See [Verify the connection](/webhooks/connect#verify-the-connection) if nothing arrives.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "OpenAI webhooks"
|
|
3
|
+
sidebarTitle: "OpenAI"
|
|
4
|
+
description: "Receive and verify OpenAI webhooks with Trigger.dev. Check the Standard Webhooks signature and run a task for each OpenAI event, filtered on event.type."
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
**`webhooks.openai()` verifies the Standard Webhooks signature OpenAI sends in the `webhook-*` headers on every request.**
|
|
8
|
+
|
|
9
|
+
```ts /trigger/openai.ts
|
|
10
|
+
import { webhook, webhooks } from "@trigger.dev/sdk";
|
|
11
|
+
|
|
12
|
+
export const openai = webhooks.endpoint.define({
|
|
13
|
+
id: "openai",
|
|
14
|
+
source: webhooks.openai(),
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
export const openaiEvents = webhook({
|
|
18
|
+
id: "openai-events",
|
|
19
|
+
endpoint: openai,
|
|
20
|
+
filter: "event.type == 'batch.completed'",
|
|
21
|
+
onEvent: async ({ event }) => {
|
|
22
|
+
console.log(event);
|
|
23
|
+
},
|
|
24
|
+
});
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
| Setting | Value |
|
|
28
|
+
| --- | --- |
|
|
29
|
+
| Source | `webhooks.openai()` |
|
|
30
|
+
| Verification | Standard Webhooks (`webhook-id`, `webhook-timestamp`, `webhook-signature`) |
|
|
31
|
+
| Credential | Signing secret issued by OpenAI |
|
|
32
|
+
| Event type | `event.type` |
|
|
33
|
+
| OpenAI docs | [OpenAI webhook docs](https://developers.openai.com/api/docs/guides/webhooks) |
|
|
34
|
+
|
|
35
|
+
## Set up OpenAI
|
|
36
|
+
|
|
37
|
+
1. Start `trigger dev` or deploy, then copy the endpoint's **Webhook URL** from the **Webhooks** page.
|
|
38
|
+
2. Add the webhook URL as an endpoint in OpenAI's webhook settings and subscribe it to the event types your subscribers need.
|
|
39
|
+
3. Copy the endpoint's signing secret (it starts with `whsec_`), then choose **Set signing secret** on the Trigger.dev endpoint.
|
|
40
|
+
4. Send a test event from OpenAI, or use the endpoint's **Test** tab, and check the endpoint's **Deliveries** tab. See [Verify the connection](/webhooks/connect#verify-the-connection) if nothing arrives.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "PagerDuty webhooks"
|
|
3
|
+
sidebarTitle: "PagerDuty"
|
|
4
|
+
description: "Receive and verify PagerDuty webhooks with Trigger.dev. Check the HMAC-SHA256 signature in x-pagerduty-signature and run a task for each PagerDuty event, filtered on event.event.event_type."
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
**`webhooks.pagerduty()` verifies the HMAC-SHA256 signature PagerDuty sends in `x-pagerduty-signature` on every request.**
|
|
8
|
+
|
|
9
|
+
```ts /trigger/pagerduty.ts
|
|
10
|
+
import { webhook, webhooks } from "@trigger.dev/sdk";
|
|
11
|
+
|
|
12
|
+
export const pagerduty = webhooks.endpoint.define({
|
|
13
|
+
id: "pagerduty",
|
|
14
|
+
source: webhooks.pagerduty(),
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
export const pagerdutyEvents = webhook({
|
|
18
|
+
id: "pagerduty-events",
|
|
19
|
+
endpoint: pagerduty,
|
|
20
|
+
filter: "event.event.event_type == 'incident.triggered'",
|
|
21
|
+
onEvent: async ({ event }) => {
|
|
22
|
+
console.log(event);
|
|
23
|
+
},
|
|
24
|
+
});
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
| Setting | Value |
|
|
28
|
+
| --- | --- |
|
|
29
|
+
| Source | `webhooks.pagerduty()` |
|
|
30
|
+
| Verification | HMAC-SHA256 in `x-pagerduty-signature` |
|
|
31
|
+
| Credential | Signing secret issued by PagerDuty |
|
|
32
|
+
| Event type | `event.event.event_type` |
|
|
33
|
+
| PagerDuty docs | [PagerDuty webhook docs](https://docs.pagerduty.com/developer/verifying-webhook-signatures) |
|
|
34
|
+
|
|
35
|
+
## Set up PagerDuty
|
|
36
|
+
|
|
37
|
+
1. Start `trigger dev` or deploy, then copy the endpoint's **Webhook URL** from the **Webhooks** page.
|
|
38
|
+
2. In PagerDuty, open **Integrations > Generic Webhooks (v3)** and choose **New Webhook**. Enter the webhook URL and select the event types your subscribers need.
|
|
39
|
+
3. PagerDuty shows the webhook's signing secret once, when the webhook is created. Copy it then, and choose **Set signing secret** on the Trigger.dev endpoint.
|
|
40
|
+
4. Send a test event from PagerDuty, or use the endpoint's **Test** tab, and check the endpoint's **Deliveries** tab. See [Verify the connection](/webhooks/connect#verify-the-connection) if nothing arrives.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Plain webhooks"
|
|
3
|
+
sidebarTitle: "Plain"
|
|
4
|
+
description: "Receive and verify Plain webhooks with Trigger.dev. Check the HMAC-SHA256 signature in plain-request-signature and run a task for each Plain event, filtered on event.type."
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
**`webhooks.plain()` verifies the HMAC-SHA256 signature Plain sends in `plain-request-signature` on every request.**
|
|
8
|
+
|
|
9
|
+
```ts /trigger/plain.ts
|
|
10
|
+
import { webhook, webhooks } from "@trigger.dev/sdk";
|
|
11
|
+
|
|
12
|
+
export const plain = webhooks.endpoint.define({
|
|
13
|
+
id: "plain",
|
|
14
|
+
source: webhooks.plain(),
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
export const plainEvents = webhook({
|
|
18
|
+
id: "plain-events",
|
|
19
|
+
endpoint: plain,
|
|
20
|
+
filter: "event.type == 'thread.thread_created'",
|
|
21
|
+
onEvent: async ({ event }) => {
|
|
22
|
+
console.log(event);
|
|
23
|
+
},
|
|
24
|
+
});
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
| Setting | Value |
|
|
28
|
+
| --- | --- |
|
|
29
|
+
| Source | `webhooks.plain()` |
|
|
30
|
+
| Verification | HMAC-SHA256 in `plain-request-signature` |
|
|
31
|
+
| Credential | Signing secret issued by Plain |
|
|
32
|
+
| Event type | `event.type` |
|
|
33
|
+
| Plain docs | [Plain webhook docs](https://www.plain.com/docs/webhooks) |
|
|
34
|
+
|
|
35
|
+
## Set up Plain
|
|
36
|
+
|
|
37
|
+
1. Start `trigger dev` or deploy, then copy the endpoint's **Webhook URL** from the **Webhooks** page.
|
|
38
|
+
2. As a workspace admin, view or generate the request signing secret under **Settings > Request signing**. It is one secret for the whole workspace, so read the existing one if other webhook targets use it.
|
|
39
|
+
3. Choose **Set signing secret** on the Trigger.dev endpoint and paste it.
|
|
40
|
+
4. Add the target under **Settings > Webhooks > Add webhook target**, with the webhook URL and the events your subscribers need.
|
|
41
|
+
5. Send a test event from Plain, or use the endpoint's **Test** tab, and check the endpoint's **Deliveries** tab. See [Verify the connection](/webhooks/connect#verify-the-connection) if nothing arrives.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "PlanetScale webhooks"
|
|
3
|
+
sidebarTitle: "PlanetScale"
|
|
4
|
+
description: "Receive and verify PlanetScale webhooks with Trigger.dev. Check the HMAC-SHA256 signature in x-planetscale-signature and run a task for each PlanetScale event, filtered on event.event."
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
**`webhooks.planetscale()` verifies the HMAC-SHA256 signature PlanetScale sends in `x-planetscale-signature` on every request.**
|
|
8
|
+
|
|
9
|
+
```ts /trigger/planetscale.ts
|
|
10
|
+
import { webhook, webhooks } from "@trigger.dev/sdk";
|
|
11
|
+
|
|
12
|
+
export const planetscale = webhooks.endpoint.define({
|
|
13
|
+
id: "planetscale",
|
|
14
|
+
source: webhooks.planetscale(),
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
export const planetscaleEvents = webhook({
|
|
18
|
+
id: "planetscale-events",
|
|
19
|
+
endpoint: planetscale,
|
|
20
|
+
filter: "event.event == 'branch.ready'",
|
|
21
|
+
onEvent: async ({ event }) => {
|
|
22
|
+
console.log(event);
|
|
23
|
+
},
|
|
24
|
+
});
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
| Setting | Value |
|
|
28
|
+
| --- | --- |
|
|
29
|
+
| Source | `webhooks.planetscale()` |
|
|
30
|
+
| Verification | HMAC-SHA256 in `x-planetscale-signature` |
|
|
31
|
+
| Credential | Signing secret issued by PlanetScale |
|
|
32
|
+
| Event type | `event.event` |
|
|
33
|
+
| PlanetScale docs | [PlanetScale webhook docs](https://planetscale.com/docs/api/webhooks) |
|
|
34
|
+
|
|
35
|
+
## Set up PlanetScale
|
|
36
|
+
|
|
37
|
+
1. Start `trigger dev` or deploy, then copy the endpoint's **Webhook URL** from the **Webhooks** page.
|
|
38
|
+
2. Select the database in PlanetScale, then **Settings > Webhooks > Add webhook**. Enter the webhook URL and select the events your subscribers need. This needs the database administrator role.
|
|
39
|
+
3. In the webhook's menu, choose **Show secret**, copy it, and choose **Set signing secret** on the Trigger.dev endpoint.
|
|
40
|
+
4. Choose **Test webhook** in the same menu to send a `webhook.test` event, or use the endpoint's **Test** tab, and check the endpoint's **Deliveries** tab. See [Verify the connection](/webhooks/connect#verify-the-connection) if nothing arrives.
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Recall.ai webhooks"
|
|
3
|
+
sidebarTitle: "Recall.ai"
|
|
4
|
+
description: "Receive and verify Recall.ai webhooks with Trigger.dev. Check the Standard Webhooks signature and run a task for each Recall.ai event, filtered on event.event."
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
**`webhooks.recallai()` verifies the Standard Webhooks signature Recall.ai sends in the `webhook-*` headers on every request.**
|
|
8
|
+
|
|
9
|
+
```ts /trigger/recall-ai.ts
|
|
10
|
+
import { webhook, webhooks } from "@trigger.dev/sdk";
|
|
11
|
+
|
|
12
|
+
export const recallai = webhooks.endpoint.define({
|
|
13
|
+
id: "recall-ai",
|
|
14
|
+
source: webhooks.recallai(),
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
export const recallaiEvents = webhook({
|
|
18
|
+
id: "recall-ai-events",
|
|
19
|
+
endpoint: recallai,
|
|
20
|
+
onEvent: async ({ event }) => {
|
|
21
|
+
console.log(event);
|
|
22
|
+
},
|
|
23
|
+
});
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
To run a subscriber only for some events, add a [filter](/webhooks/filters) on `event.event`.
|
|
27
|
+
|
|
28
|
+
| Setting | Value |
|
|
29
|
+
| --- | --- |
|
|
30
|
+
| Source | `webhooks.recallai()` |
|
|
31
|
+
| Verification | Standard Webhooks (`webhook-id`, `webhook-timestamp`, `webhook-signature`) |
|
|
32
|
+
| Credential | Workspace verification secret issued by Recall.ai |
|
|
33
|
+
| Event type | `event.event` |
|
|
34
|
+
| Recall.ai docs | [Recall.ai webhook docs](https://docs.recall.ai/docs/authenticating-requests-from-recallai) |
|
|
35
|
+
|
|
36
|
+
## Set up Recall.ai
|
|
37
|
+
|
|
38
|
+
1. Start `trigger dev` or deploy, then copy the endpoint's **Webhook URL** from the **Webhooks** page.
|
|
39
|
+
2. Add the webhook URL as an endpoint on Recall.ai's webhooks dashboard and subscribe it to the event types your subscribers need.
|
|
40
|
+
3. Create a workspace verification secret under **Developers > API Keys & Secrets > Create Workspace Secret**, then choose **Set signing secret** on the Trigger.dev endpoint and paste it. Recall.ai sends no signature headers until a workspace secret exists.
|
|
41
|
+
4. Send a test event from Recall.ai, or use the endpoint's **Test** tab, and check the endpoint's **Deliveries** tab. See [Verify the connection](/webhooks/connect#verify-the-connection) if nothing arrives.
|
|
42
|
+
|
|
43
|
+
## Accounts created before 15 December 2025
|
|
44
|
+
|
|
45
|
+
Older Recall.ai accounts sign webhooks-dashboard deliveries with `svix-*` headers and a separate secret for each endpoint. For those accounts, declare the endpoint with `webhooks.svix()` instead, and set the endpoint's signing secret from the Recall.ai webhooks dashboard:
|
|
46
|
+
|
|
47
|
+
```ts /trigger/recall.ts
|
|
48
|
+
import { webhooks } from "@trigger.dev/sdk";
|
|
49
|
+
|
|
50
|
+
export const recall = webhooks.endpoint.define({
|
|
51
|
+
id: "recall",
|
|
52
|
+
source: webhooks.svix(),
|
|
53
|
+
});
|
|
54
|
+
```
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Replicate webhooks"
|
|
3
|
+
sidebarTitle: "Replicate"
|
|
4
|
+
description: "Receive and verify Replicate webhooks with Trigger.dev. Check the Standard Webhooks signature and run a task for each Replicate event, filtered on event.status."
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
**`webhooks.replicate()` verifies the Standard Webhooks signature Replicate sends in the `webhook-*` headers on every request.**
|
|
8
|
+
|
|
9
|
+
```ts /trigger/replicate.ts
|
|
10
|
+
import { webhook, webhooks } from "@trigger.dev/sdk";
|
|
11
|
+
|
|
12
|
+
export const replicate = webhooks.endpoint.define({
|
|
13
|
+
id: "replicate",
|
|
14
|
+
source: webhooks.replicate(),
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
export const replicateEvents = webhook({
|
|
18
|
+
id: "replicate-events",
|
|
19
|
+
endpoint: replicate,
|
|
20
|
+
onEvent: async ({ event }) => {
|
|
21
|
+
console.log(event);
|
|
22
|
+
},
|
|
23
|
+
});
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
To run a subscriber only for some events, add a [filter](/webhooks/filters) on `event.status`.
|
|
27
|
+
|
|
28
|
+
| Setting | Value |
|
|
29
|
+
| --- | --- |
|
|
30
|
+
| Source | `webhooks.replicate()` |
|
|
31
|
+
| Verification | Standard Webhooks (`webhook-id`, `webhook-timestamp`, `webhook-signature`) |
|
|
32
|
+
| Credential | Signing secret issued by Replicate |
|
|
33
|
+
| Event type | `event.status` |
|
|
34
|
+
| Replicate docs | [Replicate webhook docs](https://replicate.com/docs/topics/webhooks/verify-webhook) |
|
|
35
|
+
|
|
36
|
+
## Set up Replicate
|
|
37
|
+
|
|
38
|
+
1. Start `trigger dev` or deploy, then copy the endpoint's **Webhook URL** from the **Webhooks** page.
|
|
39
|
+
2. Replicate has no webhook settings page. Pass the webhook URL as `webhook` when you create a prediction, with `webhook_events_filter` set to the events you want (`start`, `output`, `logs`, `completed`).
|
|
40
|
+
3. Get your signing secret from `GET https://api.replicate.com/v1/webhooks/default/secret`. It starts with `whsec_` and is the same for every webhook on your user or organization. Choose **Set signing secret** on the Trigger.dev endpoint and paste it.
|
|
41
|
+
4. Create a prediction with the webhook set, or use the endpoint's **Test** tab, and check the endpoint's **Deliveries** tab. See [Verify the connection](/webhooks/connect#verify-the-connection) if nothing arrives.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Resend webhooks"
|
|
3
|
+
sidebarTitle: "Resend"
|
|
4
|
+
description: "Receive and verify Resend webhooks with Trigger.dev. Check the Svix signature and run a task for each Resend event, filtered on event.type."
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
**`webhooks.resend()` verifies the Svix signature Resend sends in the `svix-*` headers on every request.**
|
|
8
|
+
|
|
9
|
+
```ts /trigger/resend.ts
|
|
10
|
+
import { webhook, webhooks } from "@trigger.dev/sdk";
|
|
11
|
+
|
|
12
|
+
export const resend = webhooks.endpoint.define({
|
|
13
|
+
id: "resend",
|
|
14
|
+
source: webhooks.resend(),
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
export const resendEvents = webhook({
|
|
18
|
+
id: "resend-events",
|
|
19
|
+
endpoint: resend,
|
|
20
|
+
filter: "event.type == 'email.delivered'",
|
|
21
|
+
onEvent: async ({ event }) => {
|
|
22
|
+
console.log(event);
|
|
23
|
+
},
|
|
24
|
+
});
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
| Setting | Value |
|
|
28
|
+
| --- | --- |
|
|
29
|
+
| Source | `webhooks.resend()` |
|
|
30
|
+
| Verification | Svix (`svix-id`, `svix-timestamp`, `svix-signature`) |
|
|
31
|
+
| Credential | Signing secret issued by Resend |
|
|
32
|
+
| Event type | `event.type` |
|
|
33
|
+
| Resend docs | [Resend webhook docs](https://resend.com/docs/webhooks/introduction) |
|
|
34
|
+
|
|
35
|
+
## Set up Resend
|
|
36
|
+
|
|
37
|
+
1. Start `trigger dev` or deploy, then copy the endpoint's **Webhook URL** from the **Webhooks** page.
|
|
38
|
+
2. Add the webhook URL as an endpoint in Resend's webhook settings and subscribe it to the event types your subscribers need.
|
|
39
|
+
3. Copy the endpoint's signing secret (it starts with `whsec_`), then choose **Set signing secret** on the Trigger.dev endpoint.
|
|
40
|
+
4. Send a test event from Resend, or use the endpoint's **Test** tab, and check the endpoint's **Deliveries** tab. See [Verify the connection](/webhooks/connect#verify-the-connection) if nothing arrives.
|
|
41
|
+
|
|
42
|
+
## Example project
|
|
43
|
+
|
|
44
|
+
The [Resend email agent example](/guides/example-projects/resend-email-agent) drafts replies to a Resend inbox from these webhooks and waits for approval in Slack before sending.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Retell AI webhooks"
|
|
3
|
+
sidebarTitle: "Retell AI"
|
|
4
|
+
description: "Receive and verify Retell AI webhooks with Trigger.dev. Check the HMAC-SHA256 signature in x-retell-signature and run a task for each Retell AI event, filtered on event.event."
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
**`webhooks.retell()` verifies the HMAC-SHA256 signature Retell AI sends in `x-retell-signature` on every request.**
|
|
8
|
+
|
|
9
|
+
```ts /trigger/retell.ts
|
|
10
|
+
import { webhook, webhooks } from "@trigger.dev/sdk";
|
|
11
|
+
|
|
12
|
+
export const retell = webhooks.endpoint.define({
|
|
13
|
+
id: "retell",
|
|
14
|
+
source: webhooks.retell(),
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
export const retellEvents = webhook({
|
|
18
|
+
id: "retell-events",
|
|
19
|
+
endpoint: retell,
|
|
20
|
+
onEvent: async ({ event }) => {
|
|
21
|
+
console.log(event);
|
|
22
|
+
},
|
|
23
|
+
});
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
To run a subscriber only for some events, add a [filter](/webhooks/filters) on `event.event`.
|
|
27
|
+
|
|
28
|
+
| Setting | Value |
|
|
29
|
+
| --- | --- |
|
|
30
|
+
| Source | `webhooks.retell()` |
|
|
31
|
+
| Verification | HMAC-SHA256 in `x-retell-signature` |
|
|
32
|
+
| Credential | The Retell AI API key with the webhook badge |
|
|
33
|
+
| Event type | `event.event` |
|
|
34
|
+
| Retell AI docs | [Retell AI webhook docs](https://docs.retellai.com/features/secure-webhook) |
|
|
35
|
+
|
|
36
|
+
## Set up Retell AI
|
|
37
|
+
|
|
38
|
+
1. Start `trigger dev` or deploy, then copy the endpoint's **Webhook URL** from the **Webhooks** page.
|
|
39
|
+
2. In Retell AI, set the webhook URL as the account-level webhook in the system settings' **Webhooks** tab, or as an agent's **Agent Level Webhook URL** under **Webhook settings** in the agent editor. An agent-level URL replaces the account-level one for that agent.
|
|
40
|
+
3. Retell AI signs with an API key, not a per-webhook secret. Copy the API key that has the webhook badge next to it, then choose **Set signing secret** on the Trigger.dev endpoint and paste it.
|
|
41
|
+
4. Send a test event from Retell AI, or use the endpoint's **Test** tab, and check the endpoint's **Deliveries** tab. See [Verify the connection](/webhooks/connect#verify-the-connection) if nothing arrives.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Sentry webhooks"
|
|
3
|
+
sidebarTitle: "Sentry"
|
|
4
|
+
description: "Receive and verify Sentry webhooks with Trigger.dev. Check the HMAC-SHA256 signature in sentry-hook-signature and run a task for each Sentry event, filtered on header.sentry-hook-resource."
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
**`webhooks.sentry()` verifies the HMAC-SHA256 signature Sentry sends in `sentry-hook-signature` on every request.**
|
|
8
|
+
|
|
9
|
+
```ts /trigger/sentry.ts
|
|
10
|
+
import { webhook, webhooks } from "@trigger.dev/sdk";
|
|
11
|
+
|
|
12
|
+
export const sentry = webhooks.endpoint.define({
|
|
13
|
+
id: "sentry",
|
|
14
|
+
source: webhooks.sentry(),
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
export const sentryEvents = webhook({
|
|
18
|
+
id: "sentry-events",
|
|
19
|
+
endpoint: sentry,
|
|
20
|
+
onEvent: async ({ event }) => {
|
|
21
|
+
console.log(event);
|
|
22
|
+
},
|
|
23
|
+
});
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
To run a subscriber only for some events, add a [filter](/webhooks/filters) on `header.sentry-hook-resource`.
|
|
27
|
+
|
|
28
|
+
| Setting | Value |
|
|
29
|
+
| --- | --- |
|
|
30
|
+
| Source | `webhooks.sentry()` |
|
|
31
|
+
| Verification | HMAC-SHA256 in `sentry-hook-signature` |
|
|
32
|
+
| Credential | The integration's Client Secret, issued by Sentry |
|
|
33
|
+
| Event type | `header.sentry-hook-resource` |
|
|
34
|
+
| Sentry docs | [Sentry webhook docs](https://docs.sentry.io/integrations/integration-platform/webhooks/) |
|
|
35
|
+
|
|
36
|
+
## Set up Sentry
|
|
37
|
+
|
|
38
|
+
1. Start `trigger dev` or deploy, then copy the endpoint's **Webhook URL** from the **Webhooks** page.
|
|
39
|
+
2. In Sentry, open **Settings > Developer Settings > Custom Integrations** and create an internal integration. Set its **Webhook URL** to the webhook URL, turn on alert rule action if you want alerts, and enable the resource types (such as issue, error or comment) your subscribers need.
|
|
40
|
+
3. Sentry signs webhooks with the integration's **Client Secret**. Copy it from the integration's page, then choose **Set signing secret** on the Trigger.dev endpoint.
|
|
41
|
+
4. Send a test event from Sentry, or use the endpoint's **Test** tab, and check the endpoint's **Deliveries** tab. See [Verify the connection](/webhooks/connect#verify-the-connection) if nothing arrives.
|