Find the nearest branch or ATM through AI chat
Workflow purpose
This guide demonstrates how to use Proto's AI agent to help people find the nearest branch, ATM, agent or service point, with opening hours, available services and a link to directions.
The workflow asks where the person is and what they need, looks up matching locations in your branch database or locator service, and shows the closest results as cards with a Get directions button. Temporary closures and out-of-service ATMs can be flagged before the person makes the trip.
"Where is your nearest branch?" is a constant question for any organisation with a physical network, and the answer changes as hours, services and ATM availability change.
Who can benefit from this guide:
- Banks, credit unions and microfinance institutions with branch and ATM networks
- Mobile money providers with agent networks
- Government agencies with service centres and offices
- Hospitals, clinics and pharmacies with several locations
Find the nearest location
This workflow returns the nearest branches or ATMs, with hours and directions, 24/7. See how to build a location finder workflow.
1. Create a trigger
Start the flow when a person asks where to find a branch, ATM or agent.
- Navigate to the Workflows tab in the AI agent settings.
- Click New workflow and select Message received as the Workflow type.
- Name the trigger (e.g. “Branch Locator”) and add a short description (e.g. “Triggers if user asks for the nearest branch, ATM, agent or office, or asks about branch opening hours.”).
- Add training phrases (e.g. “Where is the nearest ATM”, “Find a branch near me”, “Is there a branch in Kisumu”, “What time does the branch close”, “Where can I deposit cash”).
2. Ask what and where
Collect the location type and the person’s area.
Add an Ask survey action. Action title: Location search
| Field | Variable | Type | Invalid reply |
|---|---|---|---|
| What are you looking for? | location_type |
Text | Please choose one of the options below |
| Which town, suburb or area are you in? | area |
Text | Please enter your town or area |
Add Quick answers to the first field: Branch | ATM | Agent. Keep Enable skip off for both fields.
If the person asks for a specific service – opening an account, foreign exchange, a cash deposit ATM – the AI agent can pick that up from the conversation. Store it with a Set variable action as service, so the search can filter on it.
3. Look up the nearest locations
Search your branch and ATM data.
If your locations are held in a database, add a SQL Query action – available on Enterprise plans:
- Database connector: the connection set up in Database Connections
- Query: e.g. SELECT name, address, hours, status, maps_url FROM locations WHERE type = $1 AND (town ILIKE ‘%’ || $2 || ‘%’ OR suburb ILIKE ‘%’ || $2 || ‘%’) ORDER BY name LIMIT 3 (PostgreSQL)
- Bind parameters: $1 =
{location_type}, $2 ={area} - Resulting variable:
locations
If you use a locator service instead, add a Send API action (HTTP method: GET) passing location_type and area, with the resulting variable locations.
Both actions branch into Success, Error and Timed out.
4. Show the results as cards
Show each location with its hours and a directions button.
Under Success, add a Branch to check that results were found (e.g. _.len(locations) > 0). Then add a Show carousel action with three cards, one for each result. For the first card:
- Title:
{locations[0]["name"]} - Subtitle:
{locations[0]["address"]} – {locations[0]["hours"]} - Button: type Link, text “Get directions”, URL
{locations[0]["maps_url"]}
Repeat for locations[1] and locations[2]. Store a map link for each location in your data, so the button opens directions in the person’s maps app.
If a location’s status is closed or out of service, add a Send message before the carousel saying so, so the person doesn’t make a wasted trip.
5. Handle no results
Make sure the person always leaves with an answer.
If no locations are found, add a Send message:
“I couldn’t find a {location_type} in {area}. Try a nearby town, or I can connect you with our team.”
Add quick reply options: Search again | Speak to an agent. Under Search again, add a Jump action back to Step 2. Under Speak to an agent, add a Live agent handoff action.
6. Answer follow-up questions
Add your branch information – services offered at each branch, public holiday hours, accessibility – to the AI agent’s Knowledge base as a File or URL. The AI agent then answers follow-ups such as “Does the Kisumu branch open on Saturdays?” from that content.
7. Test the flow
Validate every path before going live using the AI agent tester side panel.
- Search for each location type in several towns and check the results match your data.
- Open every Get directions button and confirm it points to the right place.
- Test a town with no locations and a misspelt town name.
- Mark a test ATM as out of service and confirm the warning appears.
- Build and test in an undeployed version – Duplicate the live version first – then Deploy it once every path passes.
Finalise the AI agent deployment by configuring your preferred channels and languages.
.png)