Build a signal-triggered prospecting agent from Clay, n8n and Claude
This agent watches for a real reason to reach out, such as a company event, then researches the contact, judges fit and writes a first line explaining why now. Outreach is based on timing, not a static list.
Paste this into ChatGPT, Claude or your agent tool. See the prompt
- Prospecting / Outbound
- intermediate
- Founder
- SDR / BDR
- RevOps
- Category
- Prospecting / Outbound
- Difficulty
- Intermediate
- Est. cost
- Under $50/mo in API calls for the lean version (sourced, author-reported)
Works with
Problem
Static lead lists with mail merges are not prospecting. The author wanted outreach triggered by real signals, with clear lineage of why each contact was chosen.
Setup
A four-layer pipeline: a signal layer detects a trigger event for a company or person, an enrichment layer (Clay) adds firmographic and role fields, a scoring layer (Claude) judges ICP fit and writes a trigger-based first line with a reason string, and a routing layer (n8n) dedupes against the CRM, pushes approved contacts to the sending tool and logs everything.
Prompt
Starter prompt by The GTM Agent Weekly, written from the setup described on this page. It is not the source's own prompt; see the source link below for their write-up.
# ROLE
You are the scoring step in a signal-triggered prospecting pipeline. For each enriched
contact, you judge ICP fit and write a first line tied to the trigger event.
# INPUTS
- {{SIGNAL}}: the trigger event (e.g. new funding, new hire, job post, product launch), its date and link.
- {{CONTACT}}: name, title, seniority, company, and firmographics from enrichment (e.g. Clay).
- {{ICP}}: our ideal customer and ideal buyer roles, written out.
# TASK
1. Score fit: "yes", "maybe" or "no", with a one-line reason string that names the deciding facts.
2. If "yes" or "maybe", write one opening line that references the trigger event specifically
and connects it to a problem we solve. No flattery, no "I noticed".
3. Return nothing else.
# OUTPUT FORMAT (JSON)
{"fit": "yes|maybe|no", "reason": "", "first_line": ""}
# RULES FOR THE REST OF THE PIPELINE
- Dedupe against the CRM before anything is sent (existing contact, open deal, customer).
- Only "yes" goes to the sending tool automatically; "maybe" goes to a person.
- Log the signal, score, reason and line for every contact.
# GUARDRAILS
- Use only the inputs. If the signal is older than {{MAX_SIGNAL_AGE_DAYS}} days, score "no".
- Never invent details about the person or company in the first line. Replace every {{PLACEHOLDER}} before running. Works with any capable LLM and runner.
Tools
Steps
- Define trigger signals that make a company worth contacting now.
- Enrich triggered records with title, seniority, company size and stack.
- Score ICP fit with an LLM that returns a score and a reason, and draft a first line tied to the trigger.
- Route approved contacts to sequences, dedupe against the CRM and log lineage for every record.
Results
The author reports running a lean version for a low monthly API cost and testing trigger types over several weeks; results are the author's own, without independent data.
What goes wrong
Gotchas
- Passing too much context into scoring inflates token cost without improving accuracy, per the author.
- Contact data accuracy drops on very new companies, so enrichment needs fallbacks. (editor note)
- Without layer-by-layer inputs and outputs, failures are hard to locate; the author keeps each layer's output inspectable.
Get 5 like this every week, free.
Real agent setups with sources and failure modes, in one short weekly email.
Free. One email a week. Unsubscribe anytime.
Source and credit
zackrag, DEV Community · newsletter
Source dated 2026-04-17 · last reviewed 2026-10-11. Summarized in our own words; see the source for details.