Automate Daily Weather SMS with n8n (OpenWeatherMap + Plivo)
Automating daily weather alerts is a simple yet powerful way to keep teams, customers, or yourself informed without any manual effort. In this guide, you will learn how to design a production-ready n8n workflow that retrieves current weather data from OpenWeatherMap and delivers it as an SMS via Plivo on a fixed schedule.
This article is written for automation professionals and technical users who want a reliable, maintainable n8n weather SMS workflow that can be extended and integrated into broader automation strategies.
Use case overview
The core objective is to build an n8n workflow that:
- Runs automatically at a defined time using a Scheduled Trigger (cron)
- Calls the OpenWeatherMap API to fetch current conditions for a given city
- Formats the response and sends it as an SMS through Plivo
Typical use cases include:
- Daily temperature and conditions for remote or field-based teams
- Weather-based operational triggers, such as pausing deliveries during severe conditions
- Personal reminders, such as carrying an umbrella or adjusting clothing based on temperature
Keywords: n8n weather SMS, OpenWeatherMap integration, Plivo SMS, cron trigger, automate weather SMS alerts.
Architecture and key components
The workflow is intentionally minimal, using three core n8n nodes that can be extended as required:
- Scheduled Trigger (Cron) – initiates the workflow at a fixed daily time
- OpenWeatherMap node – retrieves current weather data for a configured location
- Plivo node – sends an SMS with a formatted summary of the weather
This linear sequence keeps the logic easy to audit and maintain:
Scheduled Trigger → OpenWeatherMap → Plivo SMS
Prerequisites
Before you configure the workflow in n8n, ensure you have:
- An operational n8n instance (self-hosted or n8n.cloud)
- An OpenWeatherMap API key (the free tier is sufficient for daily checks)
- A Plivo account with:
- An SMS-enabled phone number
- Auth ID and Auth Token
- Basic familiarity with setting up n8n nodes and credentials
Step-by-step workflow configuration
1. Configure the Scheduled Trigger (Cron)
Start by adding a Scheduled Trigger node, which uses cron-style configuration to control when the workflow runs.
For a daily run at 9:00 AM:
- Set the trigger type to Cron
- Configure the hour field to
9
If your n8n instance operates in UTC, align the configured time with your target timezone. For example, if you want 9:00 AM local time and your local time is UTC+2, you would set the cron hour to 7. Timezone alignment is critical for reliable scheduling in production environments.
2. Add and configure the OpenWeatherMap node
Next, connect the Scheduled Trigger node to an OpenWeatherMap node. This node will query the current weather for a specific city.
Key configuration steps:
- Select or create OpenWeatherMap credentials in the n8n credentials manager and provide your API key.
- Specify the City Name (for example,
Berlin). - Set the operation to Current Weather to retrieve live conditions.
The OpenWeatherMap node returns a JSON payload with multiple fields. Commonly used properties include:
main.temp– current temperature (Kelvin by default, unless units are specified)weather[0].description– short textual description (for example,clear sky)wind.speed– wind speed
For many user-facing SMS messages, you will want to convert the temperature from Kelvin to Celsius or Fahrenheit. You can do this either directly in expressions or via a Function node, as described later.
3. Configure the Plivo SMS node
After the OpenWeatherMap node, add a Plivo node to send the SMS message. Connect it to the output of the weather node.
In the Plivo node configuration:
- Select or create Plivo credentials (Auth ID and Auth Token) in the n8n credentials manager.
- Set the From field to your SMS-enabled Plivo number.
- Set the To field to the recipient phone number(s).
- Define the Message body using n8n expressions to reference data from the OpenWeatherMap response.
Example SMS template that reads data from a node named Weather Fetcher:
Hey! The temperature outside is {{$node["Weather Fetcher"].json["main"]["temp"]}}°C. Current conditions: {{$node["Weather Fetcher"].json["weather"][0]["description"]}}.
If OpenWeatherMap is returning temperature in Kelvin and you prefer Celsius, use an expression for conversion. For example:
=Math.round($node["Weather Fetcher"].json["main"]["temp"] - 273.15)
You can embed this expression directly in the message field, for instance:
Hey! The temperature outside is {{Math.round($node["Weather Fetcher"].json["main"]["temp"] - 273.15)}}°C. Current conditions: {{$node["Weather Fetcher"].json["weather"][0]["description"]}}.
This approach keeps the workflow simple while still providing readable, user-friendly values in the SMS.
Conceptual workflow JSON
The following JSON illustrates the structure of the workflow that you can import into n8n. You will still need to configure credentials and adjust parameters such as city name and phone numbers:
{ "name": "Daily Weather SMS", "nodes": [ { "name": "Scheduled Trigger", "type": "n8n-nodes-base.cron", "parameters": { "triggerTimes": { "item": [ { "hour": 9 } ] } } }, { "name": "Weather Fetcher", "type": "n8n-nodes-base.openWeatherMap", "parameters": { "cityName": "berlin" } }, { "name": "SMS Sender", "type": "n8n-nodes-base.plivo", "parameters": { "message": "=Hey! The temperature outside is {{$node[\"Weather Fetcher\"].json[\"main\"][\"temp\"]}}°C." } } ], "connections": { "Scheduled Trigger": { "main": [ [ { "node": "Weather Fetcher" } ] ] }, "Weather Fetcher": { "main": [ [ { "node": "SMS Sender" } ] ] } }
}
Use this JSON as a conceptual reference or as a starting point for importing and then refining the workflow in the n8n editor.
Operational best practices
Timezone alignment
Validate the timezone used by your n8n instance. If the instance runs in UTC but your recipients expect local time, adjust the Cron node configuration accordingly. Misaligned timezones often result in messages being sent several hours earlier or later than intended.
Temperature units and formatting
For clarity and user experience:
- Convert Kelvin to Celsius or Fahrenheit using expressions or a Function node.
- Apply rounding with
Math.round()or similar functions to avoid long decimal values. - Explicitly include units, for example
°Cor°F, in the SMS message.
Error handling and resilience
For production-grade automations, implement robust error handling:
- Use a global Error Workflow or a Catch Error pattern to capture failures from the OpenWeatherMap or Plivo nodes.
- Send internal alerts (via email, Slack, or another channel) if an API call fails or Plivo returns an error.
- Optionally, send a fallback SMS to the recipient indicating that the weather information could not be retrieved.
Rate limits and performance
Monitor and respect the rate limits of both OpenWeatherMap and Plivo:
- For a single daily notification per recipient, the default free tiers are generally sufficient.
- If you scale to multiple locations or higher frequency, consider caching responses or consolidating requests to stay within rate limits.
Localization and personalization
To support different audiences and regions:
- Localize the message language based on recipient preferences.
- Use conditional logic or branches to choose between Celsius and Fahrenheit.
- Maintain separate recipient lists or branches for different regions or teams.
Troubleshooting common issues
Invalid or missing credentials
- Verify that the OpenWeatherMap API key is correctly stored in the n8n credentials manager and associated with the OpenWeatherMap node.
- Confirm that the Plivo Auth ID and Auth Token are valid and correctly referenced in the Plivo node.
SMS not delivered
- Ensure that your Plivo number is SMS-enabled for the destination country.
- Check that your Plivo account is active and permitted to send SMS to the target region.
- Inspect Plivo logs or error messages in n8n to identify delivery issues.
Unexpected temperature readings
- If temperatures appear incorrect, confirm whether OpenWeatherMap is returning Kelvin, Celsius, or Fahrenheit.
- Adjust the API unit settings or apply the necessary conversion in n8n.
- Validate your conversion logic in expressions or Function nodes.
Security and cost management
From a security and operational standpoint:
- Store all API keys and tokens exclusively in the n8n credentials manager, not in plain text within nodes.
- Rotate keys periodically in line with your security policies.
- Monitor Plivo SMS usage and associated costs. Plivo charges per SMS, so implement logging or alerts to avoid unexpected billing.
- For OpenWeatherMap, the free tier is adequate for simple daily checks, but a paid plan may be required for high-frequency updates or multiple locations.
Extending and scaling the workflow
Once the basic automation is in place, you can evolve it into a more sophisticated weather notification system:
- Multiple recipients or groups: Send the same alert to multiple phone numbers, or dynamically select recipients from a database or CRM.
- Conditional alerts: Use IF nodes to trigger messages only when certain thresholds are met, such as extreme temperatures or severe weather conditions.
- Logging and compliance: Record each sent SMS in a Google Sheet, database, or logging system for auditing and analytics.
- Multi-channel notifications: In addition to SMS, forward the same weather summary to Slack, Microsoft Teams, or email using additional n8n nodes.
Conclusion
By combining the Scheduled Trigger, OpenWeatherMap, and Plivo nodes, n8n provides a clean and extensible pattern for automated daily weather SMS alerts. With minimal configuration, you can have a reliable workflow that runs every morning, retrieves up-to-date weather information, and distributes it to your chosen recipients.
With added features such as temperature conversion, error handling, logging, and conditional logic, this simple flow can become a robust component of your broader automation landscape.
Next steps: Import the workflow into your n8n instance, configure your OpenWeatherMap and Plivo credentials, set your desired schedule, and run a test execution to validate the end-to-end behavior.
If you need to adapt this workflow for multiple cities, custom thresholds, or advanced message templates, feel free to reach out or leave a comment. It is straightforward to extend this template to match more complex operational requirements.
Call to action: Try this n8n weather SMS workflow today. Import the template, plug in your credentials, and run an immediate test. If you find this useful, subscribe for more n8n automation tutorials and best practices.
