Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

How to upload a file in the conversation Dialogflow CX

I want to develop a bot where after capturing the basic details of the user, user needs to upload the files to my chat bot. Is there a way to reach this goal? if yes how can i do that and how can i track the files of a particular person if he uploads through the chatbot?

0 2 81
2 REPLIES 2

Hi SHRIMAN,

Welcome to the Google Cloud Community!

Currently, Dialogflow CX doesn't directly support file uploads within the standard interface or through its built-in APIs.

Here are some workarounds you can try:

  • You can create a webhook that allows users to upload files. When the user reaches the point in the conversation where they need to upload a file, your chatbot can trigger a webhook that provides an upload link.
  • Once the user uploads a file, store it in a Google Cloud Storage. You can associate the file with the user’s session ID or user ID to track uploads.
  • To track files uploaded by a specific user, capture the user’s details (such as email or user ID) before the upload, store metadata (including filename, timestamp, and user ID) in a database, and retrieve the files based on the user’s ID when needed.

In addition, you might find this similar case helpful.

Was this helpful? If so, please accept this answer as “Solution”. If you need additional assistance, reply here within 2 business days and I’ll be happy to help.

@nikacalupas that code should work, i remember was on a google video but that was long long time ago. Was part of an internal stuff and that.