---
title: "Automatically draft AI-generated email replies with Claude"
description: "Get step-by-step instructions for building an automated workflow that creates a draft reply with Claude every time a new email lands in your Gmail inbox."
image: "https://images.ctfassets.net/lzny33ho1g45/T9Ggz8RTLE4G6oYgCdP91/2a83f6f007725e3a5ae9f87dbaaebd9a/Gmail_to_Claude.jpg"
---

# Automatically draft AI-generated email replies with Claude

Get step-by-step instructions for building an automated workflow that creates a draft reply with Claude every time a new email lands in your Gmail inbox.

Many writers love using [Claude](https://zapier.com/apps/anthropic-claude/integrations) 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](https://zapier.com/apps/gmail/integrations) inbox. Intrigued? Then keep reading—this post will show you exactly how to set up this Zap.

## 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](https://zapier.com/editor) 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**.

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**.

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.

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](https://console.anthropic.com). Go to the API Keys section from the sidebar, and choose **+ Create Key**.

Give the key a name, then click **Add**.

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

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

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

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](https://zapier.com/blog/ai-prompt/), 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).

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.

## 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**.

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.

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

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.

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

This will return you to the _Create Draft Reply_ action setup. Click **Continue**.

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.

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

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:

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.