Platform
Chatbot Builder Bulk Messaging Team Inbox Mini CRM API & Webhooks AI Integration WhatsApp Flows
Industries
E-commerce & D2C Real Estate Education Healthcare Finance & BFSI Logistics Hospitality Retail
Integrations
Learn
Learning Hub Help & Docs Connect Guides Automation Codex Blog Message Templates
Pricing Get Started →
HomeHelp & DocsMini Apps › Create a dynamic dropdown in a Mini App using an API
Mini Apps

Create a dynamic dropdown in a Mini App using an API

A dynamic dropdown fetches its options from an external source in real time when the customer opens the Mini App. Instead of hardcoded options, the list is always current — product catalogue, available appointment slots, branch locations, or any list that changes over time.

Use case examples

Appointment booking: dropdown shows only available time slots (fetched from your calendar API). Product selection: dropdown shows in-stock items only (fetched from your inventory system). Branch selection: dropdown shows active branches (fetched from your database).

How dynamic data source works in WhatsApp Flows

WhatsApp Flows support a data source endpoint — a URL you provide that the Flow calls when it opens (or when a specific screen loads). Your endpoint returns a JSON response that populates the dropdown options.

Step 1: Build your data endpoint

1
Create an API endpoint (or use an existing one) that returns options in the WhatsApp Flows-compatible JSON format.
2
The endpoint must be publicly accessible via HTTPS.
3
The endpoint must respond within 5 seconds — WhatsApp will timeout after that.
4
Test the endpoint with a tool like Postman to verify the response format.
Required JSON format for dropdown options: { "version": "3.0", "screen": "MAIN", "data": { "slot_options": [ {"id": "10AM", "title": "10:00 AM — Available"}, {"id": "11AM", "title": "11:00 AM — Available"}, {"id": "2PM", "title": "2:00 PM — 2 slots left"} ] } }

Step 2: Configure the Flow to use your endpoint

1
In the Flow Builder, go to Flow Settings or Data Sources.
2
Add your endpoint URL as the Data Exchange Endpoint.
3
If your endpoint requires authentication, add the token as a header in the endpoint configuration.
4
In the screen where the dropdown appears, add a Dropdown field.
5
Set the Data Source for the dropdown to Dynamic and reference the data key from your endpoint response (e.g., slot_options).
6
Save and use the Preview to verify the dropdown loads correctly.
Passing context to your endpoint

WhatsApp can pass the customer's phone number and any previously entered form values to your endpoint. This allows your API to return personalised options — e.g., showing only the branches nearest to the customer's city.

Step 3: Test and publish

1
Test the full Flow in preview mode — verify the dropdown populates.
2
Test with slow network conditions (your endpoint must respond in <5 seconds).
3
Add error handling: if your endpoint fails, the Flow should show a friendly error screen rather than a blank dropdown.
4
Publish the Flow when testing is complete.
Google Sheets as a dynamic source

You can use Google Sheets as your data source via a Google Apps Script web app. The script reads the sheet and returns the JSON format above. This lets non-technical teams update dropdown options by editing a spreadsheet.

Was this helpful? If you are stuck, message us on WhatsApp and a real person will help.

Ask us on WhatsApp
Related guides
1