Actions4
Overview
This node integrates with the Mail.tm temporary email service API, enabling users to manage email accounts and messages programmatically within n8n workflows. It supports operations such as creating accounts, retrieving messages, deleting messages, marking messages as read, downloading attachments, and applying inbox rules.
Common scenarios include:
- Automating temporary email account creation for testing or sign-up processes.
- Fetching the latest or specific emails to extract information or trigger further workflow steps.
- Cleaning up inboxes by deleting unwanted messages automatically.
- Waiting for incoming emails matching certain criteria and extracting URLs from them.
- Applying custom rules to manage inbox content (e.g., auto-delete spam).
Practical example:
- A user creates a temporary email account, waits for a confirmation email, extracts a verification URL from it, and uses that URL in subsequent automation steps.
Properties
| Name | Meaning |
|---|---|
| Auth Token | Authentication token from a previous step; if provided, it overrides credential usage. |
| Username | Username for creating a new Mail.tm email account (used only when creating an account). |
| Password | Password for creating a new Mail.tm email account (used only when creating an account). |
| Action (Message) | The message-related operation to perform. Options: Delete a single message, Delete all messages, Get a message by ID, Get the latest message, List all messages (paginated), Mark a message as read. |
| Message ID | Identifier of the message to operate on (required for get by ID, mark as read, delete actions). |
| Page | Page number for paginated listing of messages. Defaults to 1. |
| Timeout (Seconds) | Time to wait for a message to arrive when using the "Wait for message and extract URLs" workflow action. Defaults to 60 seconds. |
| Subject Contains | Optional text filter to wait for a message whose subject contains this string (used in waiting for messages). |
| Rules | JSON array defining inbox rules to apply, e.g., conditions to delete or mark messages as read. Example rules include deleting messages from a spam address or marking newsletters as read. |
Output
The node outputs JSON data representing the result of the selected operation:
- For message retrieval operations, the output includes message details such as sender, subject, body, and metadata.
- For deletion or marking operations, the output confirms success and affected message IDs.
- When downloading attachments, the node outputs binary data containing the attachment file.
- For workflows like waiting for messages and extracting URLs, the output includes the matched message and an array of extracted URLs.
- Listing operations return arrays of messages, domains, or other relevant entities.
Binary data output is used exclusively for downloaded attachments, providing the file content ready for further processing or saving.
Dependencies
- Requires access to the Mail.tm API endpoint (
https://api.mail.tm). - Needs either an authentication token provided directly or credentials configured with a username and password to obtain a token.
- No additional external dependencies beyond standard HTTP requests.
- No internal credential names are exposed; users must supply appropriate API authentication tokens or credentials.
Troubleshooting
- Authentication required error: Occurs if neither an auth token nor valid credentials are provided. Ensure you supply a valid token or configure credentials correctly.
- No available domains found: When creating an account, the node fetches available domains. If none are returned, account creation cannot proceed. Verify Mail.tm service availability.
- Attachment not found: When attempting to download an attachment, ensure the specified message and attachment IDs exist.
- Timeout waiting for message: When using the wait-for-message action, if no matching message arrives within the timeout period, an error is thrown. Increase the timeout or adjust the subject filter.
- Rate limiting or API errors: The node does not explicitly handle rate limits; if the Mail.tm API returns errors, consider adding delays or retries in your workflow.