Route and draft nurture email replies with Slack approval
Every reply to your nurture emails gets routed and drafted by AI with the thread and Salesforce context, and only sends from Gmail after you approve it in Slack.
Install it
Set up this Zap for me, read how here: https://zapier.sh/zapier/awesome-zaps/route-and-draft-nurture-replies-with-slack-approval/
Paste into Claude, ChatGPT, Cursor or any agent.
- Category
- Sales · Inbound lead response
- Author
- Zapier
- Source
- zapier/awesome-zaps, folder zaps/route-and-draft-nurture-replies-with-slack-approval
Set it up with the CLI
- Add it. Copies the folder into
zaps/route-and-draft-nurture-replies-with-slack-approval/. Outside a project, it makes one first.npx zap-pack add awesome-zaps/route-and-draft-nurture-replies-with-slack-approval - Fill in the values in
config.ts, and in any other file the list marks. Replace each one as its comment and SKILL.md say. - Deploy it. Asks for any value still left, signs you in to Zapier if you aren't, then publishes it to your account.
npx zap-pack deploy route-and-draft-nurture-replies-with-slack-approval - Check it. Its recent runs, with status and errors.
npx zap-pack logs route-and-draft-nurture-replies-with-slack-approval
zaps/route-and-draft-nurture-replies-with-slack-approval/
- README.mdWhat it does, for people
- SKILL.mdHow an agent sets it up: what to ask you, and how to test it
- config.tsIts settings 3 to fill in
- connections/gmail.tsThe
gmailaccount it uses - connections/salesforce.tsThe
salesforceaccount it uses - connections/slack.tsThe
slackaccount it uses - triggers/new-labeled-email.tsWhat starts it:
gmaillabel_message_v21 to fill in - workflow.tsThe code; each
ctx.stepis a step in the Zap
Agents: add --yes to any command so it never prompts. When it needs an answer only the user can give, it stops and names the flag that supplies it.
SKILL.md
View MarkdownWhat it does
- Trigger: a reply to a nurture email gets the user's nurture-replies label in Gmail (
gmail,label_message_v2). Messages from the user's own address are skipped. - Gmail pulls the full thread.
- Salesforce looks up the sender by email (
ContactandEmailby default). - AI by Zapier, step one (routing): reads the thread and the CRM record and picks one route:
sales,self_serveorno_reply. It also lists up to three qualifying questions and gives a one-line reason.no_reply(out-of-office, unsubscribe, bounce) ends the run. - AI by Zapier, step two (drafting): writes the reply for that route, using only the facts in
PRODUCT_CONTEXT. - Slack posts the reply, the route, the reason and the draft to the approval channel.
- The Zap checks that message for a reaction every 15 minutes for up to 24 hours. A ✅ sends the draft as a Gmail reply in the same thread. A ❌, or no decision in time, sends nothing. Either way it notes the outcome in the Slack thread.
Each AI step has one small job, so routing and writing can be tuned separately. Nothing is emailed until a person approves it.
Ask the user
Each REPLACE_… value is set per person. Resolve names to IDs with the user's own connections; don't ask them to paste an ID you can look up.
| Setting | Where it lives | What goes there |
|---|---|---|
REPLACE_NURTURE_LABEL_ID |
triggers/new-labeled-email.ts |
The Gmail label nurture replies get. Look up its ID with the user's Gmail connection |
REPLACE_SENDER_EMAIL |
config.ts |
The Gmail address the nurture emails come from and approved replies go out from |
REPLACE_APPROVAL_CHANNEL_ID |
config.ts |
The Slack channel that gets drafts to approve. Look up its ID with the user's Slack connection |
REPLACE_PRODUCT_CONTEXT |
config.ts |
A short paragraph on what they sell, who it's for, the self-serve next step and how to book a call |
Also review the defaults with them: REPLY_VOICE (rewrite it from how they write), SALESFORCE_OBJECT and SALESFORCE_EMAIL_FIELD (use Lead if nurture contacts are leads), the reactions (white_check_mark, x) and the 24-hour approval window (POLL_INTERVAL_SECONDS, MAX_POLLS).
Ask these before building:
- Do nurture replies already get a Gmail label? If not, help them make a Gmail filter that labels replies to the nurture sequence (for example, by subject line or by the sending alias).
- Who approves? Anyone in the approval channel can react. Use a private channel if only a few people should.
- Contacts or leads in Salesforce?
Build it
If you can run shell commands, set it up with zap-pack: run npx zap-pack add awesome-zaps/route-and-draft-nurture-replies-with-slack-approval, replace each REPLACE_… value as this file says, then run npx zap-pack deploy route-and-draft-nurture-replies-with-slack-approval, which signs the user in to Zapier when it gets there. Otherwise build with Zapier MCP, as the steps below say. Either way, name the workflow Route and draft nurture email replies with Slack approval (zapier.sh/route-and-draft-nurture-replies-with-slack-approval): zap-pack takes that name from this file's title, so leave the title as it is, and with Zapier MCP give the workflow that name when you create it. No Zapier MCP tools? Read https://docs.zapier.com/mcp/get-started/quickstart.md and follow the page for the app you are running in to get the user connected, then continue with this build.
- Accounts: bind
gmail(the account that sends nurture emails and gets the replies),salesforce(the org with the contacts or leads) andslack(a member of the approval channel) to the user's connections. AI by Zapier needs no connection. - Source: publish
workflow.tsandconfig.ts, with eachREPLACE_…replaced by the user's answer. Set the trigger fromtriggers/new-labeled-email.ts: Gmail New Labeled Email (gmail,label_message_v2) withlabel_idsset to their label. For the trigger'sselected_api, callsearch_triggerswith the app slug, find the row whosekeyislabel_message_v2, and use<app_key>@<app_version>from it. - Build guide: load Zapier's build guide with
get_zapier_skill("zapier:build-workflows")and follow it to create, test and publish the workflow. - Fields: inspect each action's fields with the user's connections before the first test run, and fix any key in
workflow.tsthat doesn't match. In particular, check the Salesforce Find Record search field for the chosen object, the Gmail trigger's field names (thread_id,from__email,body_plain) against a sampled labeled email, and the shape Get Message Reactions returns.
Test it
Send the Gmail account a test email from another address you own, reply to it with the text below, and apply the nurture label to the reply. The contact doesn't need to exist in Salesforce.
Subject: Re: Getting started
Thanks for the note. We're a team of about 40 and looking at this for our support org.
Is there a plan that covers SSO, and could we get 20 minutes with someone next week?
Dana
dana@example.com
Expect a Slack message in the approval channel with route sales, a reason and a draft that offers a call. React ❌ first and check that the thread says nothing was sent and no email went out. Then run it again, react ✅, and check that the reply arrives in the same Gmail thread. Each check can take up to 15 minutes. The user deletes the test emails, not the agent.
Notes
- Nothing is ever emailed without a ✅ in Slack. ❌ or 24 hours with no decision ends the run without sending.
- To tune it:
ROUTE_INSTRUCTIONSandDRAFT_INSTRUCTIONSinworkflow.ts,REPLY_VOICEandPRODUCT_CONTEXTinconfig.ts. Keep routing and drafting as separate steps, so each prompt stays small and its output stays predictable. - If the routing step returns a route it doesn't know, the Zap treats it as
sales, so a person looks at it. - Builders often version their prompts and product context in GitHub. If the user does, they can load
PRODUCT_CONTEXTfrom a file there with a GitHub step instead of keeping it inconfig.ts. - Never commit a real email address, label ID, Slack channel ID or customer message.