An email arrives
Auslöser
email-arrivesStarts when an email arrives with a document attached.
Auf einen Blick
| Eigenschaft | Wert |
|---|---|
| Trigger name | email-arrives |
| Resource | ClusterTrigger (lumen.ai/v1alpha1) |
| Source | event |
| Needs a connection | yes, one that provides email |
| Produces | email, file |
| Emits | item |
| Installation must provide | nothing |
A flow using this trigger names a Connector in connectorRef. Connection types that provide email: [Email forwarding](/reference/connections/email-forward).
The trigger goes under spec.triggers of a Flow. Its outputs are referenced as <triggerId>.<field>. A trigger can also carry a when condition ("Start only when") and disabled: true.
Ausgaben
Ein späterer Knoten verweist auf eine Ausgabe als {nodeId.field} in einem Text oder als nodeId.field in einer Bedingung.
| Ausgabe | Typ |
|---|---|
from | string |
to | string |
subject | string |
body | string |
attachments | number |
senderVerified | boolean |
receivedAt | date |
messageId | string |
Einstellungen
Wird unter config: im Auslöser des Flows gesetzt.
| Einstellung | Typ | Standardwert | Beschreibung |
|---|---|---|---|
requireAttachment | boolean | true | RequireAttachment drops mail that carries no file; unset is true. |
maxSizeMB | integer | 25 | MaxSizeMB starts no run for a mail bigger than this; unset is 25.minimum 1; maximum 40 |
attachments | string | - | Each attachment separately: every file goes through the flow on its own, with the email's sender, subject and body, so reply and forward steps answer once per file. The whole email as one: all the files travel together as one document. A trigger saved before this setting existed works as the whole email as one.one of separate, together |
includeInline | boolean | false | Include images in the email body |
Das vollständige JSON Schema dieser Einstellungen: email-arrives.schema.json.
Im Flow verwenden
flow.yaml
apiVersion: lumen.ai/v1alpha1
kind: Connector
metadata:
name: my-email-forward
namespace: tenant-acme
spec:
classRef: {name: email-forward}
config: {}
---
apiVersion: lumen.ai/v1alpha1
kind: Flow
metadata:
name: email-arrives-example
namespace: tenant-acme
spec:
displayName: "An email arrives"
triggers:
- id: start
ref: {name: email-arrives}
connectorRef: {name: my-email-forward}
next: [notify-in-app]
nodes:
- id: notify-in-app
stepRef: {name: notify-in-app}
config:
body: 'Total: {total}'
title: New invoice from {supplier}
to: admins
War diese Seite hilfreich?