n8n

How to Connect OpenAI Weather Chat Support?

Run a hosted chat that gives instant weather answers for any city. An AI agent guides the conversation, asks for the city if needed, and returns a clear multi day forecast. This fits travel teams, event planners, and customer portals that need quick updates.

Messages enter through a web chat trigger. A short term memory node keeps context so follow up questions make sense. The agent uses OpenAI to decide which tool to call and in what order. It first turns a city name into latitude and longitude using the Open Meteo geocoding API. Then it pulls daily max temperature and rain totals from the Open Meteo forecast API with the requested number of days. The reply goes back to the same chat in one flow.

You only need an OpenAI API key. The weather API is public and needs no key. Expect faster replies, fewer mistakes, and less manual lookup work. Common uses include trip quotes, field team scheduling, and outdoor event planning. After activating, test with a message like Weather Forecast for the Next 7 Days in São Paulo.

What are the key features?

  • Hosted web chat trigger with configurable title and subtitle
  • Chat memory buffer keeps recent messages for smooth follow ups
  • OpenAI chat model generates natural language replies
  • AI tool agent selects and orders tools automatically during the chat
  • HTTP tool for city geocoding using Open Meteo with name, count 1, and json format
  • HTTP tool for forecast returning daily max temperature and precipitation with timezone GMT and forecast days
  • No weather API key required which simplifies setup and maintenance

What are the benefits?

  • Reduce manual lookup from 5 minutes to 10 seconds per request
  • Automate 100 percent of city to coordinates steps
  • Eliminate up to 90 percent of human errors in coordinates
  • Handle multiple conversations at once through a hosted chat link
  • Connect OpenAI and Open Meteo in one guided chat flow

How do you set it up?

  1. Import the template into n8n: Create a new workflow in n8n > Click the three dots menu > Select 'Import from File' > Choose the downloaded JSON file.
  2. You'll need accounts with OpenAI and Open Meteo. See the Tools Required section above for links to create accounts with these services.
  3. In the n8n credentials manager, create an OpenAI credential: click New, choose OpenAI, paste your API key from your OpenAI account, and give the credential a clear name.
  4. Open the OpenAI Chat Model node and select the OpenAI credential you created from the Credential to connect with dropdown.
  5. Open the hosted chat trigger node. Review the title and subtitle, confirm the public option is enabled, and copy the chat link for testing.
  6. Check the Chat Memory Buffer node is linked to both the chat trigger and the AI agent so the conversation keeps context.
  7. Open the geocoding tool node. Confirm query parameters include name as a placeholder, count set to 1, and format set to json.
  8. Open the forecast tool node. Confirm placeholders for latitude, longitude, and forecast_days, and ensure daily includes temperature_2m_max and precipitation_sum with timezone set to GMT.
  9. Activate the workflow. Open the hosted chat link and send a message like Weather forecast for the next 7 days in São Paulo.
  10. Validate behavior: if the city is missing, the agent should ask for it. If the forecast appears, verify dates, temperatures, and rain totals look reasonable.
  11. Troubleshoot common issues: if you see authentication errors, recheck your OpenAI API key. If a city is not found, try full city and country. If times look off, change the timezone parameter. If units are not what you expect, add unit parameters supported by Open Meteo.
  12. Optional tuning: adjust forecast_days defaults, edit the chat title, or refine system prompts in the agent for shorter or more detailed answers.

Tools Required

$24 / mo or $20 / mo billed annually to use n8n in the cloud. However, the local or self-hosted n8n Community Edition is free.

Open Meteo

Sign up

Free tier: $0 / mo, no API key, non-commercial use; limits 600/min, 5,000/hour, 10,000/day, 300,000 / mo

OpenAI

Sign up

Pay-as-you-go: GPT-5 at $1.25 per 1M input tokens and $10 per 1M output tokens

Credits:
Davi Saranszky Mesquita LinkedIn

Similar Templates

Join Futurise to access 1,200+ automation templates

Get instant access to ready-made automation workflows for n8n, Make.com, AI agents, and more. Download, customise, and deploy in minutes.