i created a conversational agent with 3 playbooks. I integreted a tool with bigquery connector in order to execute custom query and answer in natural language. I'm using the built-in Slack integration in Dialogflow CX so that eployees are able to ask to the chatbot and get informations.
Now i want to improve the agent and in particular, i want to set that if the answer is a pivot table generated by sql from BigQuery, it appear not as a bullet point standard but in markdown format (in particular appear as a table in slack chat). I want to set also the possiblity to visualize the output as a chart or get the result in .csv format if the customer/employee ask to do that.
I'm a little confuse of which path to take. I didn't find any tutorial video about that. I guess the possible solutions are:
The documentation provide about that in general is very "theorical". It can be helpful to have some pratical example with tutorials.
Thank you
Solved! Go to Solution.
Hi @Ale_Pascali,
Welcome to the Google Cloud Community!
If you're looking to enhance your Dialogflow CX agent with custom features for BigQuery results, including displaying pivot tables in Slack as markdown, offering charts, and enabling CSV exports, there are a few straightforward approaches you can consider:
1. Use Cloud Functions for Fulfillment: This flexible solution involves creating a Cloud Function webhook that executes BigQuery SQL, formats the results into Slack-friendly markdown, optionally generates charts (using tools like matplotlib or QuickChart), and provides a downloadable CSV link via Cloud Storage.
2. Custom Payloads for Slack: Slack uses Block Kit for markdown-like formatting. You’ll need to configure your webhook to return a custom payload. This video covers how to enhance your responses with custom payloads.
3. CSV and Chart Generation:
- This video provides integration and testing strategies to ensure everything is working smoothly.
Regarding the Tools section in Dialogflow CX, while it’s useful for defining reusable logic, it does have some limitations in terms of formatting and external API calls. You’ll likely still need a webhook to handle advanced formatting and file generation. Check out this video for a step-by-step guide on setting up and executing the webhook.
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.
Hi @Ale_Pascali,
Welcome to the Google Cloud Community!
If you're looking to enhance your Dialogflow CX agent with custom features for BigQuery results, including displaying pivot tables in Slack as markdown, offering charts, and enabling CSV exports, there are a few straightforward approaches you can consider:
1. Use Cloud Functions for Fulfillment: This flexible solution involves creating a Cloud Function webhook that executes BigQuery SQL, formats the results into Slack-friendly markdown, optionally generates charts (using tools like matplotlib or QuickChart), and provides a downloadable CSV link via Cloud Storage.
2. Custom Payloads for Slack: Slack uses Block Kit for markdown-like formatting. You’ll need to configure your webhook to return a custom payload. This video covers how to enhance your responses with custom payloads.
3. CSV and Chart Generation:
- This video provides integration and testing strategies to ensure everything is working smoothly.
Regarding the Tools section in Dialogflow CX, while it’s useful for defining reusable logic, it does have some limitations in terms of formatting and external API calls. You’ll likely still need a webhook to handle advanced formatting and file generation. Check out this video for a step-by-step guide on setting up and executing the webhook.
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.