Your task
Challenge 02
Air Quality in Valencia
Reply to any TelegramTelegram is a messaging app that works on phones, computers, and the web. message with fresh air-quality data from any available station.
Your bonus task
Use the VALÈNCIA CENTRE station specifically. Add ✅ when its rating is Buena or Razonablemente Buena, and ⚠️ for any other rating. Keep replying to incoming messages, and also send a fresh update automatically every six hours to your own TelegramTelegram is a messaging app that works on phones, computers, and the web. account using one fixed private chat ID, even when no one messages the bot.
Example use cases
- A resident wants to check the latest air quality in central Valencia without searching it on Google.
- An event organizer wants to check local air quality before choosing an outdoor meetup spot.
- A neighborhood group wants a quick TelegramTelegram is a messaging app that works on phones, computers, and the web. air-quality update it can share with community members.
- Residents could use the same workflow pattern to request information from Valencia Open DataValencia Open Data is the website where Valencia City Council publishes public information for people and apps to reuse.'s nearly 300 public datasets through a familiar messaging app such as TelegramTelegram is a messaging app that works on phones, computers, and the web. or WhatsApp.
Before you start
- 01
Sign up for n8n Cloud or open an existing n8n workspace, then create a new workflow.
- 02
Install Telegram, then create or sign in to a Telegram account.
- 03
Create a Telegram bot with BotFather, then add its token as an n8n credential.
- 04
The Valencia City Council air-quality endpoint provides real-time data. Keep it ready to use in your HTTP Request node.
- 05
For the bonus, send your bot a private message once and copy message.chat.id from Telegram Trigger. Use that fixed ID as the recipient of scheduled updates. Configure the Schedule Trigger and publish the workflow to enable automatic runs.
Nodes you'll use
What the workflow must do
- 01
Any incoming message triggers a fresh request and a reply to the same chat, without checking its text or requiring a command. Test with two unrelated messages, such as a greeting and a sticker. Each must receive a reply based on newly fetched data.
- 02
The core reply includes the air-quality rating and every available NO₂Nitrogen dioxide (NO₂) is a gas produced mainly by road traffic and other fuel combustion. This value is reported in micrograms per cubic metre (µg/m³)., PM10PM10 means airborne particles that are 10 micrometres wide or smaller. This value is reported in micrograms per cubic metre (µg/m³). and PM2.5PM2.5 means fine airborne particles that are 2.5 micrometres wide or smaller. They can travel deeper into the lungs than PM10 and are reported in µg/m³. value from any one station; a missing measurement may be omitted or shown as unavailable.
- 03
For the bonus, select VALÈNCIA CENTRE by its address rather than its row position and apply the rating emoji to both replies and scheduled updates. For the bonus, publish a six-hour schedule that fetches new data and sends it to one fixed private chat ID. Test the scheduled branch independently of an incoming message.
Tip
Need a tip?
Reveal up to five tips, one at a time.
Still stuck? Ask on the n8n community forum
Solution
See the workflow challenge answer
Reveal the completed workflow only when you are ready to compare it with your own.
Submit as solved
Ready to submit?
Submit when your team has a working workflow to demonstrate.