Mail.tm icon

Mail.tm

Interact with the Mail.tm temporary email API

Overview

This node integrates with the Mail.tm temporary email service API, allowing users to manage email accounts and messages programmatically within n8n workflows. It supports operations such as creating new email accounts, retrieving authenticated user details, listing and managing messages (including reading, deleting, and marking them as read), downloading attachments, and performing complex inbox workflows like applying rules or waiting for specific messages.

Common scenarios include:

  • Automating the creation of disposable email accounts for testing or sign-up processes.
  • Monitoring an inbox for incoming emails matching certain criteria and extracting URLs from them.
  • Cleaning up inboxes by applying custom rules (e.g., deleting spam or marking newsletters as read).
  • Downloading attachments from received emails automatically.

Practical example:

  • A workflow that creates a temporary email account, waits for a confirmation email containing a URL, extracts the URL, and uses it in subsequent automation steps.

Properties

Name Meaning
Auth Token Authentication token from a previous step; if provided, it overrides credential usage.
Action The specific action to perform under the "Account" operation:
- Create: Create a new email account
- Get Authenticated User Info: Retrieve details about the current authenticated user
Username Username for creating a new email account (required when creating an account).
Password Password for the new email account (required when creating an account).

Note: The "Action" property here corresponds to accountAction and is only shown when the selected operation is "Account".

Output

The output JSON structure varies depending on the selected action:

  • Create Account: Returns an object containing the created account details and authentication token information.
  • Get Authenticated User Info: Returns details about the currently authenticated user.
  • For other actions (not relevant here since only "Account" resource is requested), outputs would include message lists, message details, attachment data, or workflow results.

If the node downloads attachments (not applicable here), binary data representing the file content would be included.

Dependencies

  • Requires access to the Mail.tm API endpoint (https://api.mail.tm).
  • Needs either an authentication token provided via input or credentials configured in n8n for Mail.tm.
  • No additional external dependencies beyond standard HTTP requests.

Troubleshooting

  • Authentication required error: Occurs if neither an auth token nor valid credentials are provided. To fix, supply a valid token or configure credentials properly.
  • No available domains found: When creating an account, if no domains are returned from the API, account creation cannot proceed. Ensure the Mail.tm service is operational and domains are available.
  • Attachment not found: If attempting to download an attachment that does not exist in the specified message, verify the attachment ID and message ID.
  • Timeout waiting for message: When using workflow actions that wait for messages, a timeout error indicates no matching message arrived within the specified time. Adjust timeout or subject filter accordingly.

Links and References

Discussion