Skip to main content

Event format

PropertyDescription
trigger
string
message:text message:voice postback
botUser
object
BotUser Schema
message
object
Message Schema
version
object

Text Message Event#

Payload for a text message from Facebook Messenger#

{
"trigger": "text",
"bot_user": {
"id": "5e9d6b4712a443e39e69643b7f5ca982",
"storage": {
"lang": "en"
}
},
"message": {
"id": "a3d42f4840724b9a91bf337753b1c8c7",
"text": "hello",
"received": 1571303024,
"language": "en-us",
"message_type": "text",
"source": {
"type": "facebook",
"raw": {
"<RAW_MESSAGE>"
}
}
}
}

Payload for a message from Google Assistant#

{
"trigger": "text",
"bot_user": {
"id": "2a501da404c64b7fbc15ba1559aa61ed",
"storage": {}
},
"message": {
"id": "350c117e981640d485f1808e244797b5",
"text": "hello",
"received": 1571303551,
"language": "en-US",
"message_type": "text",
"source": {
"type": "googleaction",
"raw": {
"<RAW_MESSAGE>"
}
}
}
}

Postback Message Event#

The payload when a user clicks on a postback button.

Payload#

{
"trigger": "text",
"bot_user": {
"id": "5e9d6b4712a443e39e69643b7f5ca982",
"storage": {
"lang": "en"
}
},
"message": {
"id": "814e6c8bdd2f4af1a95645e551feb83b",
"postback": "THIS_IS_PAYLOAD_KEY",
"received": 1571303978,
"language": "en",
"message_type": "postback",
"source": {
"type": "facebook",
"raw": {
"<RAW_MESSAGE>"
}
}
}
}