Automate Email Drafts with AI for Faster Inbox Management
Learn how to link your email with an AI assistant to quickly generate draft replies for routine messages, saving you time at home or work.
By the end of this guide, you’ll have a clever system that writes draft replies for you, helping you spend mere seconds instead of minutes on each routine inbox message. This is perfect for anyone who feels their email is a time-sink, whether you’re handling personal messages, customer queries, or internal staff notes. It can draft the email, but remember, it can't send it for you – you'll always have the final say!
- A device with a web browser: You'll be using web-based tools, so a computer or tablet is ideal.
- A working email account: You'll need an account like Gmail, Outlook, or any web-based service.
- A free AI account with API access: You'll need access to an AI service that offers an API key. Think of this like a special password that lets other programs connect to the AI securely. Examples include OpenAI's platform (for ChatGPT models), Claude, or Google's AI Studio. While signing up for these platforms is often free, using the API incurs small costs, typically a few cents per request. A "free chat account" alone usually isn't enough, as you need developer access.
- A free account with a no-code automation service: Tools like Zapier, Make, or IFTTT allow different apps to "talk" to each other without writing any computer code. We'll use Zapier as our example. Be aware that creating multi-step workflows, like the one in this guide, often requires a paid plan after a trial period or for higher usage, even if initial sign-up is free.
- Time commitment: This setup will take approximately 20-30 minutes to complete the initial steps and then a few minutes for testing and refining.
Sign up and find your AI API key
Your first step is to get an API key from your chosen AI tool. An API key is a unique string of characters that acts like a secret token, allowing external services (like our automation tool) to communicate with the AI securely without you manually logging in each time.
Open your web browser and go to the developer platform for your chosen AI (e.g., platform.openai.com for OpenAI, console.anthropic.com for Claude). After you log in or sign up, you'll typically see a dashboard. Look for a menu item like "API Keys," "Settings," or "Developer" in the left sidebar or under your profile picture. When you click it, you should see an option to "Create new secret key" or "Generate API key." Click this button. A new, long string of letters and numbers will appear on your screen. Immediately copy this key and paste it into a secure location, like a password manager or a temporary text document. You usually won't be able to see it again after you close the window, so don't lose it!
You'll know it worked when you have a long, unique string of characters (your API key) copied and safely stored, confirming your AI platform is ready for connection.

Create a new email filter
Next, you'll set up a filter in your email account. A filter is like a personal email sorter that automatically watches for incoming messages that match specific criteria (like words in the subject line or sender address) and then performs an action. For this guide, we'll create a filter that identifies emails that need an AI-generated draft reply.
Open your email account in a web browser and navigate to your email settings. Look for options labelled "Filters," "Rules," or "Manage rules." For Gmail users, click the gear icon (⚙️) in the top-right corner, then select "See all settings," and finally, click on "Filters and Blocked Addresses." Here, you'll see a button like "Create a new filter." Click it, and a form will appear with fields such as "From," "To," and "Subject." In the "Subject" field, type a distinct word or phrase that will signal to your system that this email needs an AI-drafted reply, such as "AI Draft Request" (without the quotes). Leave all other fields blank for now. Then, click "Create filter" or "Continue." A warning might appear about not having actions selected; that's fine for now, just confirm.
You'll know it worked when you see your newly created filter listed among your email rules, indicating it's ready to watch for matching emails.

Craft your AI prompt template
Now it’s time to write the instructions you'll give to your AI, known as a prompt. This is like telling a human assistant exactly how to draft a reply for you. A prompt template includes special placeholders, which are like empty boxes where the AI will insert specific information from the email it needs to reply to.
Open a simple text editor (like Notepad, Google Docs, or Apple Notes) where you can easily copy and paste text. Think about the kind of replies you want: friendly, formal, concise, or detailed. A good prompt is clear and tells the AI its role and what to do. For instance, you’ll instruct it to acknowledge the sender and suggest a few steps. The crucial placeholder you’ll use is {{email_body}} – this tells the AI exactly where to insert the actual content of the email it's replying to.
You'll know it worked when you have a complete, clear instruction, including {{email_body}}, saved in your text editor, which you feel confident will produce the kind of reply you're after.
You are a professional customer service assistant. Write a polite, concise draft email reply in Australian English. Acknowledge the sender's message and explain that we've received their query. Clearly state that someone will respond within 2 business days. Keep the reply under 60 words.
Email content to reply to: {{email_body}} ```

Set up the Zapier trigger
This step brings your email and AI together using an automation service like Zapier. A "Zap" in Zapier is an automated workflow that starts with a Trigger (an event that kicks things off) and then performs one or more Actions. Here, our trigger will be a new email matching the filter you set up in Step 2.
Log in to your Zapier account and click the "Create Zap" button. You'll see a screen to choose your Trigger. Search for and select your email provider (e.g., "Gmail"). For the "Event" field, choose "New Email Matching Search." You'll then be asked to connect your email account if you haven't already. In the "Search String" field, enter the exact phrase you used in your email filter in Step 2 (e.g., subject:"AI Draft Request"). Follow the prompts to test this trigger. Zapier will try to find a recent email that matches your criteria to ensure it's working.
You'll know it worked when Zapier successfully tests your trigger, indicating it can find new emails that match your filter criteria.
- For "Event," choose "New Email Matching Search."
- For "Search String," type
subject:"AI Draft Request"(including the quotes). - Click "Continue" and follow the steps to connect your Gmail and test the trigger.

Add the AI action in Zapier
Now that Zapier can detect new emails, you need to tell it to send that email's content to your AI to generate a reply. This is the first Action step in your Zap.
After successfully setting up your trigger, click the "Add a step" button (often a plus sign or "Action" button). Search for and select your chosen AI tool (e.g., "OpenAI" or "Claude"). For the "Event" field, you'll typically choose an action like "Send Prompt" or "Generate Content." You'll be prompted to connect your AI account; this is where you'll paste your API key from Step 1. In the "Prompt" field, paste your entire prompt template from Step 3. Crucially, replace the {{email_body}} placeholder by clicking into the prompt field and selecting the "Body" or "Plain Body" option from your previous email trigger step. This tells the AI to use the actual email content. You might also be asked to select a model (e.g., "gpt-3.5-turbo"). Test this action to see if the AI generates a sample response.
You'll know it worked when the test of this action shows a generated text response from the AI, containing a draft reply based on a sample email.
- For "Event," choose "Send Prompt."
- Connect your OpenAI account by pasting your API Key from Step 1.
- In the "Prompt" field, paste your full template. Click into the prompt field where
{{email_body}}was, and from the dropdown that appears, select "Body Plain" (or similar) from the Gmail trigger step. - Test the action.

Create the email draft in Zapier
The final step in your Zap is to take the AI's generated response and save it as a new draft email in your inbox. This is the second Action step.
After successfully testing your AI action, click "Add a step" again. Search for and select your email provider (e.g., "Gmail"). For the "Event" field, choose "Create Draft." You'll connect your email account again if needed. In the fields that appear, you'll map the AI's response to the body of your new draft. For "To," you can select the "From Email" from your initial trigger. For "Subject," you might write "RE: " and then select the "Subject" from your trigger. For the "Body" field, select the output from your AI action step (e.g., "Choice 1 Text" or "Content"). You can also choose to include the original email if you like. Finally, activate your Zap by turning it "On."
You'll know it worked when Zapier successfully tests this action by creating a new draft in your email account, containing the AI's response.
- For "Event," choose "Create Draft."
- Connect your Gmail account.
- For "To," select "From Email" from your initial Gmail trigger step.
- For "Subject," type
RE:and then select "Subject" from the initial Gmail trigger step. - For "Body," select "Choice 1 Text" from your OpenAI action step.
- Test the action and then turn your Zap "On."

Test your automation and refine
The hard work is done – now for the fun part: testing! You want to make sure your AI assistant is drafting exactly what you expect.
Open your email client and send yourself a brand new email that perfectly matches the filter criteria you set in Step 2 (e.g., using "AI Draft Request" in the subject line). Go to your "Drafts" folder in your email account. After a minute or two, you should see a newly generated draft reply there. Read it carefully. Is the tone right? Is it too long or too short? Does it make sense? If the draft isn't quite right, go back to Zapier, edit your AI action step, and tweak the wording of your prompt template. Change things like "short, professional" to "brief, friendly and informal," or adjust the word count. Then, send yourself another test email and check the new draft. You can repeat this process as many times as needed to get the perfect reply. Always remember to review each draft before hitting send – the AI is there to assist, not replace your judgement.
You'll know it worked when you consistently receive AI-generated drafts in your drafts folder that you would feel comfortable sending, maybe with just a minor edit or two, matching your desired tone and content.

- Not protecting your API key: This key grants access to your AI account, potentially incurring costs. Store it securely in a password manager and never share it publicly. If it's compromised, immediately generate a new one and delete the old one in your AI tool's settings.
- Setting the email filter too broadly: If your email filter (from Step 2) is too general (like "contains 'the'"), you'll get draft replies for newsletters, spam, and personal messages you don't need help with. Make your filter specific to recurring, predictable email types (e.g.,
subject:"AI Draft Request"orfrom:"[specific sender email]"). - Skipping the final review step: While AI is powerful, it can occasionally misinterpret tone, insert invented facts, or miss crucial nuances. Always give the draft a quick read before hitting send to avoid embarrassing mistakes or misleading your recipient.
In the next two minutes, open your email settings, create a new filter, and set it to watch for the subject word "test" (without quotes). For now, set the action to "Mark as important" and "Apply the filter to matching conversations." This tiny change will already start grouping similar emails, making it easier to apply the AI draft process later. Happy automating!
✦ Original step-by-step guide by AI World Co.'s AI editorial team. Written in plain language, reviewed for accuracy.
← Back to all stories