Send scheduled welcome email and update visitor status
When a visitor reaches the milestone you set in your table, they get a welcome email and their row moves to the next stage, with the send time recorded.
Install it
Set up this Zap for me, read how here: https://zapier.sh/zapier/awesome-zaps/send-scheduled-welcome-email-and-update-visitor-status/
Paste into Claude, ChatGPT, Cursor or any agent.
- Author
- Zapier
- Source
- zapier/awesome-zaps, folder zaps/send-scheduled-welcome-email-and-update-visitor-status
Set it up with the CLI
- Add it. Copies the folder into
zaps/send-scheduled-welcome-email-and-update-visitor-status/. Outside a project, it makes one first.npx zap-pack add awesome-zaps/send-scheduled-welcome-email-and-update-visitor-status - 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 send-scheduled-welcome-email-and-update-visitor-status - Check it. Its recent runs, with status and errors.
npx zap-pack logs send-scheduled-welcome-email-and-update-visitor-status
zaps/send-scheduled-welcome-email-and-update-visitor-status/
- 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 1 to fill in
- connections/gmail.tsThe
gmailaccount it uses - connections/zapier-tables.tsThe
zapier-tablesaccount it uses - triggers/updated-record.tsWhat starts it:
zapier-tablesupdated_record1 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 record in your Zapier Table is added or updated (
zapier-tables,updated_record). - Filter: the run continues only if the milestone column equals
MILESTONE_VALUE, and only if the record has no sent-at time and is not already atNEXT_STAGE. Otherwise it stops and changes nothing. - Delay: waits
SEND_DELAY_SECONDSbefore sending. The default is 1 second, which sends right away. - Gmail sends the welcome email to the record's email column. The subject and body use the record's name.
- Zapier Tables sets the stage column to
NEXT_STAGEand writes the send time to the sent-at column. This runs only after the email is sent.
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 | What goes there |
|---|---|---|
REPLACE_TABLE_ID |
config.ts, TABLE_ID; triggers/updated-record.ts, params.table_id |
The Zapier Table that holds the visitors. Use the same ID in both places. |
Review these defaults with the user before the build:
- The column keys (
EMAIL_FIELD,NAME_FIELD,MILESTONE_FIELD,STAGE_FIELD,SENT_AT_FIELDinconfig.ts) aref1tof5, in the order the columns were added. Confirm the table's columns sit in that order, or the email goes to the wrong address. MILESTONE_VALUE(Signed up) inconfig.ts: the value that starts the sequence.NEXT_STAGE(Welcome sent) inconfig.ts: the stage the record moves to after the email.SEND_DELAY_SECONDS(1) inworkflow.ts: how long to wait before sending. Use a longer value such as86400for the next day.EMAIL_SUBJECTandFROM_NAMEinconfig.ts, andEMAIL_BODYinworkflow.ts: the email text.{name}is replaced with the record's name.
Build it
If you can run shell commands, set it up with zap-pack: run npx zap-pack add awesome-zaps/send-scheduled-welcome-email-and-update-visitor-status, replace each REPLACE_… value as this file says, then run npx zap-pack deploy send-scheduled-welcome-email-and-update-visitor-status, which signs the user in to Zapier when it gets there. Otherwise build with Zapier MCP, as the steps below say. 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
zapier-tablesto the Zapier Tables connection for the account that owns the table, andgmailto the Gmail connection that sends the welcome email. The trigger useszapier-tablestoo. - Source: publish
workflow.tsandconfig.ts, with eachREPLACE_…replaced by the user's answer.triggers/updated-record.tsandconnections/are settings, not code: set the workflow's trigger and connection bindings from them, and set the trigger'sparams.table_idto the same table. The trigger file names the app by its slug; for the trigger'sselected_api, callsearch_triggerswith that slug, find the row whosekeyis the trigger'sevent, 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 and sample the trigger before the first test run, and fix any key in
workflow.tsthat doesn't match.
Test it
Run this sample as a draft test run (run_workflow_draft in Zapier MCP) before publishing. Replace the email with an address you control, since the test sends a real email:
{
"record_id": "example-record-id",
"table_id": "example-table-id",
"new": {
"id": "example-record-id",
"data": {
"f1": "you@example.com",
"f2": "Test Visitor",
"f3": "Signed up",
"f4": "Welcome",
"f5": null
}
}
}
Check that:
- The Gmail step returns a sent message, and the email arrives at the address in
f1with the name in the subject. - The
update-visitor-stagestep returns the record withf4set toWelcome sentandf5set to a timestamp. - Run it again with the same record after it has been updated. The run should skip with
already-sentand send nothing.
If run-status tools aren't available, check the result in Gmail and Zapier Tables directly. Ask the user to delete the test record and the test email. The agent does not delete data.
Notes
- Zapier Tables fires the trigger on every update to a record. The workflow checks the sent-at time and stage first, so a record that has been emailed is not emailed again, even though its own update fires the trigger again.
- The duplicate check uses the values in the trigger payload, not a fresh lookup. Two quick updates to the same record could both pass it and send two emails.
- The delay is a fixed number of seconds. It does not wait for a business day or a time window.
- To skip the wait for priority records, add a priority column check to the filter. To personalize more or format the send time, add plain code before the send, not a separate step.
- Don't commit a real table ID or email address. Use placeholders.