Generate thoughtful responses to new Gmail emails and send them to a specified recipient
When a new email arrives in Gmail, Gemini writes a thoughtful reply and it is sent to the recipient you choose, so replies are ready to review.
Install it
Set up this Zap for me, read how here: https://zapier.sh/zapier/awesome-zaps/send-ai-replies-for-new-gmail-emails/
Paste into Claude, ChatGPT, Cursor or any agent.
- Apps it uses
Google AI Studio- Author
- Zapier
- Source
- zapier/awesome-zaps, folder zaps/send-ai-replies-for-new-gmail-emails
Set it up with the CLI
- Add it. Copies the folder into
zaps/send-ai-replies-for-new-gmail-emails/. Outside a project, it makes one first.npx zap-pack add awesome-zaps/send-ai-replies-for-new-gmail-emails - 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-ai-replies-for-new-gmail-emails - Check it. Its recent runs, with status and errors.
npx zap-pack logs send-ai-replies-for-new-gmail-emails
zaps/send-ai-replies-for-new-gmail-emails/
- 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/google-ai-studio.tsThe
google-ai-studioaccount it uses - triggers/message.tsWhat starts it:
gmailmessage1 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 new email arrives in the watched Gmail label or mailbox (
gmail,message, New Email). The trigger brings the sender, subject and plain-text body. - Google AI Studio (
google-ai-studio,send_prompt) asks Gemini to write a concise, professional reply to that email, with no subject line and no signature. - Gmail (
gmail,message, Send Email) sends the reply to the recipient you set, with the subject "Suggested reply: <original subject>" and the original sender named at the top.
The Zap sends nothing to the original sender. It skips emails with no body text, and it stops if Gemini returns an empty reply.
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_LABEL_ID |
triggers/message.ts, label_ids |
The Gmail label or mailbox to watch. Usually the Inbox. Look up its ID with the user's Gmail connection. |
RECIPIENT_EMAIL |
config.ts |
The address that receives the generated replies. Ask the user for it directly. |
Also review the default with them:
AI_MODEL: the Gemini model that writes the reply. The default isgemini-2.5-flash. Keep it unless the user wants another model from their Google AI Studio account.
Build it
If you can run shell commands, set it up with zap-pack: run npx zap-pack add awesome-zaps/send-ai-replies-for-new-gmail-emails, replace each REPLACE_… value as this file says, then run npx zap-pack deploy send-ai-replies-for-new-gmail-emails, 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.
Connections (each alias is the app's slug, bound to one of the user's accounts):
gmail: the Gmail account whose new emails get replies. The trigger and the send step both use it.google-ai-studio: a Google AI Studio account with access to a Gemini model.
- Accounts: bind
gmailandgoogle-ai-studioto the user's connections. Theconnections/files are settings, not code. - Source: publish
workflow.tsandconfig.ts, with eachREPLACE_…replaced by the user's answer. Set the trigger fromtriggers/message.ts: the appgmail, the eventmessage, andlabel_idsset to the chosen label. For the trigger'sselected_api, callsearch_triggerswithgmail, find the row whosekeyismessage, 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 the Gmail send action and the Google AI Studio
send_promptaction with the user's connections before the first test run, and fix any key inworkflow.tsthat doesn't match. Confirm the trigger's output still providesmessage_id,from,subjectandbody_plain.
Test it
Run this sample as a draft test (run_workflow_draft in Zapier MCP), with the recipient set to an address the user controls:
{
"message_id": "EXAMPLE-MESSAGE-ID",
"from": {
"name": "Sample Sender"
},
"subject": "Question about pricing",
"body_plain": "Could you share the pricing for the team plan? We have about twenty users.",
"date": "2026-11-10T09:00:00Z"
}
Confirm that one email arrived at the recipient with the subject "Suggested reply: Question about pricing" and a reply body. If run-status tools aren't available, check the recipient's inbox directly. Then publish, and send a real test email to the watched label to confirm the trigger fires.
Notes
- Gemini writes the reply from the email text alone. Review generated replies before anyone sends them to a customer.
- The Zap never changes or deletes the original email.
- Each new email sends one email to the recipient, so a busy label means many emails. Watch a narrow label if that is too many.
- Never commit a real recipient address.