What This Automation Does
This workflow gets the latest 3 unread emails from your Fastmail Inbox.
It fetches mailboxes, finds the Inbox ID, then queries unread messages there.
You get sender, subject, date, and other email details back every time you run it.
It solves the problem of manually checking unread emails and missing important messages.
You save time and reduce errors in tracking unread emails.
Who Should Use This Workflow
This is good for people who get many emails daily and want to quickly focus on unread important messages.
If manual inbox review wastes your time or causes you to miss emails, this helps.
Tools and Services Used
- Fastmail JMAP API: Source to get mailbox and email data.
- n8n Automation Platform: Used to build and run the workflow.
- HTTP Header Auth Credential in n8n: To authorize API requests.
Beginner Step-By-Step: How to Use This Workflow in n8n
Importing Workflow
- Click the Download button on this page to save the workflow file.
- Inside your n8n editor, click on “Import from File” and upload the saved workflow.
Configuration
- Add your Fastmail API Key in n8n Credentials as HTTP Header Auth.
- Verify or update account or mailbox IDs if workflow needs it. Usually default settings work.
- Check any email addresses or channels if workflow connects to notifications. Update as needed.
Testing and Activation
- Test run the workflow manually with the Manual Trigger. Watch the output for unread emails.
- If results look good, activate the workflow by toggling its status.
- Optionally replace the Manual Trigger with a Cron node for periodic automation.
The workflow then runs automatically or on demand to get unread Fastmail emails.
Click self-host n8n if you want to run workflows on your own server.
Inputs, Process, and Outputs Explained
Inputs
- Your Fastmail API Key as API Key credential.
- The manual trigger or cron event that starts the workflow.
Processing Steps
- Send API request to get session details and primary account ID.
- Use another API call to get all mailboxes in your account.
- Find the Inbox mailbox ID by searching mailbox with role “inbox”.
- Query for 3 latest unread emails using the Inbox ID and account ID.
- Get detailed email data including sender, subject, received date, and keywords.
Outputs
- A list of up to 3 unread emails with key information.
- Data can be used for follow-ups, notifications, or other automation.
Common Issues and How to Fix Them
401 Unauthorized Error: Happens if Fastmail API Key is wrong or expired.
Fix by updating the API Key in n8n Credentials.
Nothing Returns or Null Inbox ID: Could be wrong mailbox role or broken JSON path.
Fix by inspecting mailbox list output and correcting expression to find Inbox.
Ways to Customize This Workflow
- Change the number of unread emails fetched by adjusting “limit” in the final HTTP Request node.
- Get emails from other mailboxes by changing mailbox role filter in the Set node.
- Switch from manual to scheduled runs by adding a Cron node instead of a Manual Trigger.
- Add formatting steps to convert email details into Slack messages or email summaries.
Summary and Results
✓ The workflow gets the latest 3 unread emails from Fastmail Inbox.
✓ Saves time by removing manual inbox checks.
✓ Gives clear email details ready for next steps.
→ Use manual or automatic triggers to run the workflow.
→ Can customize for more emails or other mailboxes.

