Writes a reply to each new customer email in your Outlook inbox, in your business's voice, and saves it as a draft to check and send.
Uses
Claude
Microsoft Outlook
Draft replies to customer emails in Outlook
Whenever a new email lands in the Outlook mailbox you choose, AI reads it and writes the reply your business would send, in your voice and in the customer's language. The reply is saved as a draft in that email's own conversation in Outlook, addressed to the sender, so you open it, check it, fill any gaps and press send. Nothing is ever sent for you.
Mail that needs no answer gets no draft: receipts, newsletters, automatic replies, sales pitches and anything from inside your own organisation are left as they are. Where a reply needs a fact the AI does not have, such as a delivery date or a price, it leaves a gap in square brackets for you rather than inventing one, and it leaves refunds, discounts and dates for you to decide. If a reply cannot be written or saved, the run is marked as failed and names the email, with the written reply included so it is not lost.
You need a Microsoft Outlook connection, which your Microsoft 365 admin sets up once, and an Anthropic connection for the AI. Fill in the mailbox to watch, a description of your business, how you write and what a reply must never promise, and the name replies are signed with.
email.When an email arrives. Save it as email.aboutYourBusiness to:Set aboutYourBusiness to:What we do: [what your business does, for whom and where]
How we write: [your tone, for example friendly and plain-spoken, first names, no exclamation marks]
What a reply can say: [facts a reply may use, for example opening hours, how to book, where your help pages are]
What a reply must never promise: [for example refunds, discounts, prices, delivery or repair dates]signOffName to blank.Set signOffName to blank.skipSenders to [noreply, no-reply, no_reply, donotreply, do-not-reply, mailer-daemon, postmaster, bounce, bounces, notifications].Set skipSenders to [noreply, no-reply, no_reply, donotreply, do-not-reply, mailer-daemon, postmaster, bounce, bounces, notifications].skipSubjects to [automatic reply, auto-reply, autoreply, out of office, undeliverable, delivery status notification, delivery has failed, mail delivery failed].Set skipSubjects to [automatic reply, auto-reply, autoreply, out of office, undeliverable, delivery status notification, delivery has failed, mail delivery failed].email.message_id is empty or email.message_id is blankIf email.message_id is empty or email.message_id is blankemail.subject, or (no subject) if it is empty and save it as subject.Use email.subject, or (no subject) if it is empty and save it as subject.email.from, or an unknown sender if it is empty and save it as sentBy.Use email.from, or an unknown sender if it is empty and save it as sentBy.email.from_address lowercase and save it as sender.Make email.from_address lowercase and save it as sender.sender and save it as senderDomain.Extract the first domain from sender and save it as senderDomain.email.mailbox and save it as ownDomain.Extract the first domain from email.mailbox and save it as ownDomain.sender and save it as senderRule.Match keywords in sender and save it as senderRule.^[\s\[(]+ with in subject and save it as subjectStart.Replace the pattern ^[\s\[(]+ with in subject and save it as subjectStart.skipSubjects where item isn't blank and subjectStart starts with item (ignoring case) and save it as subjectMatches.Keep each item in skipSubjects where item isn't blank and subjectStart starts with item (ignoring case) and save it as subjectMatches.skipReason to blank.Set skipReason to blank.sender is blankIf sender is blankskipReason to it has no sender address to reply to.Change skipReason to it has no sender address to reply to.it came from inside your own organisation (@senderDomain) and save it as skipReason.Build the text it came from inside your own organisation (@senderDomain) and save it as skipReason.it came from an automatic address (@sender) and save it as skipReason.Build the text it came from an automatic address (@sender) and save it as skipReason.it is an automatic message (its subject starts with @subjectMatches[0]) and save it as skipReason.Build the text it is an automatic message (its subject starts with @subjectMatches[0]) and save it as skipReason.skipReason isn't blankIf skipReason isn't blank@subject from sentBy: skipReason. The email was left as it is.Finish the run: No draft for @subject from sentBy: skipReason. The email was left as it is.\s*\n\s*\n\s* with "Replace the pattern \s*\n\s*\n\s* with
in email.body and save it as tidyBody.tidyBody to 12000 characters (keeping words whole) and save it as emailText.Shorten tidyBody to 12000 characters (keeping words whole) and save it as emailText.aiAnswer to an empty record.Set aiAnswer to an empty record.aiErrorIf a step below fails, save the error as aiErrorsentBy T… and save it as drafting.Run an AI agent: Decide whether this email needs a reply and, if it does, write the reply. From: sentBy T… and save it as drafting.aiAnswer to drafting.output.Change aiAnswer to drafting.output.@subject from sentBy, so no draft was saved and this email needs answering by hand. Check the Anthropic connection under Integrations. What went wrong: aiError.message.Stop and report a problem: Could not write a reply to @subject from sentBy, so no draft was saved and this email needs answering by hand. Check the Anthropic connection under Integrations. What went wrong: aiError.message.aiAnswer.needs_reply in lowercase is noIf aiAnswer.needs_reply in lowercase is no@subject from sentBy: aiAnswer.reason The email was left as it is, with no draft.Finish the run: No reply needed for @subject from sentBy: aiAnswer.reason The email was left as it is, with no draft.@subject from sentBy needs a reply (it answered @aiAnswer.needs_reply), so no draft was saved and this email needs answering by hand.Stop and report a problem: The AI did not say whether @subject from sentBy needs a reply (it answered @aiAnswer.needs_reply), so no draft was saved and this email needs answering by hand.aiAnswer.reply is less than 20If the length of aiAnswer.reply is less than 20@subject from sentBy needs a reply but did not write one, so no draft was saved and this email needs answering by hand.Stop and report a problem: The AI said @subject from sentBy needs a reply but did not write one, so no draft was saved and this email needs answering by hand.draftErrorIf a step below fails, save the error as draftErroremail. Save it as draft.Draft a reply to email email. Save it as draft.aiAnswer.reply@subject from sentBy in that email's conversation in Outlook, ready to check and send. About the email: aiAnswer.reason Open the draft: draft.webLink.Finish the run: Saved a draft reply to @subject from sentBy in that email's conversation in Outlook, ready to check and send. About the email: aiAnswer.reason Open the draft: draft.webLink.@subject from sentBy was written, but Outlook would not save it as a draft, so nothing was saved and nothing was sent. Check that the app your Microsoft 365 admin registered for Lodol has the Mail.ReadWrite application permission with admin consent and can reach this mailbox, and that the email is still there. What Outlook said: draftError.messageStop and report a problem: A reply to @subject from sentBy was written, but Outlook would not save it as a draft, so nothing was saved and nothing was sent. Check that the app your Microsoft 365 admin registered for Lodol has the Mail.ReadWrite application permission with admin consent and can reach this mailbox, and that the email is still there. What Outlook said: draftError.message
The reply, to paste into Outlook yourself:
aiAnswer.reply.