diff --git a/docs/4. Product Features/03. Flows/2. Flow Actions/12. Link Google Sheets.md b/docs/4. Product Features/03. Flows/2. Flow Actions/12. Link Google Sheets.md index e022895cc..d66f0f838 100644 --- a/docs/4. Product Features/03. Flows/2. Flow Actions/12. Link Google Sheets.md +++ b/docs/4. Product Features/03. Flows/2. Flow Actions/12. Link Google Sheets.md @@ -1,8 +1,8 @@

- - + +
10 minutes readLevel:Intermediate15 minutes readLevel: Intermediate Last Updated: October 2025
@@ -196,6 +196,93 @@ As you can see on the preview above, the list of options we had given in the Goo - Sending interactive messages using Google Sheets could avoid the redundancy of creating multiple interactive messages when the list of options needs to be updated (some option needs to be added or removed) or multiple interactive messages to be used. - It can also be used for handling situations where the list of options is more than 10 by using 'More' as the tenth option and having a separate list of options in the next row. +### Using G-sheets to Dynamically fetch button/list options in Interactive Messages. +This approach helps the user reduce the effort required to create flows containing multiple interactive messages by automatically fetching the message body and options from a Google Sheet. + +It is particularly useful in scenarios such as: + + +The example below demonstrates a sample setup for both approaches, which can be customized or adapted as per the specific use case. + +Screenshot 2025-10-09 at 2 31 36 PM + +
    +
  1. In the nested drill-down approach, once the end user selects a district, the corresponding blocks under that district are displayed.
  2. +
  3. In the second approach, based on the topic selected (Science or General Knowledge), a short quiz with two questions is presented to the end user. The message body and options for both questions are dynamically fetched from the G-Sheet.
  4. +
+ +#### Steps to configure this setup: +Step 1 - Setup the g-sheet, following this format. Here’s the link to the sample sheet + +For quiz: + +Screenshot 2025-10-09 at 2 33 37 PM + +To fetch district options from g-sheets– + +Screenshot 2025-10-09 at 2 34 14 PM + +To fetch corresponding blocks, associated with the district— + +Screenshot 2025-10-09 at 2 34 49 PM + +Step 2: Integrate Google Sheet with Glific. For detailed steps on how this is done, please follow this link. + +Step 3: Create the following interactive messages from `Quick tools` Pane: + +For quiz - + +Screenshot 2025-10-09 at 2 37 02 PM + +For district options - + +Screenshot 2025-10-09 at 2 37 23 PM + +For block options - + +Screenshot 2025-10-09 at 2 38 03 PM + +Since the options will be fetched dynamically from the G-Sheet, placeholder (dummy) values can be added as options while creating the interactive message(s). + +Step4: Configure the flow, following the below mentioned requirements. Here’s the sample flow + +For quiz - + + + +For Nested drill down – + + + + + ## Add Writable Google Sheet ### Enable Google Sheet APIs and Add Credentials