Automatically draft AI-generated email replies with Claude


Many writers love using Claude for its ability to write in a natural, conversational style. If you’re in that camp and have found that Claude captures your voice pretty well, you might want to use it to help you answer emails, too.

With Zapier, you can set up a Zap (that’s what we call an automated workflow) that creates a draft reply with Claude every time a new email lands in a specific Gmail inbox. Intrigued? Then keep reading—this post will show you exactly how to set up this Zap.

Zapier is the most connected AI orchestration platform—integrating with thousands of apps from partners like Google, Salesforce, and Microsoft. Use interfaces, data tables, and logic to build secure, automated, AI-powered systems for your business-critical workflows across your organization’s technology stack. Learn more.

Auto-draft Claude-generated replies for new emails

Zapier lets you create automated workflows called Zaps, which send your information from one app to another. And while you can create your own Zap from scratch without any coding knowledge, we also offer quick templates to get you started.

If you’d like to start with a template, click Try it below. (You’ll need to create a Zapier account if you don’t already have one.) You’ll be taken to the Zap editor. Then just follow the directions below to get the Zap up and running.

Set up your Gmail trigger

First, set up your trigger—the event that starts your Zap. If you’re using the Zap template, the trigger app and event will already be selected for you. Otherwise, search for and select Gmail as the trigger app and New Email as the trigger event. Connect your Gmail account, then click Continue.

A window inside the Zap editor with options to select an app, trigger event, and account

Next, choose the Label or mailbox where your work emails land. You can choose the Inbox option to enable it for all incoming emails. If your inbox contains a mix of personal and work emails, choose a label that’s exclusively for work instead. Then, click Continue.

A dropdown menu inside the Zap editor for selecting a Gmail label or mailbox

Now, click Test trigger to test the automation. Zapier will bring up a couple of your newest email messages. Choose an email for testing this automation, then click Continue with selected record.

Set up your Claude action

Now it’s time to set up the action—the event your Zap will perform once it’s triggered. If you’re using the Zap template, this will already be selected for you. Otherwise, search for and select Anthropic (Claude) as your action app and Send Message as your action event. Then, click Sign in to connect your Claude account.

A window inside the Zap editor for selecting an app, action event, and account

If you’re doing this for the first time, you’ll have to add your Claude API key to Zapier. To find your key, log in using Anthropic’s Claude Console website. Go to the API Keys section from the sidebar, and choose + Create Key.

A webpage on Anthropic's Claude Console website featuring a button that says +Create Key

Give the key a name, then click Add.

A pop-up window with a dropdown to select a workspace and a field to name your key

Next, click Copy Key to copy the key to your clipboard.

A window with a field that displays a blurred-out set of numbers of letters, plus a link to copy the key

Back in the Zapier popup, paste the API key, and click Yes, Continue to Anthropic (Claude).

A window inside Zapier with a field to enter an API key, plus buttons to cancel or proceed

Your account will now be connected. Click Continue to go to the next step.

A window inside the Zap editor with options for selecting an app, action event, and account, all filled out

Now, let’s configure the Claude AI step. If you’re using the template, the User Message field will be mapped to the email text already. If not, click the Plus button in the User Message field and choose the Body Plain data. Here you’re free to add a prompt to customize Claude’s reply. This is where you prompt Claude—just like you would inside the Claude app. Using prompting best practices, give Claude some guidance on what you want it to do and how it should write its responses.

For example, let’s say you want it to draft replies to inquiries from your co-workers. To make sure Claude comes up with a good draft, give it some context on your work and share the style you want it to write in, something that reflects your personality (or your company’s).

A window in the Zap editor with fields to enter a user message and "system," which contains a Claude prompt

If you find yourself answering the same questions from prospects or colleagues over and over again, consider building a bot with Zapier Chatbots. Train them on your company knowledge, customize how they respond, then share them—either by showcasing them on a portal built in Zapier Interfaces, embedding them on your website, or providing access through a link. It’s a simple way to speed up your communication workflows. Get detailed guidance on building chatbots with Zapier.

From the Model section, you can choose which Claude model to use. By default, Zapier will choose the latest and greatest model, but you’re free to change to a cheaper, or a smaller model as well. Then, click Continue.

Click Test step to send the data off to Claude. In a second or two, you’ll receive a response from Claude which will include the AI-generated email reply. Check out the response, and click Continue to move to the next action step: creating a Gmail reply using Claude’s output.

A window in the Zap editor showing test data

Set up your Gmail action

Now it’s time to set up the last step of the automation: saving the AI output as a Gmail reply in the proper email thread. If you’re using the Zap template, this step will already be set up for you. Otherwise, search for and select Gmail as your action app and Create Draft Reply as your action event. Next, sign in with your Gmail account and click Continue.

A window inside the Zap editor with filled-out fields for an app, action event, and account

Next, let’s configure the Gmail draft. You’ll need to specify which email thread the draft reply should be added to. Gmail identifies threads with unique codes, but since each automation will involve a different thread, we can’t hardcode a specific one.

Zapier has a way around this: you just use a search step to find the right thread automatically. This tells Zapier to search for the email containing the original message and link your reply to it.

To configure this, click Add search step in the Thread section.

A dropdown menu to select a thread

In the popup that appears, click Add a search step to add this to your Zap.

A screenshot that illustrates a workflow with a search step

You’ll now be taken to the new step’s configuration screen. Here, click the + button in the Search string section to map it to the original email message. From the dropdown menu, first choose the New Email in Gmail step and then choose the Body Plain data.

A window in the Zap editor with options to map data from a previous step

Keep the other settings as is, then click Continue. Click Test step to find the original email thread. Once that’s successful, click Continue.

A window inside the Zap editor with test data

This will return you to the Create Draft Reply action setup. Click Continue.

A screenshot of the setup tab for the Create Draft Reply action event

In the Configure section, the Thread ID will be pre-filled for you.

Now, let’s fill in the rest of the step. Choose your email address in the From field.

A field titled From with an email address partially blurred out

Then, click the + button in the Body field. Choose the Send Message in Anthropic (Claude) step, and click Response Content Text.

A window inside the Zap editor with options to map data from a previous step

Then, click Continue.

Next, click Test step to test the automation. In a second or two, Zapier will send the AI-generated text from Claude to the Gmail thread in question. Open the Gmail app, find the email that you use for the automation, and you’ll see a draft reply waiting for you. It should look something like this:

An email in Gmail in draft form

Did it work for you too? Then go back to Zapier and publish your Zap. Now every time you get a new email in the mailbox you chose, Zapier will auto-generate an AI reply that you can edit as you please.

Leave a Reply

Your email address will not be published. Required fields are marked *