Event Properties
Whenever an event occurs during your bot’s execution—like a message being sent—you can access details about that event using the event object’s properties.
The event object is available wherever you can use code in Botpress Studio. This includes:
You can also access the event object within certain Cards’ configuration fields.
This documentation omits certain properties of the event object which exist to maintain internal functionality and
aren’t useful for bot builders Happy bot building! .
eventIncomingEventrequired
Information about the last incoming event in your bot's execution.
botIdstringrequired
The ID of the bot that experienced the event.
conversationIdstring
The ID of the conversation that the event took place in.
createdOnDaterequired
The date and time when the event was created (in ISO 8601 format).
directionEventDirectionrequired
The direction of the event, indicating whether the event was received by
the bot or sent from the bot. - `'incoming'`: The event originated from
the user and was received by the bot. - `'outgoing'`: The event was
generated by the bot and sent to the user.
idstringrequired
The unique identifier for the event.
integrationstring
The integration that the event occurred on.
kbobject
Information about Knowledge Bases queried for the event.
includedStudio.KnowledgeBase.KB[]required
Array of Knowledge Bases queried for the event.
Since most of this object's properties are for internal use by
Botpress, we've omitted its deeper structure from this
documentation.
resultsStudio.KnowledgeBase.ContentResult[]
Array of Knowledge Base results consulted for this event.
Since most of this object's properties are for internal use by
Botpress, we've omitted its deeper structure from this
documentation.
messageIdstring
The unique identifier for the current event's message.
payloadobjectrequired
The payload for the current event.
previewstringrequired
A representation of the event in plain text. If the event is a text
message, this property will contain the message itself.
stateEventStaterequired
Data related to the state of the event.
Since most of this object's properties are for internal use by
Botpress, we've omitted its deeper structure from this documentation.
tagsEventTags
Any tags associated with the current event. These can contain useful data
related to the integration associated with the event.
conversationobject
Tags for the conversation.
messageobject Tags for the message.
userobject Tags for the user.
triggerDM.Trigger
The Trigger that sent the event.
conversationIdstring
The ID of the conversation associated with this Trigger.
eventNamestring
The name of the event that the Trigger sent.
flowIdstringrequired
The ID of the Workflow containing the Trigger.
integrationstring
The integration associated with the Trigger.
nodeIdstringrequired
The ID of the Node that contains the Trigger.
userIdstring
The ID of the user associated with this Trigger.
typestringrequired The type of the event.
userIdstring
The user ID associated with this event.