n8n

How to Generate Fastmail Masked Emails for Privacy?

Protect signups and test flows with disposable emails made on demand. A simple POST request creates a fresh masked email and sends it right back. Great for privacy focused teams, QA testing, and safe trials.

Here is how it works from end to end. A webhook receives a POST with optional state and description. The Session request pulls account data from the Fastmail JMAP session endpoint and uses header based auth. A Set node maps state and description, then a POST call creates the masked email using the JMAP MaskedEmail set method. Another Set node extracts the email address from the response, and the workflow replies to the original request with the new email and its description.

You will need a Fastmail account and an API token with access to the JMAP masked email feature. Add header authentication in n8n and secure the webhook if it is exposed to the internet. Expect faster testing, cleaner signups, and less spam because every form gets a unique address. Teams can generate addresses for partner forms, demos, and sandbox accounts without manual steps.

What are the key features?

  • Webhook trigger accepts POST requests with state and description fields
  • Session call retrieves Fastmail JMAP session data using header authentication
  • Dynamic field mapping sets state and description with safe defaults
  • JMAP MaskedEmail set method creates a new masked email address
  • Output parsing extracts the email and attaches the description
  • Immediate HTTP response returns the new email to the caller

What are the benefits?

  • Reduce manual work from 5 minutes to 10 seconds per email
  • Automate 100 percent of masked email creation on request
  • Improve sign up hygiene by using unique addresses for every form
  • Cut testing time for QA teams by at least 60 percent
  • Connect any app that can send a webhook to Fastmail

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. See the Tools Required section above for links to create accounts with these services.
  3. In your Fastmail account, create an API token with JMAP access. Keep it safe as you will use it for header based authentication.
  4. Open the Webhook node and confirm the HTTP method is POST and the path is createMaskedEmail. Set Response Mode to Response Node.
  5. Double click the Session HTTP Request node. In the credential dropdown, click Create new credential and follow the on screen steps to add HTTP Header Auth using your Fastmail token. Keep the URL as https://api.fastmail.com/jmap/session.
  6. Open the create random masked email HTTP Request node. Select the same Fastmail header credential. Confirm method is POST and Content Type is application/json.
  7. Review the get fields for creation Set node. Ensure state and description map from Webhook body with a default state of pending if none is sent.
  8. Check the prepare output Set node. Confirm it maps the email from methodResponses to a simple email field for the final response.
  9. Activate the workflow and copy the Production webhook URL from the Webhook node.
  10. Test with curl using a JSON body that includes state and description. Verify that the response returns the new masked email and the description.
  11. If you receive auth errors, confirm the Fastmail token is valid and that the Authorization header is configured in the credential. If the response is empty, check the JSON path in prepare output and the accountId mapping from the Session node.

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

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.