diff --git a/docs/snippets/use-cases-cards.mdx b/docs/snippets/use-cases-cards.mdx
index 2ea6744461..b43f8e5c9d 100644
--- a/docs/snippets/use-cases-cards.mdx
+++ b/docs/snippets/use-cases-cards.mdx
@@ -1,46 +1,24 @@
-## Use cases
+## Featured use cases
- Build intelligent workflows that combine AI processing with human oversight. From research
- agents to customer support systems and content moderation pipelines.
+ Build complex data pipelines that process large datasets without timeouts.
-
- Transform and move data reliably at any scale. Whether streaming real-time analytics, enriching
- customer records, or synchronizing large datasets.
-
-
- Create scalable content workflows from single assets to thousands. Generate PDFs, videos, or
- social media content with progress tracking and approval steps.
+
+ Batch process videos, images, audio, and documents with no execution time limits.
- Generate images, videos, and audio with AI models. Handle unpredictable API latencies,
- manage rate limits, and stream progress in real-time.
+ Generate images, videos, audio, documents and other media using AI models.
-
- Process audio, video, and images efficiently with adaptive workflows. From real-time
- transcription to batch optimization.
-
-
- Orchestrate campaigns that respond dynamically to user behavior. Build drip sequences,
- personalization engines, and analytics workflows.
+
+ Build drip campaigns, create marketing content, and orchestrate multi-channel campaigns.
From 77ab65b306e2d143e81d271e4eebeebca918dba0 Mon Sep 17 00:00:00 2001
From: D-K-P <8297864+D-K-P@users.noreply.github.com>
Date: Wed, 29 Oct 2025 14:57:09 +0000
Subject: [PATCH 07/13] Improved diagram titles
---
docs/guides/use-cases/data-processing-etl.mdx | 8 ++++----
docs/guides/use-cases/marketing.mdx | 8 ++++----
docs/guides/use-cases/media-generation.mdx | 8 ++++----
3 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/docs/guides/use-cases/data-processing-etl.mdx b/docs/guides/use-cases/data-processing-etl.mdx
index 197915edcc..806eb31a3b 100644
--- a/docs/guides/use-cases/data-processing-etl.mdx
+++ b/docs/guides/use-cases/data-processing-etl.mdx
@@ -64,7 +64,7 @@ Read how Midday use Trigger.dev to sync large volumes of bank transactions in th
## Example worfklow patterns
-
+
Simple CSV import pipeline. Receives file upload, parses CSV rows, validates data, imports to database with progress tracking.
@@ -80,7 +80,7 @@ graph TB
-
+
**Coordinator pattern with parallel extraction**. Batch triggers parallel extraction from multiple sources (APIs, databases, S3), transforms and validates data, loads to data warehouse with monitoring.
@@ -105,7 +105,7 @@ graph TB
-
+
**Coordinator pattern with browser automation**. Launches headless browsers in parallel to scrape multiple pages, extracts structured data, cleans and normalizes content, stores in database.
@@ -130,7 +130,7 @@ graph TB
-
+
**Coordinator pattern with rate limiting**. Fetches records needing enrichment, batch triggers parallel API calls with configurable concurrency to respect rate limits, validates enriched data, updates database.
diff --git a/docs/guides/use-cases/marketing.mdx b/docs/guides/use-cases/marketing.mdx
index a32d55db6a..a49a3030de 100644
--- a/docs/guides/use-cases/marketing.mdx
+++ b/docs/guides/use-cases/marketing.mdx
@@ -71,7 +71,7 @@ graph TB
-
+
**Router pattern with delay orchestration**. User action triggers campaign, router selects channel based on preferences (email/SMS/push), coordinates multi-day sequence with delays between messages, tracks engagement across channels.
@@ -84,7 +84,7 @@ graph TB
D -->|Email| E[sendEmail1]
D -->|SMS| F[sendSMS1]
- D -->|Push| G[sendPush1]
+ D -->|Social media post| G[postToX1]
E --> H[wait.for 2d]
F --> H
@@ -97,7 +97,7 @@ graph TB
-
+
**Supervisor pattern with approval gate**. Generates AI marketing content (images, copy, assets), pauses with wait.for for human review, applies revisions if needed, publishes to channels after approval.
@@ -116,7 +116,7 @@ graph TB
-
+
**Coordinator pattern with enrichment**. User completes survey, batch triggers parallel enrichment from CRM/analytics, analyzes and scores responses, updates customer profiles, triggers personalized follow-up campaigns.
diff --git a/docs/guides/use-cases/media-generation.mdx b/docs/guides/use-cases/media-generation.mdx
index db8321e47a..cdaf2ae27b 100644
--- a/docs/guides/use-cases/media-generation.mdx
+++ b/docs/guides/use-cases/media-generation.mdx
@@ -64,7 +64,7 @@ Read how Papermark process thousands of documents per month using Trigger.dev.
## Example worfklow patterns
-
+
Simple AI image generation. Receives prompt and parameters, calls OpenAI DALL·E 3, post-processes result, uploads to storage.
@@ -79,7 +79,7 @@ graph TB
-
+
**Coordinator pattern with rate limiting**. Receives batch of generation requests, coordinates parallel processing with configurable concurrency to respect API rate limits, validates outputs, stores results.
@@ -104,7 +104,7 @@ graph TB
-
+
**Coordinator pattern with sequential processing**. Generates initial content with AI, applies style transfer or enhancement, upscales resolution, optimizes and compresses for delivery.
@@ -121,7 +121,7 @@ graph TB
-
+
**Supervisor pattern with approval gate**. Generates AI content, pauses execution with wait.for to allow human review, applies feedback if needed, publishes approved content.
From 59ac4f730121d59dcb46ca5a0ef951d19369e6b6 Mon Sep 17 00:00:00 2001
From: D-K-P <8297864+D-K-P@users.noreply.github.com>
Date: Wed, 29 Oct 2025 15:07:12 +0000
Subject: [PATCH 08/13] Further diagram improvements
---
docs/guides/use-cases/marketing.mdx | 12 +++++---
docs/guides/use-cases/media-generation.mdx | 36 +++++++++++-----------
docs/guides/use-cases/media-processing.mdx | 17 ++++++----
3 files changed, 36 insertions(+), 29 deletions(-)
diff --git a/docs/guides/use-cases/marketing.mdx b/docs/guides/use-cases/marketing.mdx
index a49a3030de..3a9d4126cb 100644
--- a/docs/guides/use-cases/marketing.mdx
+++ b/docs/guides/use-cases/marketing.mdx
@@ -8,7 +8,7 @@ import UseCasesCards from "/snippets/use-cases-cards.mdx";
## Overview
-Build marketing workflows from drip campaigns to orchestrating multi-channel campaigns. Handle multi-day sequences, behavioral triggers, dynamic content generation, and live analytics, all with automatic retries and progress tracking.
+Build marketing workflows from email drip sequences to orchestrating full multi-channel campaigns. Handle multi-day sequences, behavioral triggers, dynamic content generation, and build live analytics dashboards.
## Featured examples
@@ -62,10 +62,12 @@ Read how Icon uses Trigger.dev to process and generate thousands of videos per m
```mermaid
graph TB
- A[startDripCampaign] --> B[fetchUserData]
+ A[userCreateAccount] --> B[sendWelcomeEmail]
B --> C[wait.for 24h]
- C --> D[sendPersonalizedEmail]
- D --> E[trackEngagement]
+ C --> D[sendProductTipsEmail]
+ D --> E[wait.for 7d]
+ E --> F[sendFeedbackEmail]
+
```
@@ -84,7 +86,7 @@ graph TB
D -->|Email| E[sendEmail1]
D -->|SMS| F[sendSMS1]
- D -->|Social media post| G[postToX1]
+ D -->|Push| G[sendPush1]
E --> H[wait.for 2d]
F --> H
diff --git a/docs/guides/use-cases/media-generation.mdx b/docs/guides/use-cases/media-generation.mdx
index cdaf2ae27b..6c006aecd8 100644
--- a/docs/guides/use-cases/media-generation.mdx
+++ b/docs/guides/use-cases/media-generation.mdx
@@ -64,6 +64,24 @@ Read how Papermark process thousands of documents per month using Trigger.dev.
## Example worfklow patterns
+
+ **Supervisor pattern with approval gate**. Generates AI content, pauses execution with wait.forToken to allow human review, applies feedback if needed, publishes approved content.
+
+
+
+```mermaid
+graph TB
+ A[generateContent] --> B[createWithAI]
+ B --> C[wait.forToken approval]
+ C --> D{Approved?}
+
+ D -->|Yes| E[publishContent]
+ D -->|Needs revision| F[applyFeedback]
+ F --> B
+```
+
+
+
Simple AI image generation. Receives prompt and parameters, calls OpenAI DALL·E 3, post-processes result, uploads to storage.
@@ -121,24 +139,6 @@ graph TB
-
- **Supervisor pattern with approval gate**. Generates AI content, pauses execution with wait.for to allow human review, applies feedback if needed, publishes approved content.
-
-
-
-```mermaid
-graph TB
- A[generateContent] --> B[createWithAI]
- B --> C[wait.for approval]
- C --> D{Approved?}
-
- D -->|Yes| E[publishContent]
- D -->|Needs revision| F[applyFeedback]
- F --> B
-```
-
-
-
diff --git a/docs/guides/use-cases/media-processing.mdx b/docs/guides/use-cases/media-processing.mdx
index 05b1120735..d30cd99a4f 100644
--- a/docs/guides/use-cases/media-processing.mdx
+++ b/docs/guides/use-cases/media-processing.mdx
@@ -44,17 +44,22 @@ Build media processing pipelines that handle large files and long-running operat
- Simple video transcoding pipeline. Downloads video from storage, transcodes to multiple formats, extracts thumbnail, uploads results.
+ Simple video transcoding pipeline. Downloads video from storage, batch triggers parallel transcoding to multiple formats and thumbnail extraction, uploads all results.
```mermaid
graph TB
A[processVideo] --> B[downloadFromStorage]
- B --> C[transcodeToHD]
- C --> D[transcodeToSD]
- D --> E[extractThumbnail]
- E --> F[uploadToStorage]
+ B --> C[batchTriggerAndWait]
+
+ C --> D[transcodeToHD]
+ C --> E[transcodeToSD]
+ C --> F[extractThumbnail]
+
+ D --> G[uploadToStorage]
+ E --> G
+ F --> G
```
@@ -150,7 +155,7 @@ graph TB
- **Router pattern with human-in-the-loop**. Detects file type and routes to appropriate processor, classifies document with AI to determine type (invoice/contract/receipt), extracts structured data fields, optionally pauses with wait.for for human approval.
+ **Router pattern with human-in-the-loop**. Detects file type and routes to appropriate processor, classifies document with AI to determine type (invoice/contract/receipt), extracts structured data fields, optionally pauses with wait.forToken for human approval.
From 001e09493ff2ba3be4c50ae0651ddb43e22ba16d Mon Sep 17 00:00:00 2001
From: D-K-P <8297864+D-K-P@users.noreply.github.com>
Date: Wed, 29 Oct 2025 15:18:21 +0000
Subject: [PATCH 09/13] Corrected workflow
---
docs/guides/use-cases/marketing.mdx | 4 ++--
docs/guides/use-cases/media-processing.mdx | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/docs/guides/use-cases/marketing.mdx b/docs/guides/use-cases/marketing.mdx
index 3a9d4126cb..dc2545952d 100644
--- a/docs/guides/use-cases/marketing.mdx
+++ b/docs/guides/use-cases/marketing.mdx
@@ -100,14 +100,14 @@ graph TB
- **Supervisor pattern with approval gate**. Generates AI marketing content (images, copy, assets), pauses with wait.for for human review, applies revisions if needed, publishes to channels after approval.
+ **Supervisor pattern with approval gate**. Generates AI marketing content (images, copy, assets), pauses with wait.forToken for human review, applies revisions if needed, publishes to channels after approval.
```mermaid
graph TB
A[createCampaignAssets] --> B[generateAIContent]
- B --> C[wait.for approval]
+ B --> C[wait.forToken approval]
C --> D{Approved?}
D -->|Yes| E[publishToChannels]
diff --git a/docs/guides/use-cases/media-processing.mdx b/docs/guides/use-cases/media-processing.mdx
index d30cd99a4f..d0ab5520e7 100644
--- a/docs/guides/use-cases/media-processing.mdx
+++ b/docs/guides/use-cases/media-processing.mdx
@@ -179,7 +179,7 @@ graph TB
H --> J
I --> J
- J -->|Yes| K[wait.for approval]
+ J -->|Yes| K[wait.forToken approval]
J -->|No| L[processAndIntegrate]
K --> L
```
From ce7e7ad95e0d17c7fb401efc7c8e3f6f5c5018c7 Mon Sep 17 00:00:00 2001
From: D-K-P <8297864+D-K-P@users.noreply.github.com>
Date: Wed, 29 Oct 2025 17:16:54 +0000
Subject: [PATCH 10/13] Updated copy
---
docs/guides/use-cases/marketing.mdx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/guides/use-cases/marketing.mdx b/docs/guides/use-cases/marketing.mdx
index dc2545952d..3f1f879a7e 100644
--- a/docs/guides/use-cases/marketing.mdx
+++ b/docs/guides/use-cases/marketing.mdx
@@ -38,7 +38,7 @@ Build marketing workflows from email drip sequences to orchestrating full multi-
## Benefits of using Trigger.dev for marketing workflows
-**Delays without idle costs:** Wait hours or weeks between steps. Pay only for active compute, not wait time. Perfect for drip campaigns and scheduled follow-ups.
+**Delays without idle costs:** Wait hours or weeks between steps. Waits over 5 seconds are automatically checkpointed and don't count towards compute usage. Perfect for drip campaigns and scheduled follow-ups.
**Guaranteed delivery:** Messages send exactly once, even after retries. Personalized content isn't regenerated on failure.
From 74f71391ff1b819a1f9deccc29c95db7ba6a4224 Mon Sep 17 00:00:00 2001
From: D-K-P <8297864+D-K-P@users.noreply.github.com>
Date: Wed, 29 Oct 2025 17:49:40 +0000
Subject: [PATCH 11/13] Typos
---
docs/guides/use-cases/data-processing-etl.mdx | 2 +-
docs/guides/use-cases/marketing.mdx | 2 +-
docs/guides/use-cases/media-generation.mdx | 2 +-
docs/guides/use-cases/media-processing.mdx | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/docs/guides/use-cases/data-processing-etl.mdx b/docs/guides/use-cases/data-processing-etl.mdx
index 806eb31a3b..f6bfdd6581 100644
--- a/docs/guides/use-cases/data-processing-etl.mdx
+++ b/docs/guides/use-cases/data-processing-etl.mdx
@@ -61,7 +61,7 @@ Read how Midday use Trigger.dev to sync large volumes of bank transactions in th
-## Example worfklow patterns
+## Example workflow patterns
diff --git a/docs/guides/use-cases/marketing.mdx b/docs/guides/use-cases/marketing.mdx
index 3f1f879a7e..83d08d95d9 100644
--- a/docs/guides/use-cases/marketing.mdx
+++ b/docs/guides/use-cases/marketing.mdx
@@ -52,7 +52,7 @@ Read how Icon uses Trigger.dev to process and generate thousands of videos per m
-## Example worfklow patterns
+## Example workflow patterns
diff --git a/docs/guides/use-cases/media-generation.mdx b/docs/guides/use-cases/media-generation.mdx
index 6c006aecd8..919440df5f 100644
--- a/docs/guides/use-cases/media-generation.mdx
+++ b/docs/guides/use-cases/media-generation.mdx
@@ -61,7 +61,7 @@ Read how Papermark process thousands of documents per month using Trigger.dev.
-## Example worfklow patterns
+## Example workflow patterns
diff --git a/docs/guides/use-cases/media-processing.mdx b/docs/guides/use-cases/media-processing.mdx
index d0ab5520e7..e0f6aa8719 100644
--- a/docs/guides/use-cases/media-processing.mdx
+++ b/docs/guides/use-cases/media-processing.mdx
@@ -40,7 +40,7 @@ Build media processing pipelines that handle large files and long-running operat
**Parallel processing with resource control:** Process hundreds of files simultaneously with configurable concurrency limits. Control resource usage without overwhelming infrastructure.
-## Example worfklow patterns
+## Example workflow patterns
From 9e64af1cde212c30f6d469db7851b44fed0d0a8f Mon Sep 17 00:00:00 2001
From: D-K-P <8297864+D-K-P@users.noreply.github.com>
Date: Wed, 29 Oct 2025 18:02:00 +0000
Subject: [PATCH 12/13] Updated intro file
---
docs/guides/introduction.mdx | 37 +++---------------------------------
1 file changed, 3 insertions(+), 34 deletions(-)
diff --git a/docs/guides/introduction.mdx b/docs/guides/introduction.mdx
index 2af52dc13b..13d6f96431 100644
--- a/docs/guides/introduction.mdx
+++ b/docs/guides/introduction.mdx
@@ -15,40 +15,7 @@ mode: "center"
-## Use cases
-
-Explore comprehensive guides for common use cases and workflows:
-
-
-
- Transform and move data reliably at any scale. Whether streaming real-time analytics, enriching
- customer records, or synchronizing large datasets.
-
-
- Create scalable content workflows from single assets to thousands. Generate PDFs, videos, or
- social media content with progress tracking and approval steps.
-
-
- Process audio, video, and images efficiently with adaptive workflows. From real-time
- transcription to batch optimization.
-
-
- Orchestrate campaigns that respond dynamically to user behavior. Build drip sequences,
- personalization engines, and analytics workflows.
-
-
+import UseCasesCards from "/snippets/use-cases-cards.mdx";
## Guides
@@ -74,6 +41,8 @@ Get set up fast using our detailed walk-through guides.
| [Using webhooks in Next.js](/guides/frameworks/nextjs-webhooks) | Trigger tasks from a webhook in Next.js |
| [Using webhooks in Remix](/guides/frameworks/remix-webhooks) | Trigger tasks from a webhook in Remix |
+
+
## Example projects
Example projects are full projects with example repos you can fork and use. These are a great way of learning how to use Trigger.dev in your projects.
From 8184ea288ac0f5d45285193069ddff95bcdc953e Mon Sep 17 00:00:00 2001
From: D-K-P <8297864+D-K-P@users.noreply.github.com>
Date: Thu, 30 Oct 2025 09:18:09 +0000
Subject: [PATCH 13/13] Reverted aiRunFilterService.server.ts
---
.../v3/services/aiRunFilterService.server.ts | 60 +++++++------------
1 file changed, 23 insertions(+), 37 deletions(-)
diff --git a/apps/webapp/app/v3/services/aiRunFilterService.server.ts b/apps/webapp/app/v3/services/aiRunFilterService.server.ts
index 0dcab5c04e..4ce12b9455 100644
--- a/apps/webapp/app/v3/services/aiRunFilterService.server.ts
+++ b/apps/webapp/app/v3/services/aiRunFilterService.server.ts
@@ -30,7 +30,7 @@ const AIFilterResponseSchema = z
export interface QueryQueues {
query(
search: string | undefined,
- type: "task" | "custom" | undefined,
+ type: "task" | "custom" | undefined
): Promise<{
queues: string[];
}>;
@@ -39,14 +39,14 @@ export interface QueryQueues {
export interface QueryVersions {
query(
versionPrefix: string | undefined,
- isCurrent: boolean | undefined,
+ isCurrent: boolean | undefined
): Promise<
| {
- versions: string[];
- }
+ versions: string[];
+ }
| {
- version: string;
- }
+ version: string;
+ }
>;
}
@@ -64,13 +64,13 @@ export interface QueryTasks {
export type AIFilterResult =
| {
- success: true;
- filters: TaskRunListSearchFilters;
- }
+ success: true;
+ filters: TaskRunListSearchFilters;
+ }
| {
- success: false;
- error: string;
- };
+ success: false;
+ error: string;
+ };
export class AIRunFilterService {
constructor(
@@ -80,7 +80,7 @@ export class AIRunFilterService {
queryQueues: QueryQueues;
queryTasks: QueryTasks;
},
- private readonly model: LanguageModelV1 = openai("gpt-4o-mini"),
+ private readonly model: LanguageModelV1 = openai("gpt-4o-mini")
) {}
async call(text: string, environmentId: string): Promise {
@@ -92,9 +92,7 @@ export class AIRunFilterService {
lookupTags: tool({
description: "Look up available tags in the environment",
parameters: z.object({
- query: z.string().optional().describe(
- "Optional search query to filter tags",
- ),
+ query: z.string().optional().describe("Optional search query to filter tags"),
}),
execute: async ({ query }) => {
return await this.queryFns.queryTags.query(query);
@@ -112,27 +110,22 @@ export class AIRunFilterService {
.string()
.optional()
.describe(
- "Optional version name to filter (e.g. 20250701.1), it uses contains to compare. Don't pass `latest` or `current`, the query has to be in the reverse date format specified. Leave out to get all recent versions.",
+ "Optional version name to filter (e.g. 20250701.1), it uses contains to compare. Don't pass `latest` or `current`, the query has to be in the reverse date format specified. Leave out to get all recent versions."
),
}),
execute: async ({ versionPrefix, isCurrent }) => {
- return await this.queryFns.queryVersions.query(
- versionPrefix,
- isCurrent,
- );
+ return await this.queryFns.queryVersions.query(versionPrefix, isCurrent);
},
}),
lookupQueues: tool({
description: "Look up available queues in the environment",
parameters: z.object({
- query: z.string().optional().describe(
- "Optional search query to filter queues",
- ),
+ query: z.string().optional().describe("Optional search query to filter queues"),
type: z
.enum(["task", "custom"])
.optional()
.describe(
- "Filter by queue type, only do this if the user specifies it explicitly.",
+ "Filter by queue type, only do this if the user specifies it explicitly."
),
}),
execute: async ({ query, type }) => {
@@ -149,15 +142,12 @@ export class AIRunFilterService {
}),
},
maxSteps: 5,
- system:
- `You are an AI assistant that converts natural language descriptions into structured filter parameters for a task run filtering system.
+ system: `You are an AI assistant that converts natural language descriptions into structured filter parameters for a task run filtering system.
Available filter options:
- statuses: Array of run statuses (PENDING, EXECUTING, COMPLETED_SUCCESSFULLY, COMPLETED_WITH_ERRORS, CANCELED, TIMED_OUT, CRASHED, etc.)
- period: Time period string (e.g., "1h", "7d", "30d", "1y")
- - from/to: ISO date string. Today's date is ${
- new Date().toISOString()
- }, if they only specify a day use the current month. If they don't specify a year use the current year. If they don't specify a time of day use midnight.
+ - from/to: ISO date string. Today's date is ${new Date().toISOString()}, if they only specify a day use the current month. If they don't specify a year use the current year. If they don't specify a time of day use midnight.
- tags: Array of tag names to filter by. Use the lookupTags tool to get the tags.
- tasks: Array of task identifiers to filter by. Use the lookupTasks tool to get the tasks.
- machines: Array of machine presets (micro, small, small-2x, medium, large, xlarge, etc.)
@@ -169,7 +159,7 @@ export class AIRunFilterService {
- scheduleId: Specific schedule ID to filter by
- Common workflows to recognize:
+ Common patterns to recognize:
- "failed runs" → statuses: ["COMPLETED_WITH_ERRORS", "CRASHED", "TIMED_OUT", "SYSTEM_FAILURE"].
- "runs not dequeued yet" → statuses: ["PENDING", "PENDING_VERSION", "DELAYED"]
- If they say "only failed" then only use "COMPLETED_WITH_ERRORS".
@@ -242,9 +232,7 @@ export class AIRunFilterService {
}
// Validate the filters against the schema to catch any issues
- const validationResult = AIFilters.safeParse(
- result.experimental_output.filters,
- );
+ const validationResult = AIFilters.safeParse(result.experimental_output.filters);
if (!validationResult.success) {
logger.error("AI filter validation failed", {
errors: validationResult.error.errors,
@@ -264,9 +252,7 @@ export class AIRunFilterService {
from: validationResult.data.from
? new Date(validationResult.data.from).getTime()
: undefined,
- to: validationResult.data.to
- ? new Date(validationResult.data.to).getTime()
- : undefined,
+ to: validationResult.data.to ? new Date(validationResult.data.to).getTime() : undefined,
},
};
} catch (error) {