Skip to content

Commit 4264bdf

Browse files
authored
Added use cases section in the docs (#2641)
* Started adding use cases pages * Updates * More improvements * Improved diagrams * Added overview page * More copy + diagram updates * Improved diagram titles * Further diagram improvements * Corrected workflow * Updated copy * Typos * Updated intro file * Reverted aiRunFilterService.server.ts
1 parent bf6735b commit 4264bdf

File tree

8 files changed

+690
-0
lines changed

8 files changed

+690
-0
lines changed

docs/docs.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,16 @@
333333
}
334334
]
335335
},
336+
{
337+
"group": "Use cases",
338+
"pages": [
339+
"guides/use-cases/overview",
340+
"guides/use-cases/data-processing-etl",
341+
"guides/use-cases/media-generation",
342+
"guides/use-cases/media-processing",
343+
"guides/use-cases/marketing"
344+
]
345+
},
336346
{
337347
"group": "Example projects",
338348
"pages": [

docs/guides/introduction.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ mode: "center"
1515
<Card title="SvelteKit" img="/images/logo-svelte.png" href="/guides/community/sveltekit" />
1616
</CardGroup>
1717

18+
import UseCasesCards from "/snippets/use-cases-cards.mdx";
19+
1820
## Guides
1921

2022
Get set up fast using our detailed walk-through guides.
@@ -39,6 +41,8 @@ Get set up fast using our detailed walk-through guides.
3941
| [Using webhooks in Next.js](/guides/frameworks/nextjs-webhooks) | Trigger tasks from a webhook in Next.js |
4042
| [Using webhooks in Remix](/guides/frameworks/remix-webhooks) | Trigger tasks from a webhook in Remix |
4143

44+
<UseCasesCards />
45+
4246
## Example projects
4347

4448
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.
Lines changed: 159 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,159 @@
1+
---
2+
title: "Data processing & ETL workflows"
3+
sidebarTitle: "Data processing & ETL"
4+
description: "Learn how to use Trigger.dev for data processing and ETL (Extract, Transform, Load), including web scraping, database synchronization, batch enrichment and more."
5+
---
6+
7+
import UseCasesCards from "/snippets/use-cases-cards.mdx";
8+
9+
## Overview
10+
11+
Build complex data pipelines that process large datasets without timeouts. Handle streaming analytics, batch enrichment, web scraping, database sync, and file processing with automatic retries and progress tracking.
12+
13+
## Featured examples
14+
15+
<CardGroup cols={3}>
16+
<Card
17+
title="Realtime CSV importer"
18+
icon="book"
19+
href="/guides/example-projects/realtime-csv-importer"
20+
>
21+
Import CSV files with progress streamed live to frontend.
22+
</Card>
23+
<Card title="Web scraper with BrowserBase" icon="book" href="/guides/examples/scrape-hacker-news">
24+
Scrape websites using BrowserBase and Puppeteer.
25+
</Card>
26+
<Card
27+
title="Supabase database webhooks"
28+
icon="book"
29+
href="/guides/frameworks/supabase-edge-functions-database-webhooks"
30+
>
31+
Trigger tasks from Supabase database webhooks.
32+
</Card>
33+
</CardGroup>
34+
35+
## Benefits of using Trigger.dev for data processing & ETL workflows
36+
37+
**Process datasets for hours without timeouts:** Handle multi-hour transformations, large file processing, or complete database exports. No execution time limits.
38+
39+
**Parallel processing with built-in rate limiting:** Process thousands of records simultaneously while respecting API rate limits. Scale efficiently without overwhelming downstream services.
40+
41+
**Stream progress to your users in real-time:** Show row-by-row processing status updating live in your dashboard. Users see exactly where processing is and how long remains.
42+
43+
## Production use cases
44+
45+
<CardGroup cols={1}>
46+
<Card title="MagicSchool AI customer story" href="https://trigger.dev/customers/magicschool-ai-customer-story">
47+
48+
Read how MagicSchool AI uses Trigger.dev to generate insights from millions of student interactions.
49+
50+
</Card>
51+
52+
<Card title="Comp AI customer story" href="https://trigger.dev/customers/comp-ai-customer-story">
53+
54+
Read how Comp AI uses Trigger.dev to automate evidence collection at scale, powering their open source, AI-driven compliance platform.
55+
56+
</Card>
57+
<Card title="Midday customer story" href="https://trigger.dev/customers/midday-customer-story">
58+
59+
Read how Midday use Trigger.dev to sync large volumes of bank transactions in their financial management platform.
60+
61+
</Card>
62+
</CardGroup>
63+
64+
## Example workflow patterns
65+
66+
<Tabs>
67+
<Tab title="CSV file import">
68+
Simple CSV import pipeline. Receives file upload, parses CSV rows, validates data, imports to database with progress tracking.
69+
70+
<div align="center">
71+
72+
```mermaid
73+
graph TB
74+
A[importCSV] --> B[parseCSVFile]
75+
B --> C[validateRows]
76+
C --> D[bulkInsertToDB]
77+
D --> E[notifyCompletion]
78+
```
79+
80+
</div>
81+
</Tab>
82+
83+
<Tab title="Multi-source ETL pipeline">
84+
**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.
85+
86+
<div align="center">
87+
88+
```mermaid
89+
graph TB
90+
A[runETLPipeline] --> B[coordinateExtraction]
91+
B --> C[batchTriggerAndWait]
92+
93+
C --> D[extractFromAPI]
94+
C --> E[extractFromDatabase]
95+
C --> F[extractFromS3]
96+
97+
D --> G[transformData]
98+
E --> G
99+
F --> G
100+
101+
G --> H[validateData]
102+
H --> I[loadToWarehouse]
103+
```
104+
105+
</div>
106+
</Tab>
107+
108+
<Tab title="Parallel web scraping">
109+
**Coordinator pattern with browser automation**. Launches headless browsers in parallel to scrape multiple pages, extracts structured data, cleans and normalizes content, stores in database.
110+
111+
<div align="center">
112+
113+
```mermaid
114+
graph TB
115+
A[scrapeSite] --> B[coordinateScraping]
116+
B --> C[batchTriggerAndWait]
117+
118+
C --> D[scrapePage1]
119+
C --> E[scrapePage2]
120+
C --> F[scrapePageN]
121+
122+
D --> G[cleanData]
123+
E --> G
124+
F --> G
125+
126+
G --> H[normalizeData]
127+
H --> I[storeInDatabase]
128+
```
129+
130+
</div>
131+
</Tab>
132+
133+
<Tab title="Batch data enrichment">
134+
**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.
135+
136+
<div align="center">
137+
138+
```mermaid
139+
graph TB
140+
A[enrichRecords] --> B[fetchRecordsToEnrich]
141+
B --> C[coordinateEnrichment]
142+
C --> D[batchTriggerAndWait]
143+
144+
D --> E[enrichRecord1]
145+
D --> F[enrichRecord2]
146+
D --> G[enrichRecordN]
147+
148+
E --> H[validateEnrichedData]
149+
F --> H
150+
G --> H
151+
152+
H --> I[updateDatabase]
153+
```
154+
155+
</div>
156+
</Tab>
157+
</Tabs>
158+
159+
<UseCasesCards />
Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
1+
---
2+
title: "Marketing workflows"
3+
sidebarTitle: "Marketing"
4+
description: "Learn how to use Trigger.dev for marketing workflows, including drip campaigns, behavioral triggers, personalization engines, and AI-powered content workflows"
5+
---
6+
7+
import UseCasesCards from "/snippets/use-cases-cards.mdx";
8+
9+
## Overview
10+
11+
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.
12+
13+
## Featured examples
14+
15+
<CardGroup cols={3}>
16+
<Card
17+
title="Email sequences with Resend"
18+
icon="book"
19+
href="/guides/examples/resend-email-sequence"
20+
>
21+
Send multi-day email sequences with wait delays between messages.
22+
</Card>
23+
<Card
24+
title="Product image generator"
25+
icon="book"
26+
href="/guides/example-projects/product-image-generator"
27+
>
28+
Transform product photos into professional marketing images using Replicate.
29+
</Card>
30+
<Card
31+
title="Human-in-the-loop workflow"
32+
icon="book"
33+
href="/guides/example-projects/human-in-the-loop-workflow"
34+
>
35+
Approve marketing content using a human-in-the-loop workflow.
36+
</Card>
37+
</CardGroup>
38+
39+
## Benefits of using Trigger.dev for marketing workflows
40+
41+
**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.
42+
43+
**Guaranteed delivery:** Messages send exactly once, even after retries. Personalized content isn't regenerated on failure.
44+
45+
**Scale without limits:** Process thousands in parallel while respecting rate limits. Send to entire segments without overwhelming APIs.
46+
47+
## Production use cases
48+
49+
<Card title="Icon customer story" href="https://trigger.dev/customers/icon-customer-story">
50+
51+
Read how Icon uses Trigger.dev to process and generate thousands of videos per month for their AI-driven video creation platform.
52+
53+
</Card>
54+
55+
## Example workflow patterns
56+
57+
<Tabs>
58+
<Tab title="Drip email campaign">
59+
Simple drip campaign. User signs up, waits specified delay, sends personalized email, tracks engagement.
60+
61+
<div align="center">
62+
63+
```mermaid
64+
graph TB
65+
A[userCreateAccount] --> B[sendWelcomeEmail]
66+
B --> C[wait.for 24h]
67+
C --> D[sendProductTipsEmail]
68+
D --> E[wait.for 7d]
69+
E --> F[sendFeedbackEmail]
70+
71+
```
72+
73+
</div>
74+
</Tab>
75+
76+
<Tab title="Multi-channel campaigns">
77+
**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.
78+
79+
<div align="center">
80+
81+
```mermaid
82+
graph TB
83+
A[startCampaign] --> B[fetchUserProfile]
84+
B --> C[selectChannel]
85+
C --> D{Preferred<br/>Channel?}
86+
87+
D -->|Email| E[sendEmail1]
88+
D -->|SMS| F[sendSMS1]
89+
D -->|Push| G[sendPush1]
90+
91+
E --> H[wait.for 2d]
92+
F --> H
93+
G --> H
94+
95+
H --> I[sendFollowUp]
96+
I --> J[trackConversion]
97+
```
98+
99+
</div>
100+
</Tab>
101+
102+
<Tab title="AI content with approval">
103+
**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.
104+
105+
<div align="center">
106+
107+
```mermaid
108+
graph TB
109+
A[createCampaignAssets] --> B[generateAIContent]
110+
B --> C[wait.forToken approval]
111+
C --> D{Approved?}
112+
113+
D -->|Yes| E[publishToChannels]
114+
D -->|Needs revision| F[applyFeedback]
115+
F --> B
116+
```
117+
118+
</div>
119+
</Tab>
120+
121+
<Tab title="Survey response enrichment">
122+
**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.
123+
124+
<div align="center">
125+
126+
```mermaid
127+
graph TB
128+
A[processSurveyResponse] --> B[coordinateEnrichment]
129+
B --> C[batchTriggerAndWait]
130+
131+
C --> D[fetchCRMData]
132+
C --> E[fetchAnalytics]
133+
C --> F[fetchBehaviorData]
134+
135+
D --> G[analyzeAndScore]
136+
E --> G
137+
F --> G
138+
139+
G --> H[updateCRMProfile]
140+
H --> I[triggerFollowUp]
141+
```
142+
143+
</div>
144+
</Tab>
145+
</Tabs>
146+
147+
<UseCasesCards />

0 commit comments

Comments
 (0)