Zum Hauptinhalt springen

Send a file on WhatsApp

Schrittwhatsapp-send-documentnotifyexterne Wirkung

Sends one of the run's files, such as a PDF, as a document in the chat. The file is uploaded to WhatsApp. Works within 24 hours of the person's last message; after that, send a template.

Auf einen Blick​

EigenschaftWert
Schrittnamewhatsapp-send-document
RessourceClusterStep (lumen.ai/v1alpha1)
Palettengruppe, Kategorienotify, messages
Credits1 Credit bei jedem Erfolg
Externe Wirkungja Er ändert etwas außerhalb von Lumen, deshalb fragt ein Wiederholungsversuch vorher nach, und ein Test zeigt, was er tun würde, statt es zu tun.
Die Installation muss bereitstellennichts

Eingaben​

EigenschaftWert
Brauchtfile
Liefertfields
Arbeitet aufitem einem Dokument nach dem anderen

Braucht und Liefert sind Datentypen (file, text, fields, email). Der Editor bietet einen Schritt nur dort an, wo das, was er braucht, schon auf dem Pfad liegt. Siehe Dokumente und Daten.

Ausgaben​

Ein späterer Knoten verweist auf eine Ausgabe als {nodeId.field} in einem Text oder als nodeId.field in einer Bedingung.

AusgabeTyp
whatsappMessageIdstring
whatsappStatusstring

Einstellungen​

Wird unter config: im Knoten des Flows gesetzt. Texteinstellungen dürfen Platzhalter wie {nodeId.field} enthalten.

EinstellungTypStandardwertBeschreibung
connectorRefstring-Send fromminLength 1
tostring-TomaxLength 200
toMemberstring-Their email. They must have joined this number with their phone (Profile, WhatsApp).maxLength 320
filestring-File names the run's file to send; empty is its first PDF, or its first file.maxLength 255
captionstring-Caption is written under the document.maxLength 1024

Das vollständige JSON Schema dieser Einstellungen: whatsapp-send-document.schema.json.

Beispiel​

config
caption: הקבלה שלך מוכנה

Im Flow verwenden​

Ein Knoten, der whatsapp-send-document ausführt, steht unter spec.nodes eines Flow. Geben Sie ihm eine beliebige id und nennen Sie in next die ids der nächsten Knoten.

flow.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-send-document-example
namespace: tenant-acme
spec:
displayName: "Send a file on WhatsApp"
triggers:
- id: start
ref: {name: whatsapp-message-received}
connectorRef: {name: my-whatsapp-cloud}
next: [whatsapp-send-document]
nodes:
- id: whatsapp-send-document
stepRef: {name: whatsapp-send-document}
config:
caption: הקבלה שלך מוכנה