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.
- 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.
{% hint style="info" %}
See a sample webhook request for a detailed example. The session-id
is in the session property.
{% endhint %}
- 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.