wasender.webhook.dispatch ​
Route + handle an inbound WasenderAPI webhook event
Route + handle an inbound WasenderAPI webhook event delivered by hook.receive-webhook.
Inputs (the relevant ones are carried from the redirect configuration):
- payload: JSON — the raw WasenderAPI webhook body.
- organization_uuid / cloud_connection_uuid: UUID.
- auto_reply: bool, reply_text: str — optional auto-reply to genuine inbound messages.
- persist: bool, wasender_session_uuid: UUID — optional inbound-message logging.
Outputs: event_type, from_jid, message_text, message_id, handled, replied, reply_message_id, persisted.
Overview ​
| Property | Value |
|---|---|
| Workflow type | Atomic |
| Library | App-wasender |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
organization_uuid | uuid | No | — | — |
cloud_connection_uuid | uuid | No | — | — |
payload | json | No | — | Raw WasenderAPI webhook body |
event_uuid | string | No | — | — |
redirect_uuid | string | No | — | — |
headers | json | No | — | — |
auto_reply | boolean | No | — | Reply to genuine inbound messages |
reply_text | string | No | — | Body of the auto-reply |
persist | boolean | No | — | Log the inbound message to WasenderMessage |
wasender_session_uuid | uuid | No | — | Owning session row, required to persist |
webhook_secret | string | No | — | Override secret; else resolved from the connection |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
event_type | string | No | — | — |
from_jid | string | No | — | — |
message_text | string | No | — | — |
message_id | string | No | — | — |
handled | boolean | No | — | — |
verified | boolean | No | — | — |
replied | boolean | No | — | — |
reply_message_id | string | No | — | — |
persisted | boolean | No | — | — |
failure_reason | string | No | — | — |
failure_type | string | No | — | — |
failed_action | string | No | — | — |
failed_at_state | string | No | — | — |
failed_step | string | No | — | — |
failed_layer | integer | No | — | — |
error | string | No | — | — |
error_type | string | No | — | — |
States ​
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
pending | Yes | No | — | route | — |
completed | No | Yes | Yes | — | — |
failed | No | Yes | No | — | — |
State Diagram ​
Transitions ​
| From | Action | To | Description |
|---|---|---|---|
pending | route | completed | — |
* (any state) | fail | failed | — |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "wasender.webhook.dispatch",
"initial_data": {
"organization_uuid": "value",
"cloud_connection_uuid": "value",
"payload": "value",
"event_uuid": "value"
}
}