ZapierChecked blueprint5 nodes
Draft a support reply from the macro sheet
Route a support email to a queue, fetch that queue's approved macro from a sheet, and let AI personalise it into a Gmail draft for the agent.
Portfolio reference build with demo data and placeholder credentials, not a client deployment.
Pain
Tickets stop sitting in a shared inbox or bouncing between billing, tech, and ops.
Solution
Route a support email to a queue, fetch that queue's approved macro from a sheet, and let AI personalise it into a Gmail draft for the agent.
Impact · From the blueprint
About 3 minutes per reply for routine questions; at 30 a day that is 90 minutes.
- Advanced
- Validated
- Draft / approval
- Gmail
- Code by Zapier
- Google Sheets
- AI by Zapier
Library status: passing. Schema, field mapping, task count, and Code-step unit tests pass. Not built in a live Zapier account.

Step inspector
The first step shows the checked-in sample payload.Later steps name the node. They are not a live execution.
Guardrails
- Gmail · Create Draft Reply
Credential ids in the JSON are placeholders. These files are portfolio demos.
Deploy this for your business
Tell us this slug and what still happens by hand. We will map it onto your accounts. This page is not a claim that the blueprint already runs for a customer.
README
Portfolio demo by Mustafa (mustafaautomation). Not client work. The people, companies, and numbers in it are made up. Rebuild it in your own Zapier account. Nothing here is connected to anyone's account.
Category: Support
Difficulty: advanced
Apps: Gmail, Code by Zapier, Google Sheets, AI by Zapier
Zapier plan: Professional (multi-step Zap: 4 steps after the trigger; AI by Zapier)
Tasks per run: 4
Test status: passing (schema, mapping scope, task count, Code step unit tests)
Problem
The team has approved answers (macros) in a sheet, but agents rewrite them from scratch or paste the wrong one. AI drafts from nothing sound off-brand and sometimes promise things policy does not allow.
Who it's for
Small support teams in Gmail that keep approved reply templates in a Google Sheet and want drafts, not auto-sent replies.
How the Zap runs
flowchart TD s1["1. Gmail: New Labeled Email<br/>New email under the Support label"] s2["2. Code by Zapier<br/>Pick the queue"] s1 --> s2 s3["3. Google Sheets<br/>Fetch the approved macro for that queue"] s2 --> s3 s4["4. AI by Zapier<br/>Personalise the macro"] s3 --> s4 s5["5. Gmail<br/>Create the draft reply in the thread"] s4 --> s5
Build it in the Zapier editor
Zapier has no import file for a Zap like this one, so it is built by hand from the steps below. zap.json is the same Zap in a machine-readable form (schema), and zap.yaml is the same document in YAML.
A value like [2. vendor] means: click the field, open step 2 in the data picker, and choose vendor. Plain text is typed as shown. YOUR_... is a value from your own account.
Before you start
- Create the sheet Support macros › Macros with these headers in row 1:
queue. - Create the Macros sheet with one row per queue: billing, account, bug, sales, general. Keep a
generalrow so every email finds a macro.
Steps
1. Trigger: New email under the Support label
App: Gmail · Event: New Labeled Email · polling (Zapier checks on your plan's update interval) · Tasks: 0
Fires for each new email under the Support label.
| Field | Value |
|---|---|
| Label | Support |
Fields this library maps from the trigger: message_id, thread_id, from_email, from_name, to, subject, date, body_plain, snippet, labels, attachment_count, attachment_names. Zapier shows them with its own labels; pick the one with the same meaning.
2. Action: Pick the queue
App: Code by Zapier · Event: Run JavaScript · Tasks: 1
The queue (billing, account, bug, sales, general) is the key into the macro sheet.
Paste the whole of code/assign-ticket.js into the code box. Source: content/code/assign-ticket.cjs. Unit tests: content/code/assign-ticket.test.cjs.
| Input Data key | Value |
|---|---|
subject | [1. subject] |
body | [1. body_plain] |
from_email | [1. from_email] |
ticket_id | [1. message_id] |
Returns: queue, priority, assignee, matched_keyword, is_vip.
3. Search: Fetch the approved macro for that queue
App: Google Sheets · Event: Lookup Spreadsheet Row · Tasks: 1
One row per queue with the approved wording and the policy limits the AI must respect.
| Field | Value |
|---|---|
| Drive | My Google Drive |
| Spreadsheet | Support macros |
| Worksheet | Macros |
| Lookup Column | queue |
| Lookup Value | [2. queue] |
| Should this step be considered a "success" when nothing is found? | Yes |
Later steps can map: row_number, _zap_search_was_found_status, macro_text, policy_notes.
4. Action: Personalise the macro
App: AI by Zapier · Event: Analyze and Return Data · Tasks: 1
The model may only adapt the approved text to this email. It is told not to add promises, which keeps the draft inside policy.
| Field | Value |
|---|---|
| Model | Default (fast) |
| Instructions | You draft support replies. Start from the approved macro and adapt it to the customer's email: use their name, refer to their specific situation, keep the macro's facts and promises unchanged, and do not add any new promise, discount, or date. Follow the policy notes. Return reply (plain text, under 160 words, no subject line). |
| Input data | Customer email from [1. from_name]: [1. body_plain] Approved macro: [3. macro_text] Policy notes: [3. policy_notes] |
| Output fields | reply |
Later steps can map: reply.
5. Action: Create the draft reply in the thread
App: Gmail · Event: Create Draft Reply · Tasks: 1
A draft, never a send. The agent reads, edits, and sends from Gmail.
| Field | Value |
|---|---|
| Thread | [1. thread_id] |
| To | [1. from_email] |
| Body Type | plain |
| Body | [4. reply] |
Later steps can map: id.
Test it
Use sample-trigger.json as the test record. For an instant or webhook trigger, send it to the trigger once; for a polling trigger, create a matching record in the app and click Test trigger. Then test each step in order and read its output before you turn the Zap on.
{
"message_id": "18c2f4a9b7d01e55",
"thread_id": "18c2f4a9b7d01e55",
"from_email": "sam.okoro@example.com",
"from_name": "Sam Okoro",
"to": "support@northwind-studio.example",
"subject": "Password reset link not arriving",
"date": "2026-11-24T09:14:03Z",
"body_plain": "Hi, I have tried to reset my password three times today and the email never arrives. I checked spam. My login is sam.okoro@example.com. Can you help?",
"snippet": "I have tried to reset my password three times today and the email never arrives.",
"labels": "INBOX, Support",
"attachment_count": 0,
"attachment_names": ""
}
Plan and task usage
| Step | App | Tasks |
|---|---|---|
| 1. New email under the Support label | Gmail | 0 |
| 2. Pick the queue | Code by Zapier | 1 |
| 3. Fetch the approved macro for that queue | Google Sheets | 1 |
| 4. Personalise the macro | AI by Zapier | 1 |
| 5. Create the draft reply in the thread | Gmail | 1 |
A typical run uses 4 tasks. Zapier does not charge tasks for triggers, Filter, Paths, Formatter, Delay, Looping, Digest, Storage, or Zapier Tables steps. AI by Zapier is counted here as 1 task; Zapier prices it by model tier, so a larger model can cost more.
Minimum plan: Professional, because of: multi-step Zap: 4 steps after the trigger; AI by Zapier. The Free plan only runs two-step Zaps (a trigger and one action) and leaves out Filters, Paths, Formatter, webhooks, AI by Zapier, and premium apps.
Customize
- Add more queues in
code/assign-ticket.jsand a matching row in the sheet for each. - Shorten the word limit for chat-like replies, or add a sign-off line per agent.
Limits
- If the queue has no row in the sheet, the lookup finds nothing and the AI drafts from the email alone. Keep the
generalrow. - Drafts still need a human read. That is deliberate.
Time saved
About 3 minutes per reply for routine questions; at 30 a day that is 90 minutes.
Files
| File | What it is |
|---|---|
zap.json | The Zap, step by step, in schema 1.0.0. |
zap.yaml | The same document in YAML. |
sample-trigger.json | Fictional trigger record for the first test. |
diagram.png | The step list, drawn like the Zapier editor. |
code/assign-ticket.js | Paste-ready Code by Zapier step. |