Actions9
Overview
This node connects to an IMAP email server to manage emails and mailboxes. Specifically, the "Delete Email" operation allows users to delete a specific email from a chosen folder on their IMAP server by providing the unique identifier of the email.
Common scenarios where this node is beneficial include:
- Automating email cleanup by deleting unwanted or processed emails.
- Managing mailbox storage by removing old or irrelevant messages.
- Integrating email deletion into larger workflows, such as after processing attachments or parsing email content.
For example, a user could set up a workflow that deletes all emails marked as spam in the "Spam" folder automatically.
Properties
| Name | Meaning |
|---|---|
| Folder | The email folder to work with. Can be selected from a list of folders or specified by name (e.g., INBOX). |
| Email UID | The unique identifier of the email to delete. This is required to specify which email to remove. |
Output
The output consists of JSON objects representing the result of the delete operation for each input item. If the operation succeeds, the output JSON typically contains confirmation details or metadata about the deleted email. If an error occurs and the node is configured to continue on failure, the output JSON will contain an error field with the error message.
No binary data output is produced by this operation.
Dependencies
- Requires connection credentials to an IMAP server: host, port, security settings, username, and password.
- Uses the
imapflowlibrary to interact with the IMAP server. - The node requires proper configuration of these credentials within n8n to authenticate and perform operations on the email server.
Troubleshooting
Common issues:
- Incorrect IMAP server credentials or connection details can cause authentication failures.
- Specifying an invalid or non-existent folder name may lead to errors when trying to access the mailbox.
- Providing an incorrect or expired email UID will prevent the node from finding and deleting the intended email.
- Network connectivity problems can cause timeouts during connection or logout phases.
Error messages and resolutions:
- Authentication errors: Verify the username, password, and server details.
- Folder not found: Check the folder name spelling or select it from the provided list.
- Email UID not found: Confirm the UID corresponds to an existing email in the specified folder.
- Timeout errors during logout: These are handled internally by forcing connection closure; usually safe to ignore but may indicate network instability.