Long emails are a specific kind of tax on your attention. A client sends a 900-word message that contains three questions, two attachments you need to track down, and one deadline buried in paragraph four. You read it twice, take notes in a separate tab, and still end up re-reading it before the call. Multiply that by the volume of email most professionals deal with and you have a situation where a non-trivial part of the workday goes into parsing text rather than acting on it.
Claude's API handles this well. Give it a long email body and a clear instruction, and it returns a structured summary — key points, action items, deadlines — in seconds. The interesting part is wiring that capability into a Gmail workflow that runs automatically, without you triggering anything manually. Zapier is the most practical way to do this without writing a backend service to handle it yourself.
This guide covers the complete setup: getting an Anthropic API key, understanding which Claude model to use and why, building the Zap step by step, writing a prompt that produces reliable summaries rather than vague paraphrasing, and handling the edge cases that cause automations like this to fail silently. By the end, every email that hits your inbox — or a specific label — gets a Claude-generated summary delivered somewhere you actually check.
Before You Build: What This Automation Actually Does
It helps to be clear about the data flow before touching any settings. The finished workflow runs like this:
- Gmail receives an email (or you apply a label to it)
- Zapier detects the new email and extracts the subject line, sender, and body text
- Zapier sends that data to the Anthropic API with a prompt you define
- Claude processes the email body and returns a summary
- Zapier takes that summary and delivers it — to a Slack channel, back to Gmail as a draft reply, into a Notion database, or any other destination you choose
The Anthropic Claude integration on Zapier handles the API call natively. You do not need to write code or configure webhooks manually. You do need an Anthropic API key and a Zapier plan that supports the Claude action, which currently requires at least the Zapier Professional plan.
Getting Your Anthropic API Key
Go to console.anthropic.com and sign in or create an account. Navigate to API Keys in the left sidebar. Click Create Key, give it a recognizable name like zapier-email-summary, and copy the key immediately — Anthropic shows it only once.
Add billing information under the Billing section if you have not already. The API does not work without a payment method on file, even during early usage when costs are negligible. For the email summarization workflow described here, costs are genuinely low. A typical long email is roughly 500 to 800 tokens of input. Claude's response — a summary — is usually 150 to 250 tokens of output. Here is what that costs across the current model lineup:
| Model | Input (per 1M tokens) | Output (per 1M tokens) | Best for email summarization |
|---|---|---|---|
| Claude Haiku 4.5 | $1.00 | $5.00 | High-volume, cost-sensitive |
| Claude Sonnet 4.6 | $3.00 | $15.00 | Better comprehension, nuanced output |
| Claude Opus 4.7 | $5.00 | $25.00 | Complex long-form analysis |
At Haiku 4.5 pricing, summarizing 1,000 emails costs roughly $0.65 in input tokens and $1.25 in output tokens — just under $2 total. For most use cases, Haiku 4.5 is the right default here. It is fast, cheap, and produces solid summaries. The quality difference between Haiku and Sonnet becomes meaningful when emails are very long, technically dense, or require judgment calls about priority — not for a standard inbox summary workflow.
Setting Up the Zap: Gmail Trigger
Log into Zapier and click Create Zap. The first step is always the trigger — the event that starts the workflow.
Choosing the Right Gmail Trigger
Zapier offers two Gmail triggers that are useful here:
- New Email — fires for every incoming email to the inbox or a specific label
- New Labeled Email — fires only when an email has a specific label applied, either automatically or manually
For most people, New Labeled Email is the better choice. It gives you control over which emails get summarized. You can create a Gmail label called Summarize and apply it manually to emails you want processed, or set up a Gmail filter that auto-labels emails from specific senders or containing certain keywords.
If you want every incoming email summarized automatically, New Email works — but be aware this will trigger on newsletters, automated receipts, and spam that makes it past Gmail's filter. The summary output is only as useful as the email input.
Configuring the Gmail Trigger
- Select Gmail as the trigger app
- Choose New Labeled Email as the trigger event
- Connect your Gmail account when prompted
- In the Label/Mailbox field, type the name of the label you created (e.g. Summarize) or choose Inbox for all email
- Click Test Trigger — Zapier pulls recent emails matching the criteria
- Select a long email from the test results to use for mapping fields in the next step
Adding the Claude Action
After the trigger is configured, click the plus button to add an action. Search for Anthropic and select it. The action event you want is Send Message.
Connecting Your API Key
Click Connect a new account. Zapier will ask for your Anthropic API key. Paste the key you created earlier. Zapier will verify it by making a test call to the API. If the connection fails, double-check that billing is enabled on your Anthropic account — an API key without a payment method attached returns an authentication error even when the key itself is valid.
Configuring the Claude Action
Once connected, the action has three main fields to fill in: Model, Max Tokens, and the message content. Here is how to configure each:
Model
In the Model dropdown, select claude-haiku-4-5 for standard inbox summarization. If you are on a plan that gives you access to Sonnet, set it to claude-sonnet-4-6 for more detailed output. Do not use Opus for this workflow — the quality difference on email summarization does not justify the cost difference at scale.
Max Tokens
Set this to 500. A good email summary does not need more than 400 tokens of output. Setting a cap prevents unexpectedly long responses if Claude decides to be thorough, which keeps costs predictable and keeps the summary tight enough to be useful.
The System Prompt
The System Prompt field is where you tell Claude what role it is playing and what the rules are. This is separate from the actual email content. A good system prompt for email summarization:
System Prompt field in Zapier You are an email summarization assistant. Your job is to read professional emails and extract the information that matters. Always structure your output as follows: SUMMARY (2-3 sentences max): A plain-language description of what this email is about. ACTION ITEMS: A bulleted list of anything the recipient needs to do. If there are no action items, write: None. KEY DATES / DEADLINES: Any dates, deadlines, or time-sensitive information mentioned. If there are none, write: None. TONE: One word describing the sender's tone: Urgent / Friendly / Formal / Concerned / Neutral. Do not include pleasantries, restate the email structure, or add commentary. Stick to the format above.
The explicit structure in the system prompt is what makes this workflow consistently useful rather than occasionally useful. Without a format requirement, Claude will produce readable prose summaries that vary in length and emphasis depending on the email. That variability makes it hard to scan quickly. A fixed structure means every summary looks the same — you train your eye to find the action items section instantly.
The User Message (Where the Email Goes)
The User Message field is where you insert the actual email content from your Gmail trigger. Click inside the field, then click the Insert Data button on the right side of the field (or type the curly brace { symbol to open the data picker).
Map these fields from the Gmail trigger:
User Message field — mapping Gmail data
From: {{Gmail > From}}
Subject: {{Gmail > Subject}}
Date received: {{Gmail > Date}}
Email body:
{{Gmail > Body Plain}}
Use Body Plain, not Body HTML. The HTML version includes CSS, table tags, tracking pixel markup, and other noise that eats tokens without helping Claude understand the email. The plain text version is what you want — it is what you would see if you selected all the text in the email and copied it.
Stripping HTML Before Sending to Claude (Optional but Worth It)
If your email clients send HTML-heavy messages, add a Formatter step between the Gmail trigger and the Claude action. This step runs before Claude sees the content and removes the markup.
Setting Up the Formatter Step
- Add a new action step between Gmail and Claude
- Choose Formatter by Zapier
- Select Text as the transform type
- Choose Strip HTML as the event
- In the Input field, map Gmail > Body HTML
- In the Claude step, change the body field to use Formatter > Output instead of Gmail > Body Plain
The Formatter step costs one operation in your Zapier plan per email processed. For high-volume inboxes, factor this into your plan limits.
Delivering the Summary — Where It Goes Next
Claude returns the summary as a text output in Zapier. The final step of your Zap sends that text somewhere. The right destination depends on how you work.
Option A: Slack Message
If your team operates in Slack, sending the summary to a dedicated channel works well. Create a channel called email-summaries or email-digest and route all Claude outputs there. Each message includes the email subject, sender, and the formatted summary.
Slack message format using Zapier field mapping
*New email summary*
From: {{Gmail > From}}
Subject: {{Gmail > Subject}}
{{Claude > Output Text}}
The Output Text field from the Claude action contains the full formatted summary. Map it directly into the Slack message body. Slack renders the asterisks as bold, so the header line formats cleanly.
Option B: Gmail Draft Reply
Some people prefer to keep everything inside Gmail. In this case, set the final action to Gmail > Create Draft. Map the To field to the sender's address from the trigger, the Subject to a prefixed version like Re: {{Gmail > Subject}}, and the Body to the Claude summary. You end up with a draft reply already open in Gmail — you read the summary at the top, edit if needed, and send.
Option C: Notion Database Row
If you are already tracking emails in Notion, add a Notion > Create Database Item step. Map the email subject to the item title, the summary to a Text property, the sender to another Text property, and the date to a Date property. Your email log in Notion becomes self-populating.
Option D: Google Docs Append
A running Google Doc that captures the day's email summaries works well for end-of-day review. Use Google Docs > Append Text to Document. Each time the Zap runs, it appends the new summary with a timestamp. Read the doc once at the end of the day instead of processing emails throughout it.
Using Webhooks When You Cannot Use the Native Claude Action
If you are on Zapier's free tier or want more control over the exact API request being made, the Webhooks by Zapier action handles the Claude API call directly. This approach requires a paid Zapier plan for the Webhooks action, but it gives you access to API parameters that the native Claude action does not expose.
Configuring the Webhook Action
- Add an action step and choose Webhooks by Zapier
- Select POST as the event
- Set the URL to
https://api.anthropic.com/v1/messages - Set the Payload Type to JSON
In the Data section, enter the JSON body manually. Zapier lets you build JSON in this field using its field mapper:
{
"model": "claude-haiku-4-5",
"max_tokens": 500,
"system": "You are an email summarization assistant...",
"messages": [
{
"role": "user",
"content": "From: {{Gmail > From}}\nSubject: {{Gmail > Subject}}\n\n{{Gmail > Body Plain}}"
}
]
}
In the Headers section, add two headers:
- x-api-key: your-anthropic-api-key-here
- anthropic-version: 2023-06-01
- content-type: application/json
The response from the API returns as JSON. The summary text lives at content[0].text in the response body. In Zapier, you access this as the webhook output field labeled Content 0 Text, which you then map to your Slack, Gmail, or Notion step.
Prompt Engineering for Better Summaries
The system prompt shown earlier is a solid starting point, but the quality of Claude's output depends heavily on how you frame the task. A few adjustments make a real difference in reliability:
Specify What to Ignore
Long email threads often include forwarded messages, quoted reply chains, and email signatures that are not part of the actual content. Tell Claude to ignore them:
Ignore email signatures, forwarded message headers, quoted reply chains, and unsubscribe links. Focus only on the most recent message in the thread.
Handle Short Emails Gracefully
One-line emails do not need a four-section summary. Without instruction, Claude will dutifully produce a SUMMARY, ACTION ITEMS, KEY DATES, and TONE section for an email that says "Meeting pushed to Thursday." Add a conditional instruction:
If the email is shorter than 50 words, output only a single sentence summary prefixed with SHORT EMAIL: Do not use the structured format for short emails.
Handling Emails in Other Languages
If your inbox includes emails in languages other than English, Claude handles them without additional configuration — it reads and summarizes across languages. However, by default it will summarize in the language of the email. If you want all summaries in English regardless of the email language, add:
Always write your summary output in English, regardless of the language of the original email.
Testing the Zap and Handling Errors
Before turning the Zap on, run it against three different email types: a short one-liner, a standard medium-length email, and the longest email you can find in your inbox. Run each test individually using Zapier's Test step button, which lets you select which email from your recent trigger pulls to use for each test.
Check the Claude output in Zapier's task history for each test. Look for:
- The structured format being followed consistently across all three
- The ACTION ITEMS section correctly identifying things to do versus things being stated as information
- Short emails triggering the short-form output rather than four empty sections
- No forwarded message content leaking into the summary
Common failure patterns and what causes them:
Summary is empty or returns an error
The most common cause is the email body being empty in the Zapier trigger. Some emails are image-only or have HTML bodies with no plain text equivalent. Add an error handling step in Zapier — Filter by Zapier — that only continues if Body Plain is not empty. Place this filter after the Gmail trigger and before the Claude action.
Filter condition to prevent empty body errors Filter: Only continue if... Field: Gmail > Body Plain Condition: Text length is greater than Value: 20
Summary output is too long despite max_tokens setting
This happens when Claude is mid-sentence when it hits the token limit and Zapier receives a truncated response. Increase max_tokens to 700 or reduce the structure in your system prompt so each section is shorter. Alternatively, add explicit word limits: Summary: 50 words max, Action Items: 10 words per bullet.
Zap runs but Claude output does not appear in the destination
Usually a field mapping issue in the final step. Check that you are mapping Claude > Output Text (in the native Claude action) or Webhooks > Content 0 Text (in the webhook approach), not a different Claude output field. Open Zapier's task history for the failed run and check what data each step received and sent.
Running This Long-Term
Monitor your Anthropic usage in the console at console.anthropic.com. The Usage tab shows token consumption by day. If costs spike unexpectedly, look for emails with unusually long bodies — forwarded chains with full history included are the usual culprit. Adding a character limit to the email body before sending it to Claude prevents this. In Zapier, use a Formatter > Text > Truncate step to cap the body at 3,000 characters before it hits the Claude action.
The other thing worth doing after the first month: revisit the system prompt. By then you will have seen dozens or hundreds of actual summaries and you will know exactly what the format is getting wrong or missing. Maybe your inbox has a lot of vendor invoices and you want a TOTAL AMOUNT line in the summary. Maybe the TONE field is not useful to you and takes space better used for a NEXT STEP field. The prompt is the easiest thing to change, and iterating on it based on real data makes the difference between a workflow you use every day and one you forget about.