Email (IMAP)

App · 3 actions

Start a workflow when an email arrives in any mailbox - your own mail server, a web host's, Fastmail, iCloud, or a Gmail or Yahoo account with an app password - and find emails, save their attachments and mark them read, by connecting to it over IMAP, the way a mail app does.

Actions

ActionWhat it does
Download attachmentsSave every file attached to an email so later steps can read it, attach it or have AI review it, such as the invoice on an email the New email trigger picked up.
Find emailsFind the newest emails in a folder, optionally only from one sender, with certain words in the subject, received after a date or unread, with each email's text.
Mark as readMark an email as read, as opening it in a mail app would - such as at the end of a workflow that has dealt with it, so the people sharing the mailbox can see it is handled.

Download attachments

Save every file attached to an email so later steps can read it, attach it or have AI review it, such as the invoice on an email the New email trigger picked up. Images shown in the body, such as a signature logo, are left out. An email with no attachments gives an empty list. Doesn't mark it as read.

Inputs

Emailemail_idtextRequired
The email: the email_id the New email trigger or Find emails gave, or its Message-ID, such as <abc123@example.com>.
Folderfoldertext
The folder the email is in: the folder the trigger or Find emails gave. Leave blank for the inbox.

Outputs

document_refslist
Just the saved files, to hand all of them to a later step at once.
documentslist
The saved files, in the order they are attached.
Example output
{
  "document_refs": [
    "doc_imap_attachment"
  ],
  "documents": [
    {
      "content_type": "application/pdf",
      "document_ref": "doc_imap_attachment",
      "filename": "invoice-1042.pdf",
      "size_bytes": 48213
    }
  ]
}

Find emails

Find the newest emails in a folder, optionally only from one sender, with certain words in the subject, received after a date or unread, with each email's text. Use it on a schedule to work through mail that is already there. Reading them doesn't mark them as read.

Inputs

Folderfoldertext
The folder to look in. Leave blank for the inbox.
Fromsendertext
Only emails from this address or name, or any part of it, such as @example.com.
Subject containssubjecttext
Only emails whose subject contains these words.
Received on or afterreceived_afterdate
Only emails received on or after this day.
Unread onlyunread_onlytrue/false
Only emails that haven't been read yet.
How manylimitnumber
How many of the newest matching emails to return, from 1 to 50. 10 if left blank.

Outputs

resultobject
The emails found, newest first.
Example output
{
  "result": {
    "count": 1,
    "emails": [
      {
        "attachment_names": [
          "invoice-1042.pdf"
        ],
        "body": "Hi Jane,\n\nPlease find invoice 1042 attached.",
        "cc": [],
        "date": "Tue, 22 Sep 2026 09:14:03 -0400",
        "folder": "INBOX",
        "from": "Accounts <accounts@supplier.example>",
        "from_address": "accounts@supplier.example",
        "from_name": "Accounts",
        "has_attachments": true,
        "headers": {
          "message-id": "<abc123@supplier.example>",
          "subject": "Invoice 1042"
        },
        "html_body": "",
        "id": "4182",
        "is_read": false,
        "message_id": "<abc123@supplier.example>",
        "received_at": "2026-09-22T13:14:05Z",
        "reply_body": "Hi Jane,\n\nPlease find invoice 1042 attached.",
        "reply_to": [],
        "snippet": "Please find invoice 1042 attached.",
        "subject": "Invoice 1042",
        "to": [
          "jane@example.com"
        ]
      }
    ]
  }
}

Mark as read

Mark an email as read, as opening it in a mail app would - such as at the end of a workflow that has dealt with it, so the people sharing the mailbox can see it is handled.

Inputs

Emailemail_idtextRequired
The email: the email_id the New email trigger or Find emails gave, or its Message-ID, such as <abc123@example.com>.
Folderfoldertext
The folder the email is in: the folder the trigger or Find emails gave. Leave blank for the inbox.

Outputs

email_idtext
The email's ID in its folder.
foldertext
The folder it's in.
is_readtrue/false
Always true.
Example output
{
  "email_id": "4182",
  "folder": "INBOX",
  "is_read": true
}

On this page