n8n

How to Automate Fastmail Email Responses?

Speed up email replies without losing a human touch. The flow reads new messages from your inbox, uses AI to write a friendly answer, and saves a draft in Fastmail for quick review and send. It suits customer support teams, founders, and busy professionals who want faster, consistent replies.

Here is how it runs. An IMAP email watcher looks for unread messages and collects key fields like sender, subject, and plain text body. Those details go to OpenAI GPT 4o to write a short, casual response that fits the incoming email. In parallel, the flow calls Fastmail’s JMAP session to get the right account and mailbox list, splits the results, and filters to find the Drafts folder. The data is assembled into a draft payload and posted to Fastmail Email set so the reply shows up in Drafts, ready to edit or send.

You need IMAP access to your mailbox, a Fastmail account with JMAP enabled, and an OpenAI API key. Expect reply drafting time to drop sharply while keeping a person in the loop. Great for shared support inboxes, sales follow ups, and personal assistants that prepare answers you can approve in seconds.

What are the key features?

  • IMAP monitoring watches for new unread messages and pulls sender, subject, and body text.
  • Field extraction maps email contents into clean variables for later steps.
  • OpenAI GPT 4o generates a casual, plain text reply based on the original message.
  • Fastmail JMAP session fetches account details and mailbox IDs securely.
  • Split and filter logic finds the Drafts mailbox even in large accounts.
  • Payload builder assembles to, subject, references, and the AI reply into an Email set request.
  • HTTP request uploads the draft to Fastmail so you can review and send.
  • Attachment download is enabled for context if needed.

What are the benefits?

  • Reduce manual reply writing time from 10 minutes to under 2 minutes per email
  • Automate 70 percent of first draft work while keeping human review
  • Connect OpenAI and Fastmail without custom code
  • Handle two to three times more inbound emails with the same team
  • Keep drafts organized by saving to the correct Fastmail folder every time

How do you set it up?

  1. Import the template into n8n: Create a new workflow in n8n > Click the three dots menu > Select 'Import from File' > Choose the downloaded JSON file.
  2. You'll need accounts with Fastmail and OpenAI. See the Tools Required section above for links to create accounts with these services.
  3. Open the Email Trigger IMAP node. Create or select IMAP credentials. Enter your IMAP server, port, username, and password. Choose secure connection if your provider requires it. Keep the search flag set to UNSEEN.
  4. Double click the Session node. In the Credential dropdown, click Create new credential. Choose HTTP Header Auth. Add a header named Authorization with value Bearer YOUR_FASTMAIL_TOKEN. Save.
  5. Open the Get Mailbox IDs and upload draft email nodes. Assign the same Fastmail HTTP Header Auth credential. Ensure Content Type and Accept headers are application/json.
  6. In your Fastmail account, confirm JMAP is available. Your endpoints should be https://api.fastmail.com/jmap/session and https://api.fastmail.com/jmap/api/.
  7. Open the OpenAI node. Create new OpenAI API credentials. Paste your API key from the OpenAI account API page and save.
  8. Review the OpenAI prompt text. Adjust tone or instructions to match your brand voice. Keep output as plain text for clean drafts.
  9. Check the Set nodes for field mappings. Confirm from, to, subject, messageId, and textPlain map correctly from the IMAP trigger.
  10. Run a test. Send a new email to the monitored inbox. In n8n, watch the execution. Confirm the AI reply is generated and that a draft appears in your Fastmail Drafts folder.
  11. If no draft appears, verify the Filter node found the Drafts mailbox, confirm the accountId from the Session node, and check the JMAP API endpoint URLs and headers.
  12. Once validated, enable the workflow in n8n so it watches your inbox and prepares drafts continuously.

Tools Required

$24 / mo or $20 / mo billed annually to use n8n in the cloud. However, the local or self-hosted n8n Community Edition is free.

Fastmail

Sign up

Basic (Business): $4 per user / mo (US, monthly) — includes Masked Email; JMAP API via API token

OpenAI

Sign up

Pay-as-you-go: GPT-5 at $1.25 per 1M input tokens and $10 per 1M output tokens

Similar Templates

Join Futurise to access 1,200+ automation templates

Get instant access to ready-made automation workflows for n8n, Make.com, AI agents, and more. Download, customise, and deploy in minutes.