Create Masked Emails with Fastmail API in n8n Automation

This n8n workflow automates creating masked email addresses using the Fastmail API via a webhook POST request, saving time and boosting email privacy by generating disposable emails instantly.
httpRequest
webhook
set
+2
Workflow Identifier: 2481
NODES in Use: httpRequest, set, webhook, respondToWebhook, stickyNote
Automate masked emails with n8n and Fastmail API

Press CTRL+F5 if the workflow didn't load.

Learn how to Build this Workflow with AI:

What this workflow does

This workflow creates new Fastmail masked email addresses automatically when you send a POST request to its webhook.

It saves time by removing manual steps of logging in and setting up masked emails.

You get back the masked email address and its description right in the webhook response.

The workflow handles authentication, session fetching, and calling Fastmail’s JMAP API to create the mask.


Who should use this workflow

This workflow is for developers or testers who need to create Fastmail masked emails often.

It works well if you want less manual work and fewer errors when making masked emails.

Anyone with Fastmail API access and a bit of automation setup can use it.


Tools and services used

  • Fastmail API: To get session info and create masked email addresses.
  • n8n automation platform: To build the workflow, handle webhook triggers, HTTP requests, and responses.
  • Webhook client (like curl or Postman): To send POST requests to the workflow endpoint.

Inputs, Processing Steps, and Output

Inputs

  • POST request to the webhook with JSON fields: state (email mask status) and description (label for the mask).
  • Fastmail API credentials set in n8n to authenticate API calls.

Processing Steps

  • Use Webhook node to receive input data.
  • HTTP Request node (Session) calls Fastmail’s session endpoint to get account IDs.
  • Set node (get fields for creation) sets default values for state and description if missing.
  • HTTP Request node (create random masked email) sends JSON body with account ID and fields to Fastmail API to create the masked email.
  • Set node (prepare output) extracts new masked email and description from API response.
  • Respond to Webhook node sends back the masked email info as the POST response.

Output

  • JSON response containing new masked email address and its description.

Beginner step-by-step: How to use this workflow in n8n production

Step 1: Download and Import Workflow

  1. Find the Download button on this page and save the workflow file.
  2. Open n8n editor where you want to use the workflow.
  3. Click “Import from File” and select the downloaded file.

Step 2: Configure Credentials

  1. Add your Fastmail API Key in n8n’s HTTP Header Authentication credentials.
  2. Ensure the HTTP Request nodes that call Fastmail use this credential.

Step 3: Update IDs and Parameters if Needed

  1. Check if any account IDs, emails, or folder IDs need updating from your Fastmail account.
  2. Adjust Set nodes if you want different default description or state.

Step 4: Test the Workflow

  1. Send a POST request to the workflow webhook URL with JSON, for example:
{
  "state": "active",
  "description": "Test Mask"
}

  1. Verify you get a JSON response with the new masked email and its description.

Step 5: Activate Workflow for Production

  1. Toggle the workflow status to active in n8n.
  2. Use the webhook URL in your app or scripts to create masked emails automatically.
  3. Monitor executions inside n8n for errors or retries.

To run this well over time, consider self-host n8n for better control of uptime and security.


Customization ideas

  • Change the default masked email state from “pending” to “active” or “disabled” in the get fields for creation node.
  • Add more fields like note or expires in the create random masked email node JSON to control metadata or auto-expiry.
  • Protect the webhook by adding authorization or IP filtering to avoid misuse.
  • Log each created masked email to Google Sheets or a database for tracking after the prepare output node.
  • Add other triggers like Scheduler nodes to make masked emails on a regular time basis without a webhook call.

Common edge cases and troubleshooting

  • 401 Unauthorized error: Check if Fastmail API credentials are correct and HTTP Header Auth is used.
  • Webhook not triggering or empty response: Confirm webhook uses POST method and Respond to Webhook node is connected properly.
  • Missing or invalid accountId in masked email creation: Verify that primaryAccounts['https://www.fastmail.com/dev/maskedemail'] is correctly referenced from Session node output.

Deployment advice

Make sure Fastmail API keys work and are valid in n8n credentials.

Test creating masked emails with different inputs using the webhook.

Keep monitor logs for errors after turning workflow active.

Add security on the webhook if this is reachable on the public internet.

Use self-host n8n if reliable uptime and control are important.


Summary

✓ Save time by automating Fastmail masked email creation

✓ Reduce manual errors in email mask setup

✓ Get immediate JSON response with new masked email info

→ Use a webhook POST with state and description to create masks

→ Workflow fetches session data, creates email mask, and returns detail

✓ Easy import and setup inside n8n for production use


Automate masked emails with n8n and Fastmail API

Visit through Desktop to Interact with the Workflow.

Frequently Asked Questions

Set up HTTP Header Authentication credentials in n8n with your Fastmail API Key and link them to HTTP Request nodes.
The JSON must include ‘state’ for the masked email status and ‘description’ for labeling the email mask.
It means the workflow is not reading the ‘primaryAccounts’ ID correctly; check the Session node output and field references.
Enable authorization settings on the Webhook node or restrict access by IP filtering or other security layers.
Author
Written By
Vikash Kumar
Building AI agents, n8n workflows and end-to-end automation for 30+ Brands across India, the US, Europe, Dubai & Australia. 7+ years of Experience saving founders real hours every week - no code required.

Related Workflows

Automate Twist Channel Creation and Messaging with n8n

This workflow automates creating and updating a channel in Twist and sending a personalized message to specific users. It eliminates manual setup errors and saves time managing Twist communications.

Automate Ideogram Image Generation with Google Sheets & Gmail

This workflow automates graphic design image generation via Ideogram AI, storing image data in Google Sheets and Google Drive, with email alerts via Gmail. It saves designers hours by automating image creation, remixing, review, and record-keeping.

Automate IT Support with Slack and OpenAI in n8n

Streamline IT support by automating Slack message handling using n8n and OpenAI. This workflow handles Slack DMs, filters bots, queries a Confluence knowledge base, and delivers AI-generated responses, improving support efficiency and response time.

Automate Crypto Analysis with CoinMarketCap & n8n AI Agent

Discover how this unique n8n workflow leverages CoinMarketCap’s multi-agent AI to deliver precise, real-time cryptocurrency insights directly via Telegram. Manage crypto data analysis efficiently with automated multi-source API integration.

Automate Gumroad to Beehiiv Subscriber Sync with n8n

Learn how to automatically add new Gumroad sales customers as Beehiiv newsletter subscribers using n8n automation. This workflow saves time by syncing sales data to Google Sheets CRM and notifying your Telegram channel instantly.

Generate On-Brand Blog Articles Using n8n and OpenAI

This workflow automates the creation of on-brand blog articles by analyzing existing company content using n8n and OpenAI. It extracts article structures and brand voice to produce consistent draft articles, saving significant content creation time.
1:1 Free Strategy Session
Your competitors are already automating. Are you still paying for it manually?

Do you want to adopt AI Automation?

Every hour your team does repetitive work, you're burning real money.
While you wait, faster businesses are cutting costs and moving quicker.
AI and automations aren't the future anymore — they're the present.

Book a live 1-on-1 session where we show you exactly which of your daily tasks can be automated — and what it’s costing you not to.