# Email (IMAP) - Workflow trigger | Docs - nodulz

Source: https://nodulz.com/docs/nodes/email_trigger

Language: en

Starts the workflow when a new message arrives in a mailbox folder

## Usage and specifics

IMAP receives messages; SMTP sends them. The first poll records the latest UID and ignores existing messages by default. markAsRead applies the \Seen flag after a successful run.

Technical type : `email_trigger`. Runtime : `nodulz`.

## Credentials and prerequisites

- [Create and configure the credential : imap](/docs/credentials/imap)

Create credentials in your nodulz instance’s Credentials area, then select them on the node. Availability depends on ownership and sharing. See the [credentials guide](/docs/credentials) for access and rotation.

## Parameters

Names below are technical keys. Defaults are not a ready-to-run configuration: complete fields required by your operation. Paths containing [] describe list items; some fields depend on the selected mode.

| Parameter | Type | Default | Values / limits |
| --- | --- | --- | --- |
| `credentialId` | `string` | `""` | - |
| `folder` | `string` | `"INBOX"` | - |
| `pollInterval` | `string` | `"1m"` | - |
| `markAsRead` | `boolean` | `false` | - |
| `triggerOnFirstPoll` | `boolean` | `false` | - |
| `rules` | `object` | `{}` | - |
| `rules.fromContains` | `string` | `""` | - |
| `rules.subjectContains` | `string` | `""` | - |
| `rules.toContains` | `string` | `""` | - |
| `testPayload` | `string` | `""` | - |
| `pollState` | `object` | - | - |
| `pollState.lastSeenUid` | `number` | - | -; ≥ 0 |
| `lastError` | `string` | - | - |

## Configuration help

| Setting | Purpose and guidance |
| --- | --- |
| `credentialId`<br>IMAP mailbox | Create a credential under Credentials → IMAP (host, port, user, app password). |
| `folder`<br>Folder | IMAP folder to watch - usually INBOX. |
| `pollInterval`<br>Poll interval | How often nodulz checks the mailbox for new messages. Examples: 30s, 1m, 5m, or a cron expression. |
| `markAsRead`<br>Mark as read after run | Sets the \Seen flag on IMAP after a successful workflow run. |
| `triggerOnFirstPoll`<br>Trigger on existing mail at first poll | When off (default), the first poll only records the latest UID - no backlog. |
| `testPayload`<br>Test payload (JSON) | Used when you click Test trigger in the editor. Must include trigger, mailbox, and message fields. |

## Examples

- Output includes subject, bodies, headers, and attachment metadata in input.message.

## Initial configuration

Initial catalog configuration example, to adapt before running. Keep secrets in credentials.

```json
{
  "credentialId": "",
  "folder": "INBOX",
  "pollInterval": "1m",
  "markAsRead": false,
  "triggerOnFirstPoll": false,
  "rules": {},
  "testPayload": ""
}
```

## Verification

Test with representative data. Check node output in the inspector and logs, then use editor mapping for downstream fields. A trigger test with a simulated payload does not validate external service delivery.

See also : [Expressions and data](/docs/expressions), [Executions](/docs/executions), [Node catalog](/docs/nodes).

## Explore further

- [Features - nodulz](https://nodulz.com/product/overview)
- [Node catalog - nodulz](https://nodulz.com/product/catalog)
- [MCP server - nodulz](https://nodulz.com/product/mcp)
- [Pricing - nodulz](https://nodulz.com/pricing)
- [Use cases and workflow automation - nodulz](https://nodulz.com/use-cases)
- [Choose what your workflows can do. - nodulz](https://nodulz.com/compare)
- [Documentation - nodulz](https://nodulz.com/docs)
