דלג לתוכן הראשי

מגיע מייל

Triggeremail-arrives

מתחיל כשמגיע מייל עם מסמך מצורף.

במבט אחד​

מאפייןערך
Trigger nameemail-arrives
ResourceClusterTrigger (lumen.ai/v1alpha1)
Sourceevent
Needs a connectionyes, one that provides email
Producesemail, file
Emitsitem
Installation must providenothing

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.

פלט​

צומת מאוחר יותר מפנה לפלט כ-{nodeId.field} בטקסט, או כ-nodeId.field בתנאי.

פלטסוג
fromstring
tostring
subjectstring
bodystring
attachmentsnumber
senderVerifiedboolean
receivedAtdate
messageIdstring

הגדרות​

Set under config: on the flow trigger.

הגדרהסוגברירת מחדלתיאור
requireAttachmentbooleantrueRequireAttachment drops mail that carries no file; unset is true.
maxSizeMBinteger25MaxSizeMB starts no run for a mail bigger than this; unset is 25.minimum 1; maximum 40
attachmentsstring-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
includeInlinebooleanfalseInclude images in the email body

ה-JSON Schema המלא של ההגדרות: email-arrives.schema.json.

שימוש בתהליך​

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