GeezerVison is showing github.com — feat(apify): add Apify lead research example by Jakub-Vacek · Pull Request #153 · triggerdotdev/examples
Conversation
Pre-agreed with the Trigger.dev team on Discord: https://discord.com/channels/1066956501299777596/1534928934184157205
What
A new example, apify-lead-research: a sales lead research desk that runs Apify Actors three ways.
discover-leads: scheduled Google Maps scrape. run-actor starts the Actor with an ad-hoc webhook on a wait token, so the run suspends until Apify calls back on any terminal event. maxTotalChargeUsd and maxItems cap spend, and an aborted run still returns the leads scraped so far.
enrich-lead: a blocking Website Content Crawler run (too short to bother suspending), then the model extracts contacts and a summary. A queue caps it at 2 crawls so it stays under the account memory limit.
research-agent: a chat.agent with Apify Store search, input-schema, and run tools. runApifyActor has needsApproval: true, and the Next.js UI (useTriggerChatTransport + useChat, Apify dark theme) shows Approve and Deny for every paid run. Output is trimmed for context, with the datasetId for the rest.
The README covers when to use each pattern, setup, and a sample payload per task.
Testing
Typechecked and built against @trigger.dev/sdk 4.7.3 and apify-client 2.25.0, and every task ran against a live Apify account in dev:
discover-leads (coffee roastery | Prague, Czechia) returned leads and fanned out to enrich-lead. Compute was 1.9 s of about 80 s, suspended on wait.forToken().
enrich-lead: 5 parallel runs returned emails, phones, and social profiles on the first attempt.
run-actor: aborting mid-run returned the partial dataset with status: ABORTED.
research-agent in the browser: approve, deny (the agent tried another approach), and all three suggested prompts completed.
Blocked by: triggerdotdev/trigger.dev#5021 and triggerdotdev/trigger.dev#5020
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
coderabbitai
Bot
commented
Oct 12, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Important
Draft PR not reviewed
Draft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration:
reviews:
auto_review:
drafts: true
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share
-
Comment @coderabbitai help to get the list of available commands.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|