This guide explains how to fetch user data from Google Sheets and display it as dynamic buttons or lists in a bot flow.
Step 1: Create Bot Flow #
- Go to Chatbot → Create Botflow
- Add trigger (keyword)
- Select channel and save
Step 2: Capture Phone Number #
- Ask user if their WhatsApp number is the billing number
- If Yes → Save WhatsApp number
- If No → Ask for billing number and save input
Step 3: Fetch Data from Google Sheets #
- Add Automation → Google Sheets → Lookup Rows
- Select authentication and spreadsheet
- Enter column (e.g., Phone Number column)
- Set condition (equals)
- Map phone number variable
- Run once and then Save
Step 4: Store Retrieved Data #
- Save:
- Number of rows found
- Full response data
- Use Bot Fields for storage
Step 5: Apply Conditions #
- If no data found (rows = 0)
- Send message: No complaint found
- Redirect user (Go To block)
- If data found (rows > 0)
- Proceed to next step
Step 6: Create Dynamic List #
- Add Interactive Message
- Select Dynamic List
- Map:
- Title → Name
- Description → Complaint Number
- Value → Unique field (e.g., Complaint Number)
- Save user selection
Step 7: Show Complaint Status #
- Send message with mapped complaint status
- Save and Enable workflow