A beginner-friendly guide to connecting your AI phone agent to live data using webhooks.
Your echowin AI agent already knows a lot. It knows your business hours, your services, your FAQ — everything you've loaded into its knowledgebase. But what about information that changes every hour? Things like today's weather, a customer's order status, or whether your 2 PM appointment slot is still open?
That's where webhooks come in. With echowin's Call API (Webhooks) tool, your AI agent can reach out to any external service, grab live data, and use it in the conversation — all in real time, while the caller is still on the line.
In this post, we'll walk through exactly how this works by building a simple example: teaching your agent to fetch and report the current weather. It's a small project, but it reveals a powerful pattern you can apply to almost anything.
Think of a webhook as your AI agent making a quick phone call of its own — except instead of calling a person, it's calling a website or service to ask a question and get an answer back.
Here's the flow:
All of this happens in seconds. The caller just hears a smooth, informed answer — they have no idea your agent just fetched live data mid-conversation.
For a full technical reference on echowin's webhook tool, check out the official Call API (Webhooks) documentation.
Weather might sound trivial, but it's a surprisingly practical feature for many businesses:
HVAC & home services: "It's going to be 98°F tomorrow — would you like to schedule an AC check before the heat wave?" An agent that knows the forecast can proactively suggest relevant services.
Event venues & outdoor businesses: "Just so you know, Saturday's forecast looks clear with highs in the low 70s — perfect for your event." Callers planning outdoor bookings appreciate this without having to ask.
Delivery & logistics: "Current conditions show heavy rain in your area, so deliveries may take a bit longer today." Proactive context reduces frustration.
Roofing & contractors: "We've got storms in the forecast for Tuesday — want us to move your inspection to Wednesday instead?" Weather-aware scheduling prevents wasted trips.
Even if weather isn't directly relevant to your business, this walkthrough teaches you the core pattern behind every webhook integration. Once you know how to fetch weather, you know how to fetch anything — order statuses, appointment availability, inventory levels, CRM records, you name it.
To fetch weather data, your agent needs a weather API to call. There are several free options. For this example, we'll use Open-Meteo, which is free, requires no API key, and returns clean JSON — perfect for getting started quickly.
Here's what a simple Open-Meteo request looks like:
GET https://api.open-meteo.com/v1/forecast?latitude=40.01&longitude=-105.27¤t=temperature_2m,weathercode&temperature_unit=fahrenheit
And here's what it returns:
{
"current": {
"temperature_2m": 72.5,
"weathercode": 1
}
}
That's it — a temperature and a weather code. Your agent can turn 72.5 and weather code 1 (which means "mainly clear") into a natural sentence like "It's currently 72 degrees and mostly clear outside."
Note: If your business operates in a fixed location, you can hardcode the latitude and longitude for your city. If you need weather for the caller's location, you could use a geocoding API to convert their zip code or city into coordinates — but let's keep it simple for now.
Now let's wire this up inside echowin. Head to your agent's settings and add a new Call API (Webhooks) tool.
Here's the configuration:
Description:
Fetch Current Weather
URL:
https://api.open-meteo.com/v1/forecast
Method:
GET
Headers:
{
"Content-Type": "application/json"
}
Query String Parameters:
?latitude=40.01&longitude=-105.27¤t=temperature_2m,weathercode&temperature_unit=fahrenheit
Replace the latitude and longitude with your business's actual coordinates. You can find them by searching your address on Google Maps and copying the numbers from the URL.
Body: (Leave empty — this is a GET request)
Response Identifiers:
current.temperature_2m
current.weathercode
These response identifiers tell your agent which parts of the API response it's allowed to use. By specifying current.temperature_2m and current.weathercode, your agent can access the temperature and conditions without being overwhelmed by the full response payload.
Before going live, use echowin's built-in Test Playground to verify everything works:
current.temperature_2m, current.weathercode) to confirm they're mapped to your response identifiers.If you get an error, double-check your URL and query string parameters. The most common mistake is a typo in the latitude/longitude or a missing parameter.
Your agent needs to know when and how to use this new tool. Add something like this to your agent's instructions:
You have access to a "Fetch Current Weather" tool that returns the current temperature
and weather conditions for our area.
Use this tool when:
- A caller asks about the weather or current conditions
- You are scheduling an outdoor service and weather context would be helpful
- A caller asks whether they should reschedule due to weather
When reporting the weather, convert the weather code to plain language:
- 0 = Clear sky
- 1 = Mainly clear
- 2 = Partly cloudy
- 3 = Overcast
- 45 or 48 = Foggy
- 51, 53, 55 = Drizzle
- 61, 63, 65 = Rain
- 71, 73, 75 = Snow
- 80, 81, 82 = Rain showers
- 95 = Thunderstorm
Example: If the temperature is 72.5 and the weather code is 1, say something like
"It's currently about 73 degrees and mostly clear outside."
Round the temperature to the nearest whole number. Keep it conversational.
This gives your agent enough context to use the tool naturally without sounding robotic.
Call your echowin number and ask something like:
Your agent will trigger the webhook, get the live data, and respond with a natural, informed answer. You can check the full exchange in your echowin call logs afterward — the transcript will show the tool being called and the response being used.
This isn't just a hypothetical — restaurants on echowin are already using the weather webhook to make smarter seating decisions on every call.
Here's the scenario: a caller dials a restaurant and says "I'd like to make a reservation for four on Saturday evening." Without the weather tool, the agent books the table and moves on. But with it, the conversation gets a lot more useful.
The restaurant configures the weather webhook to fetch the forecast for their location — including not just the current conditions but the forecast for the next few days. When a caller requests a reservation, the agent automatically checks the weather for the requested date before confirming the booking.
The conversation might go something like this:
Caller: "Hi, I'd like to book a table for four this Saturday at 7 PM."
Agent: "I'd love to help with that! Just so you know, Saturday evening is looking beautiful — around 74 degrees and clear skies. Would you prefer our outdoor patio or indoor dining?"
Caller: "Oh, outdoor sounds perfect!"
Agent: "Great choice. I've got you down for four on the patio, Saturday at 7 PM."
Now compare that to a rainy forecast:
Caller: "Can we get a table outside on Friday?"
Agent: "I'd love to seat you on the patio, but Friday's forecast is showing rain showers in the evening. I'd recommend indoor seating so your dinner isn't interrupted — or if you're flexible, Saturday is looking clear and warm. What would you prefer?"
The agent isn't just taking a reservation — it's giving the caller a better experience by anticipating a problem before it happens.
The webhook configuration is almost identical to the basic weather setup we walked through earlier, with one small addition: you'll want to include forecast data alongside current conditions so the agent can look ahead.
Query String Parameters (with 7-day forecast):
?latitude=YOUR_LAT&longitude=YOUR_LNG¤t=temperature_2m,weathercode&daily=temperature_2m_max,temperature_2m_min,weathercode&temperature_unit=fahrenheit&timezone=auto
Additional Response Identifiers:
daily.temperature_2m_max
daily.temperature_2m_min
daily.weathercode
Then update the agent's instructions to tie the weather data to the seating decision:
You have access to a "Fetch Current Weather" tool that returns current conditions
and a 7-day forecast for our restaurant's location.
When a caller wants to make a reservation:
1. If they request outdoor/patio seating, check the forecast for their requested date.
2. If the weather looks good (clear, partly cloudy, and above 55°F), confirm the
outdoor reservation and mention the nice forecast.
3. If the forecast shows rain, storms, extreme heat (above 95°F), or cold (below 50°F),
gently suggest indoor seating instead. Offer an alternative date with better weather
if the caller is flexible.
4. If the caller doesn't specify a seating preference, and the weather for their date
is great, proactively mention the patio as an option.
Keep the weather mention brief and natural — one sentence is enough. Don't turn every
reservation into a weather report.
Fewer no-shows and last-minute changes. When diners book patio seating and it rains, they either cancel or show up unhappy. An agent that steers them toward the right choice up front reduces both problems.
Higher patio utilization. On beautiful days, the agent actively suggests outdoor seating to callers who might not have thought to ask. More patio covers mean higher revenue on days when the weather is an asset.
Better caller experience. A restaurant that proactively says "Saturday looks gorgeous for the patio" feels thoughtful and attentive. It's a small detail that leaves a lasting impression — and it happens automatically on every call.
This is one of those integrations that takes fifteen minutes to set up and quietly improves every single reservation call from that point forward.
The weather example is intentionally simple, but the pattern is identical for more complex use cases. Here's how the same approach scales:
Check order status:
$order_number (collected from the caller)Look up a customer record:
$phone_number (automatically available from caller ID)Check appointment availability:
$preferred_date (collected during conversation)Get real-time pricing or inventory:
$product_name or $skuIn each case, the setup follows the same five steps: pick your API, configure the webhook, test in the playground, update your agent's instructions, and go live.
For more complex workflows that chain multiple steps together — like looking up a customer, checking their balance, and scheduling a callback — you can combine webhooks with echowin's Zapier integration or chain multiple webhook tools in your agent's instructions.
Start simple. Get one webhook working perfectly before adding more. The weather example is a great first project because the API is free and the response is straightforward.
Use the cURL import. If the API you want to connect to provides cURL examples in their documentation, you can paste them directly into echowin's webhook configuration. It'll auto-populate the URL, method, headers, and body for you — a major time saver.
Be specific in your instructions. Don't just tell your agent "use the weather tool." Tell it when to use it, how to interpret the response, and what to say if the tool fails. Clear instructions lead to natural conversations.
Keep response identifiers lean. Only map the fields your agent actually needs. The less data it has to parse, the faster and more accurate the response.
Test with the playground first, every time. echowin's built-in test playground lets you simulate the API call with real data before any caller ever hits it. Use it.
Your echowin AI agent isn't limited to what's in its knowledgebase. With the Call API (Webhooks) tool, it can pull live data from virtually any external service — weather, CRM records, order statuses, scheduling systems, and more — and use that information naturally in conversation.
The weather example is just the beginning. Once you've set up your first webhook, you'll start seeing opportunities everywhere: every system your business runs on is a potential data source for your agent.
Ready to try it? Log into your echowin dashboard, open your agent's tools, and add your first webhook. The Call API documentation has the full reference if you need it.
Have a creative webhook use case? We'd love to hear about it. Reach out to the echowin team or share it with the community.
AGI is all the hype these days. But how will it affect your business, if or when it does get developed? As a business owner, find where you can integrate AI into your services.
Running a small business means endless admin after calls. Workflow Builder automates follow-ups, emails, and CRM updates so you never miss a lead.
Jeremy Ryan, CIO at Polarity, had shipped voicebots before, but prior vendors left him without post‑launch support and forced constant tinkering. "echowin helped us simplify the complex and gave my clients something they can actually use every day" - Jeremy after echowin
Streamline Your Business Operations with Technology & Innovation - get expert tips, proven strategies, and actionable insights delivered straight to your inbox!
Subscribe to our blog

Join thousands of businesses automating their operations with echowin