Each new email gets a reply drafted in your voice and filed under the original message in Gmail, with blanks where a fact is missing.
Uses
Claude
Gmail
Draft a reply to every new email in your voice
Whenever a new email lands in your Gmail inbox, AI writes the reply you would have written, in your voice, and saves it as a draft in the same conversation, right under the message it answers. You open Gmail, read it, change what you want and send it. Mail you would never answer is skipped first: unattended senders, automatic replies, bulk mail with an unsubscribe footer, and messages with barely any text.
The draft answers what the email actually asks, in the sender's language and at their level of formality, using only what is in the email and what you have said about yourself. Wherever it needs a fact it does not have, it leaves a square-bracketed blank for you rather than inventing a price, a date or a commitment. An email that asks for nothing gets no draft at all. Until you have described yourself and given a sign-off name it writes nothing, and if the AI's answer is unusable the run is marked as failed so you can see which email still needs an answer. Nothing reaches the sender until you send it, unless you deliberately switch it to send straight away.
You need a Gmail connection and an Anthropic connection, a few sentences about who you are, how you write and what you never commit to in a first reply, and the name to sign off with.
email.When an email arrives. Save it as email.aboutMe to blank.Set aboutMe to blank.signOffName to blank.Set signOffName to blank.deliveryMode to draft.Set deliveryMode to draft.skipSenderPatterns to [noreply, no-reply, donotreply, do-not-reply, mailer-daemon, postmaster@, notifications@, bounce].Set skipSenderPatterns to [noreply, no-reply, donotreply, do-not-reply, mailer-daemon, postmaster@, notifications@, bounce].skipSubjectPatterns to [out of office, automatic reply, auto-reply, autoreply, undeliverable, delivery status notification, read receipt].Set skipSubjectPatterns to [out of office, automatic reply, auto-reply, autoreply, undeliverable, delivery status notification, read receipt].skipBodyPatterns to [unsubscribe, view this email in your browser, you are receiving this email because].Set skipBodyPatterns to [unsubscribe, view this email in your browser, you are receiving this email because].minBodyChars to 20.Set minBodyChars to 20.maxBodyChars to 6000.Set maxBodyChars to 6000.fromHeader to email.from.Set fromHeader to email.from.subjectHeader to email.subject.Set subjectHeader to email.subject.bodyHeader to email.body.Set bodyHeader to email.body.dateHeader to email.date.Set dateHeader to email.date.fromHeader is empty or subjectHeader is empty or bodyHeader is empty or…If fromHeader is empty or subjectHeader is empty or bodyHeader is empty or…No email to work from. This workflow runs by itself when a new email arrives in Gmail: connect Gmail, turn the workflow on, and the next message that lands gets a drafted reply. Running it by hand has nothing to read..Show in the output: No email to work from. This workflow runs by itself when a new email arrives in Gmail: connect Gmail, turn the workflow on, and the next message that lands gets a drafted reply. Running it by hand has nothing to read..fromHeader and save it as sender.Extract the first email address from fromHeader and save it as sender.subjectHeader and save it as subject.Trim subjectHeader and save it as subject.bodyHeader and save it as bodyText.Trim bodyHeader and save it as bodyText.skipReason to blank.Set skipReason to blank.sender is blankIf sender is blankskipReason to its From line carries no address a reply could go to.Change skipReason to its From line carries no address a reply could go to.skipReason is blankIf skipReason is blankpattern in skipSenderPatterns:For each pattern in skipSenderPatterns:sender contains pattern (ignoring case) If sender contains pattern (ignoring case)it came from an unattended address (@sender) and save it as skipReason.Build the text it came from an unattended address (@sender) and save it as skipReason.skipReason is blankIf skipReason is blankpattern in skipSubjectPatterns:For each pattern in skipSubjectPatterns:subject contains pattern (ignoring case) If subject contains pattern (ignoring case)it is itself an automatic message (the subject says @pattern) and save it as skipReason.Build the text it is itself an automatic message (the subject says @pattern) and save it as skipReason.skipReason is blankIf skipReason is blankpattern in skipBodyPatterns:For each pattern in skipBodyPatterns:bodyText contains pattern (ignoring case) If bodyText contains pattern (ignoring case)it reads as bulk mail (the body says @pattern) and save it as skipReason.Build the text it reads as bulk mail (the body says @pattern) and save it as skipReason.skipReason is blank and the length of bodyText is less than minBodyCharsIf skipReason is blank and the length of bodyText is less than minBodyCharsskipReason to there is too little text in it to reply to.Change skipReason to there is too little text in it to reply to.skipReason isn't blankIf skipReason isn't blank@subject: skipReason.Show in the output: No draft written for @subject: skipReason.bodyText to maxBodyChars characters (keeping words whole) and save it as emailForModel.Shorten bodyText to maxBodyChars characters (keeping words whole) and save it as emailForModel.drafted.Run an AI agent: Decide whether this email needs a reply and, if it does, draft it. THE EMAIL THEY RECEIVE… and save it as drafted.drafted.output.needs_reply is noIf drafted.output.needs_reply is no@subject and judged that it needs no reply, so no draft was written.Show in the output: Read @subject and judged that it needs no reply, so no draft was written.@subject from sender: the AI did not say clearly whether it needs a reply (it answered @drafted.output.needs_reply). Answer this email by hand.Stop and report a problem: No draft was written for @subject from sender: the AI did not say clearly whether it needs a reply (it answered @drafted.output.needs_reply). Answer this email by hand.drafted.output.reply with ** replaced by and save it as reply.Trim drafted.output.reply with ** replaced by and save it as reply.reply is less than 20If the length of reply is less than 20@subject from sender: the AI said it needs a reply but only wrote @reply, which is too little to be a usable draft. Answer this email by hand.Stop and report a problem: No draft was written for @subject from sender: the AI said it needs a reply but only wrote @reply, which is too little to be a usable draft. Answer this email by hand.deliveryMode in lowercase is sendIf deliveryMode in lowercase is sendemail.Reply to email email.reply@subject from sender, in the same conversation, unreviewed, because deliveryMode is send.Show in the output: Sent a reply to @subject from sender, in the same conversation, unreviewed, because deliveryMode is send.email.Draft a reply to email email.reply@subject from sender in the same conversation. Read it, edit it, send it.Show in the output: Draft saved in Gmail, under @subject from sender in the same conversation. Read it, edit it, send it.