Email received
Starts when an email is received in the connected email account.
@lainstack/email/received-trigger · Triggers
How to use it
Section titled “How to use it”Key @lainstack/email/received-trigger (“Email received”). Starts a run for each email that arrives in a connected email account. Choose it for inbox-driven work.
References use the type key @lainstack/email/received-trigger as the source blockId, never the block instance id.
Payload leaves:
payload.data.from,payload.data.to(list),payload.data.cc(list),payload.data.subject.payload.data.emailRef: the message as a file.payload.data.attachments: attached files.payload.system.credentialId,payload.system.accountEmail,payload.system.messageId,payload.system.inReplyTo,payload.system.references(list),payload.system.receivedAt.
Traps:
- There is no body text leaf. The message content is in the file
emailRef. - The account is polled about once a minute, so runs start with a delay.
- Every email starts a run. The trigger has no filter. Filter with
@lainstack/flow/conditionas the first block (javascript.predicate). credentialIdmust be an active Outlook email connection. The trigger cannot install otherwise.inReplyTohas no value for a message that is not a reply.- A test run takes trigger data from a pinned sample (
testing).
Settings
Section titled “Settings”| Setting | Key | Type | Details |
|---|---|---|---|
| Connection (required) | credentialId |
Connection | The email connection to listen on. |
Outputs
Section titled “Outputs”| Output | Path | Type |
|---|---|---|
| From | payload.data.from |
Email address |
| To | payload.data.to |
List |
| Cc | payload.data.cc |
List |
| Subject | payload.data.subject |
Text |
payload.data.emailRef |
Value | |
| Attachments | payload.data.attachments |
Value |
| Credential Id | payload.system.credentialId |
Text |
| Account Email | payload.system.accountEmail |
Email address |
| Message Id | payload.system.messageId |
Text |
| In Reply To | payload.system.inReplyTo |
Text |
| References | payload.system.references |
List |
| Received At | payload.system.receivedAt |
Text |