Ask with buttons on WhatsApp
Step
whatsapp-send-buttonsnotifyside effectsSends a question with up to three buttons. The person's tap starts your flow again with their answer. Works within 24 hours of their last message.
At a glance
| Property | Value |
|---|---|
| Step name | whatsapp-send-buttons |
| Resource | ClusterStep (lumen.ai/v1alpha1) |
| Palette group, category | notify, messages |
| Credits | 1 credit each time it succeeds |
| Side effects | yes It changes something outside Lumen, so a retry asks first and a test shows what it would do instead of doing it. |
| Installation must provide | nothing |
Inputs
| Property | Value |
|---|---|
| Needs | nothing |
| Produces | fields |
| Works on | item one document at a time |
Needs and Produces are data types (file, text, fields, email). The editor offers a step only where what it needs is already on the path. See Documents and data.
Outputs
A later node references an output as {nodeId.field} in text, or nodeId.field in a condition.
| Output | Type |
|---|---|
whatsappMessageId | string |
whatsappStatus | string |
Settings
Set under config: on the flow node. Text settings may contain {nodeId.field} placeholders.
| Setting | Type | Default | Description |
|---|---|---|---|
connectorRef | string | - | Send fromminLength 1 |
to | string | - | TomaxLength 200 |
toMember | string | - | Their email. They must have joined this number with their phone (Profile, WhatsApp).maxLength 320 |
textrequired | string | - | MessageminLength 1; maxLength 1024 |
buttonsrequired | list of object | - | ButtonsminItems 1; maxItems 3 |
buttons[].idrequired | string | - | ID is what comes back in the run the tap starts (its buttonId).minLength 1; maxLength 256 |
buttons[].titlerequired | string | - | ButtonminLength 1; maxLength 20 |
The full JSON Schema of these settings: whatsapp-send-buttons.schema.json.
Example
Approve or reject
config
buttons:
- id: approve
title: לאשר
- id: reject
title: לדחות
text: להפיק קבלה על {amount}?
Use it in a flow
A node that runs whatsapp-send-buttons goes under spec.nodes of a Flow. Give it any id, and list the next node ids in next.
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-buttons-example
namespace: tenant-acme
spec:
displayName: "Ask with buttons on WhatsApp"
triggers:
- id: start
ref: {name: whatsapp-message-received}
connectorRef: {name: my-whatsapp-cloud}
next: [whatsapp-send-buttons]
nodes:
- id: whatsapp-send-buttons
stepRef: {name: whatsapp-send-buttons}
config:
buttons:
- id: approve
title: לאשר
- id: reject
title: לדחות
text: להפיק קבלה על {amount}?
Was this page helpful?