- Print
- DarkLight
- PDF
Upload File To Ongoing Dialogflow Chats
- Print
- DarkLight
- PDF
You may have a use case where you want to upload a file to the ongoing Bot conversation, like a product handbook or purchase invoice.
Prerequisites
Have a Dialogflow intent with fulfillment webhook enabled
A bot user with a Live Chat agent role.
To upload a file to an ongoing bot conversation,
Get the Dialogflow
session-id
of the ongoing bot conversation where you want to upload this file. You can get it from the fulfillment webhook request, which Dialogflow will send upon detecting your target intent.
See a sample webhook request for a detailed example. The
session-id
is in the session property.
Use the Upload File to a Room endpoint with the
session id
as theRoom Id
on Rocket.Chat. The endpoint requires authentication, so you can use the Login endpoint to get authentication tokens for the bot user.