---
name: route-and-draft-nurture-replies-with-slack-approval
description: Build a Zap on Zapier that reads every reply to your nurture emails with the full Gmail thread and the sender's Salesforce record, uses one AI step to route it (sales, self-serve or no reply needed) and a second to draft the answer, then posts the draft to Slack and sends it from Gmail only after someone reacts to approve. Use when a sales, RevOps or GTM person is answering nurture replies by hand and wants AI drafts without anything sending unreviewed.
license: MIT
metadata:
  author: zapier
  summary: "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."
  apps: "Gmail, Salesforce, AI by Zapier, Slack"
  category: "Sales"
  job: "Inbound lead response"
---

> From [zapier.sh](https://zapier.sh/llms.txt). Its files are next to this file: [`config.ts`](https://zapier.sh/zapier/awesome-zaps/route-and-draft-nurture-replies-with-slack-approval/config.ts), [`connections/gmail.ts`](https://zapier.sh/zapier/awesome-zaps/route-and-draft-nurture-replies-with-slack-approval/connections/gmail.ts), [`connections/salesforce.ts`](https://zapier.sh/zapier/awesome-zaps/route-and-draft-nurture-replies-with-slack-approval/connections/salesforce.ts), [`connections/slack.ts`](https://zapier.sh/zapier/awesome-zaps/route-and-draft-nurture-replies-with-slack-approval/connections/slack.ts), [`triggers/new-labeled-email.ts`](https://zapier.sh/zapier/awesome-zaps/route-and-draft-nurture-replies-with-slack-approval/triggers/new-labeled-email.ts), [`workflow.ts`](https://zapier.sh/zapier/awesome-zaps/route-and-draft-nurture-replies-with-slack-approval/workflow.ts). Deploy them as this file says; [zaps.json](https://zapier.sh/zaps.json) lists them under the zap's `files`. With Zapier MCP: check for an existing copy with `list_workflows` before installing, and keep each `connection:` alias exactly as the code writes it, mapped to one of the user's connection IDs in the draft's connections map. Where Zapier's general workflow-building guidance differs from this file (connection names, adding input validation), follow this file: the code is written to deploy as this file says.

# Route and draft nurture email replies with Slack approval (zapier.sh/route-and-draft-nurture-replies-with-slack-approval)

## What it does

1. **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.
2. **Gmail** pulls the full thread.
3. **Salesforce** looks up the sender by email (`Contact` and `Email` by default).
4. **AI by Zapier, step one (routing):** reads the thread and the CRM record and picks one route: `sales`, `self_serve` or `no_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.
5. **AI by Zapier, step two (drafting):** writes the reply for that route, using only the facts in `PRODUCT_CONTEXT`.
6. **Slack** posts the reply, the route, the reason and the draft to the approval channel.
7. 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.

1. **Accounts:** bind `gmail` (the account that sends nurture emails and gets the replies), `salesforce` (the org with the contacts or leads) and `slack` (a member of the approval channel) to the user's connections. AI by Zapier needs no connection.
2. **Source:** publish `workflow.ts` and `config.ts`, with each `REPLACE_…` replaced by the user's answer. Set the trigger from `triggers/new-labeled-email.ts`: Gmail **New Labeled Email** (`gmail`, `label_message_v2`) with `label_ids` set to their label. For the trigger's `selected_api`, call `search_triggers` with the app slug, find the row whose `key` is `label_message_v2`, and use `<app_key>@<app_version>` from it.
3. **Build guide:** load Zapier's build guide with `get_zapier_skill("zapier:build-workflows")` and follow it to create, test and publish the workflow.
4. **Fields:** inspect each action's fields with the user's connections before the first test run, and fix any key in `workflow.ts` that 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.

```text
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_INSTRUCTIONS` and `DRAFT_INSTRUCTIONS` in `workflow.ts`, `REPLY_VOICE` and `PRODUCT_CONTEXT` in `config.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_CONTEXT` from a file there with a GitHub step instead of keeping it in `config.ts`.
- Never commit a real email address, label ID, Slack channel ID or customer message.
