Real-time Triggers
Caravel provides a New Message Event real-time trigger that will fire once per message added to a feed. From the Automation form, choose Real-time, then add a New Message Event trigger and select the feed you wish to observe.
Caravel provides HTTP actions that you can use in response to a real-time automation trigger. All actions receive the action payload ( more on this below) for use in the request body. Caravel uses Handlebars templating to add dynamic content to your HTTP actions.
👇
{
"feed": "{{feedName}}",
"text": "{{{message.text}}}",
"mentioned": "{{message.mentionedAt}}"
}
Example request body using handlebars templating with Caravel action payloads
Action Payloads use Handlebars templates. You can use triple braces to unescape text content {{{escapedText}}}
Each automation action receives a JSON payload with the following properties:
The message that triggered this automation, it has the following properties:
textstring
The text of the message
sentimentstring
The predicted sentiment of the message (Very Negative, Negative, Neutral, Positive, Very Positive)
sentimentScorenumber
Numerical value of sentiment between -1 and 1. -1 is most negative and 1 is most positive.
aspectSentiments{ name: string; sentiment: string }[]
Array of objects containing the classification name and sentiment score (-1 to 1)
categoriesstring[]
List of category classifier names that matched this message
intentsstring[]
List of intent classifier names that matched this message
topicsstring[]
List of topic classifier names that matched this message
actorstring | null
Name of person who wrote this message
externalUserIdstring | null
The external identifier of the customer from the message source
originNamestring | null
Name of message origin
originUrlstring | null
URL of message origin
conversationUrlstring
URL link to message in your Caravel workspace
sourceNamestring
Name of Caravel source
conversationUrlstring
URL link to message in your Caravel workspace
idstring
Caravel message identifier
conversationIdstring
Caravel conversation identifier this message belongs to
externalIdstring | null
The external identifier for this message
mentionedAtstring
When this message first appeared (defaults to createdAt if originCreatedAt doesn't exist)
createdAtDate
Caravel internal timestampconversationUrl string URL link to message in your Caravel workspace
updatedAtDate
Caravel internal timestamp
originCreatedAtDate | null
Timestamp from external origin
Name of the automation currently running.
Name of the feed this automation is running on.
An array of automation logs for debugging.
Last modified 1yr ago