Skip to content

Commit ebe918e

Browse files
committed
Added smart spreadsheet docs
1 parent 57ba252 commit ebe918e

File tree

4 files changed

+74
-0
lines changed

4 files changed

+74
-0
lines changed

docs/docs.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,7 @@
367367
"guides/example-projects/product-image-generator",
368368
"guides/example-projects/realtime-csv-importer",
369369
"guides/example-projects/realtime-fal-ai",
370+
"guides/example-projects/smart-spreadsheet",
370371
"guides/example-projects/turborepo-monorepo-prisma",
371372
"guides/example-projects/vercel-ai-sdk-deep-research",
372373
"guides/example-projects/vercel-ai-sdk-image-generator"

docs/guides/ai-agents/overview.mdx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,13 @@ description: "Real world AI agent example tasks using Trigger.dev"
5959
>
6060
Use the Vercel AI SDK to generate comprehensive PDF reports using a deep research agent.
6161
</Card>
62+
<Card
63+
title="Smart Spreadsheet"
64+
icon="table"
65+
href="/guides/example-projects/smart-spreadsheet"
66+
>
67+
Enrich company data using Exa search and Claude with real-time streaming results.
68+
</Card>
6269
</CardGroup>
6370

6471
## Agent fundamentals
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
---
2+
title: "Smart Spreadsheet"
3+
sidebarTitle: "Smart Spreadsheet"
4+
description: "An AI-powered company enrichment tool that uses Exa search and Claude to extract verified company data with source attribution."
5+
---
6+
7+
import RealtimeLearnMore from "/snippets/realtime-learn-more.mdx";
8+
9+
## Overview
10+
11+
Smart Spreadsheet is an AI-powered tool that enriches company data on demand. Input a company name or website URL and get verified information including industry, headcount, and funding details; each with source attribution. Results stream to the frontend in real-time as they're processed.
12+
13+
- A [Next.js](https://nextjs.org/) app with [Trigger.dev](https://trigger.dev/) for background tasks
14+
- [Exa](https://exa.ai/) – an AI-native search engine that returns clean, structured content ready for LLM extraction
15+
- [Claude](https://anthropic.com/) via the [Vercel AI SDK](https://sdk.vercel.ai/) for data extraction
16+
- [Supabase](https://supabase.com/) PostgreSQL database for persistence
17+
- Trigger.dev [Realtime](/realtime/overview) to stream updates to the frontend
18+
19+
## Video
20+
21+
<video
22+
controls
23+
className="w-full aspect-video"
24+
src="https://content.trigger.dev/smart-spreadsheet.mp4"
25+
></video>
26+
27+
## GitHub repo
28+
29+
<Card
30+
title="View the Smart Spreadsheet repo"
31+
icon="GitHub"
32+
href="https://github.com/triggerdotdev/examples/tree/main/smart-spreadsheet"
33+
>
34+
Click here to view the full code for this project in our examples repository on GitHub. You can
35+
fork it and use it as a starting point for your own project.
36+
</Card>
37+
38+
## How it works
39+
40+
The enrichment workflow:
41+
42+
1. **Trigger enrichment** – User enters a company name or URL in the spreadsheet UI
43+
2. **Parallel data gathering** – Four subtasks run concurrently to fetch basic info, industry, employee count, and funding details
44+
3. **AI extraction** – Each subtask uses Exa search + Claude to extract structured data with source URLs
45+
4. **Real-time updates** – Results stream back to the frontend as each subtask completes
46+
5. **Persist results** – Enriched data is saved to Supabase with source attribution
47+
48+
## Features
49+
50+
- **Parallel processing** – All four enrichment categories run simultaneously using [batch.triggerByTaskAndWait](/triggering#batch-trigger-by-task-and-wait)
51+
- **Source attribution** – Every data point includes the URL it was extracted from
52+
- **Real-time streaming** – Results appear in the UI as they're processed using [Realtime](/realtime/overview)
53+
- **Structured extraction** – Zod schemas ensure consistent data output from Claude
54+
55+
## Relevant code
56+
57+
| File | Description |
58+
| ---------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------- |
59+
| [`src/trigger/enrich-company.ts`](https://github.com/triggerdotdev/examples/blob/main/smart-spreadsheet/src/trigger/enrich-company.ts) | Main orchestrator that triggers parallel subtasks and persists results |
60+
| [`src/trigger/get-basic-info.ts`](https://github.com/triggerdotdev/examples/blob/main/smart-spreadsheet/src/trigger/get-basic-info.ts) | Extracts company website and description |
61+
| [`src/trigger/get-industry.ts`](https://github.com/triggerdotdev/examples/blob/main/smart-spreadsheet/src/trigger/get-industry.ts) | Classifies company industry |
62+
| [`src/trigger/get-employee-count.ts`](https://github.com/triggerdotdev/examples/blob/main/smart-spreadsheet/src/trigger/get-employee-count.ts) | Finds employee headcount |
63+
| [`src/trigger/get-funding-round.ts`](https://github.com/triggerdotdev/examples/blob/main/smart-spreadsheet/src/trigger/get-funding-round.ts) | Discovers latest funding information |
64+
65+
<RealtimeLearnMore />

docs/guides/introduction.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ Example projects are full projects with example repos you can fork and use. Thes
6363
| [Python web crawler](/guides/python/python-crawl4ai) | Use Python, Crawl4AI and Playwright to create a headless web crawler with Trigger.dev. || [View the repo](https://github.com/triggerdotdev/examples/tree/main/python-crawl4ai) |
6464
| [Realtime CSV Importer](/guides/example-projects/realtime-csv-importer) | Upload a CSV file and see the progress of the task streamed to the frontend. | Next.js | [View the repo](https://github.com/triggerdotdev/examples/tree/main/realtime-csv-importer) |
6565
| [Realtime Fal.ai image generation](/guides/example-projects/realtime-fal-ai) | Generate an image from a prompt using Fal.ai and show the progress of the task on the frontend using Realtime. | Next.js | [View the repo](https://github.com/triggerdotdev/examples/tree/main/realtime-fal-ai-image-generation) |
66+
| [Smart Spreadsheet](/guides/example-projects/smart-spreadsheet) | Enrich company data using Exa search and Claude with real-time streaming results. | Next.js | [View the repo](https://github.com/triggerdotdev/examples/tree/main/smart-spreadsheet) |
6667
| [Turborepo monorepo with Prisma](/guides/example-projects/turborepo-monorepo-prisma) | Use Prisma in a Turborepo monorepo with Trigger.dev. | Next.js | [View the repo](https://github.com/triggerdotdev/examples/tree/main/monorepos/turborepo-prisma-tasks-package) |
6768
| [Vercel AI SDK image generator](/guides/example-projects/vercel-ai-sdk-image-generator) | Use the Vercel AI SDK to generate images from a prompt. | Next.js | [View the repo](https://github.com/triggerdotdev/examples/tree/main/vercel-ai-sdk-image-generator) |
6869
| [Vercel AI SDK deep research agent](/guides/example-projects/vercel-ai-sdk-deep-research) | Use the Vercel AI SDK to generate comprehensive PDF reports using a deep research agent. | Next.js | [View the repo](https://github.com/triggerdotdev/examples/tree/main/vercel-ai-sdk-deep-research-agent) |

0 commit comments

Comments
 (0)