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

וואטסאפ (Meta Cloud API)

Connection typewhatsapp-cloud

מספר הוואטסאפ העסקי שלכם. הודעות שנשלחות אליו יכולות להתחיל תהליכים, והתהליכים יכולים לענות.

במבט אחד​

מאפייןערך
Class namewhatsapp-cloud
ResourceConnectorClass (lumen.ai/v1alpha1); a workspace creates a Connector with classRef: {name: whatsapp-cloud}
Driverwhatsapp-cloud
Provideswhatsapp
Modepush (the outside system pushes data in)
Credential keysaccessToken, appSecret, phoneNumberId, wabaId (kept in a Secret, never in config)

A workspace adds this connection on the Connections page or with lumen connect; credentials are kept in a Secret, never in the flow.

הגדרות​

Set under config: on the Connector.

הגדרהסוגברירת מחדלתיאור
appClientstring-Set by a platform admin: this number serves every workspace of the app, and messages are routed by the sender's verified phone.maxLength 63; pattern `^[a-z0-9]([-a-z0-9]*[a-z0-9])?$`
endpointIdstring-Endpoint id
phonestring-Digits with the country code, for the join link in members' profiles.pattern `^[1-9][0-9]{7,14}$`
platformboolean-Set by a platform admin: members join this number from their phone with /join and a code from their profile; it answers /stop, /start, /status and /help, writes only to members who joined, and holds questions overnight.
quietHoursobject-Questions asked in these hours wait and go out when they end. Lumen's own number keeps 22:00 to 07:00 Asia/Jerusalem unless set; {off: true} switches them off.
quietHours.falseboolean-
quietHours.fromstring-pattern `^[0-2][0-9]:[0-5][0-9]$`
quietHours.timeZonestring-maxLength 64
quietHours.tostring-pattern `^[0-2][0-9]:[0-5][0-9]$`
verifyLanguagestring-Its languagemaxLength 15
verifyTemplatestring-The approved authentication template a shared number sends phone codes with.maxLength 512

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

שימוש​

connector.yaml
apiVersion: lumen.ai/v1alpha1
kind: Connector
metadata:
name: my-whatsapp-cloud
namespace: tenant-acme
spec:
classRef: {name: whatsapp-cloud}
config: {}
---
apiVersion: lumen.ai/v1alpha1
kind: Flow
metadata:
name: whatsapp-message-received-whatsapp-cloud-example
namespace: tenant-acme
spec:
displayName: "WhatsApp (Meta Cloud API)"
triggers:
- id: start
ref: {name: whatsapp-message-received}
connectorRef: {name: my-whatsapp-cloud}
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