Fastmail Masked Email Address Generation via Webhook - n8n Workflow

Use this efficient n8n workflow to instantly generate new masked email addresses via the Fastmail JMAP API, triggered by an external webhook. Perfect for privacy automation.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?


  • Users seeking enhanced online privacy through disposable email addresses.

  • Developers needing to integrate Fastmail masked email generation into their applications or testing pipelines.

  • Technical users looking for reliable n8n templates for custom API interactions.

  • Anyone wanting to automate privacy-focused tasks using a specific n8n trigger.

Overview

This powerful n8n workflow template solves the need for instantly provisioned, privacy-enhancing email addresses. By automating interaction with the Fastmail JMAP API, this n8n workflow allows developers and privacy-conscious users to create disposable, masked email accounts on demand via a simple API call (the n8n trigger). This eliminates manual steps and ensures consistent configuration, making this n8n node sequence ideal for integrating masked email functionality directly into applications or personal automation systems. This specific n8n workflow uses HTTP Header authentication for secure API communication, providing a robust solution among available n8n templates.

How it Works

The entire n8n workflow is initiated by an external POST request targeting the Webhook n8n trigger. This automation ensures a single, seamless process from initiation to completion.


  1. Webhook Trigger: The Webhook n8n trigger is the starting point, listening for incoming POST requests. The request body can optionally contain state and description for the new email address.

  2. Session Retrieval: The first HTTP Request n8n node (Session) calls the Fastmail JMAP session endpoint. This is crucial as it authenticates and retrieves the required accountId needed for subsequent Fastmail API calls within the n8n workflow.

  3. Data Preparation: A Set n8n node (get fields for creation) extracts the state and description provided in the webhook payload, ensuring default values are used if input fields are missing.

  4. Masked Email Creation: The core logic resides in the second HTTP Request n8n node (create random masked email). This n8n node sends a complex JSON body to the JMAP API, utilizing the retrieved account ID and the prepared state/description to execute the MaskedEmail/set method, thus generating the new masked email.

  5. Output Formatting: A subsequent Set n8n node (prepare output) parses the detailed API response, isolating the newly created email address and attaching the description.

  6. Response: The n8n workflow concludes by using the Respond to Webhook n8n node to send the structured output (the new masked email address and its description) back immediately to the system that fired the initial n8n trigger.

Installation Guide

To deploy and utilize this n8n workflow, follow these steps:


  1. Import the n8n template: Copy the provided JSON code and import it directly into your n8n instance via the 'Workflows' menu.

  2. Set up Credentials: This n8n workflow requires Fastmail API credentials using HTTP Header Authentication.

Click on the Credentials field in the Session n8n node and the create random masked email n8n node.
Create or select an existing 'HTTP Header Auth' credential set.
* You will need to configure the header with your Fastmail API token (usually as Authorization: Bearer ). Ensure the same credentials are used across both API request nodes.

  1. Activate the Webhook n8n trigger: Save the n8n workflow and click 'Activate' (or 'Run Once' for testing) to enable the Webhook n8n trigger.

  2. Test: Copy the Webhook URL from the Webhook n8n node and test by sending a POST request with an optional JSON payload, for example:

curl -X POST -H 'Content-Type: application/json' https://your-n8n-instance/webhook/createMaskedEmail -d '{"state": "pending", "description": "Registration for a new service"}'

Node Details


  • Webhook (n8n trigger): Initiates the automation upon receiving an external POST request. Configured to return a response via a subsequent n8n node.

  • Session (n8n node): An HTTP Request n8n node used to securely fetch the Fastmail JMAP session and critical account IDs using pre-configured Fastmail credentials.

  • get fields for creation (n8n node): A Set n8n node that extracts and sanitizes input data (state and description) from the initial webhook body before the creation API call.

  • create random masked email (n8n node): The core HTTP Request n8n node that sends the JMAP MaskedEmail/set command to the Fastmail API, dynamically using data retrieved from previous n8n nodes.

  • prepare output (n8n node): A Set n8n node that formats the final data, specifically extracting the newly generated email address from the complex Fastmail API response.

  • Respond to Webhook (n8n node): Sends the final success message and the created email details back to the original caller of the n8n trigger.

Related n8n Workflows

Free

Nodes: 5 Nodes
Updated: December 26 2025
View all
Created by
Vitali
Vitali

Featured*