Skip to main content

Receive Prebuilt Summary UI email after each conversation

This snippet goes into detail about how to receive Symbl's Prebuilt Summary UI email after a conversation is finished. The Prebuilt Summary UI email details the conversation using speech-to-text transcription and shows any AI insights gathered during the conversation. This example uses both the Symbl's Javascript SDK and native Javascript.

This is an example of the summary page you can expect to receive at the end of your call#

Summary Page

Take a look at the Sample Summary UI which is generated after a meeting is concluded.

info

Currently, the PSTN connection requires a US phone number. You can use a SIP connection to connect to a SIP URI instead. Learn more about how to connect using SIP.

Connect#

When we're connecting to the Web Socket, we can define which language we use in the configuration. Take a look at the actions part of the configuration object. actions tell the API to perform an action once an event is invoked. Here we define action to send an email (sendSummaryEmail) after the stop event, which happens once a conversation is finished. The email will be sent to the emails defined in the emails array.

Actions Configuration Snippet#

{
"actions": [{
"invokeOn": "stop",
"name": "sendSummaryEmail",
"parameters": {
"emails": [
"user@example.com"
]
}
}]
}

Full Code Example#

info

The Symbl SDK (Node.js) snippet must be run using Node.js, while the Native Javascript snippet can be run in your web browser.

curl -k -X POST "https://api.symbl.ai/v1/endpoint:connect" \
-H "accept: application/json" \
-H "Content-Type: application/json" \
-H "X-API-KEY: $AUTH_TOKEN" \
-d $'{
"operation": "start",
"endpoint": {
"type" : "pstn",
"phoneNumber": "'$PHONE_NUMBER'" #
},
"languages": ['es-US'],
"actions": [{
"invokeOn": "stop",
"name": "sendSummaryEmail",
"parameters": {
"emails": [
"'$EMAIL_ADDRESS'"
]
}
}],
"data" : {
"session": {
"name" : "My Meeting"
}
}
}'

Testing#

Open up your shell terminal and copy in the command. Replace the placeholder values with the proper values and hit enter.

Running this code should connect our API to your phone call. Once the call is completed you will receive an email that details the conversation and provides you with a transcription and Insights about the call.

info

If you have any questions or concerns about our API, you can join our Support Slack or send us an email at developer@symbl.ai