Automate Daily Irrigation Alerts with n8n
On a cool morning in Salinas, Ana unlocked the door to her small farm office and glanced at the whiteboard on the wall. It was crowded with scribbled notes: “Check forecast,” “Walk north field,” “Drip line test,” “Text crew about irrigation.” She sighed. Most days started like this, with a race against the sun and a guess about how much water the crops really needed.
Some mornings she overwatered because the previous day had been hot. Other times she skipped irrigation, only to find wilted leaves by afternoon. Weather apps helped, but she still had to remember to check them, interpret the data, and message the field team on time. It was too easy to miss short-term changes or get distracted by other emergencies.
What Ana wanted was simple: a short, reliable irrigation advisory that arrived automatically every morning, based on current local weather, that she could trust and forward to her crew. No more guesswork, no more manual checks at 5:30 a.m.
The problem: manual irrigation decisions in a changing climate
Ana’s situation is not unique. Small farm managers and irrigation coordinators juggle dozens of tasks, yet irrigation decisions still depend on:
- Opening weather apps or browser tabs every morning
- Mentally translating temperature and rain chances into irrigation time
- Typing and sending SMS messages to crew members or partners
These manual checks are slow and easy to forget. They also do not always keep up with short-term weather shifts. A surprise morning drizzle or unexpected heat spike can make yesterday’s plan obsolete.
Ana knew that if she could automate just this one part of her day, she could save time, reduce water waste, and keep her crops healthier. That is when she discovered an n8n workflow template that promised exactly what she needed: a daily irrigation advisory delivered by SMS, powered by live weather data.
Discovery: finding an n8n template for irrigation alerts
Ana had already been using n8n for a few basic automations, so when she stumbled on an “Automate Daily Irrigation Alerts” template, she was curious. The description sounded familiar:
“Runs on a daily schedule, fetches current weather from OpenWeatherMap, evaluates irrigation need with simple rules, and sends a concise SMS via Plivo.”
That was exactly the workflow she had been doing manually, only slower and with more stress. The idea of turning it into an automated n8n workflow felt like a turning point.
She opened the template and saw a clear node flow:
- Cron – trigger once each morning
- OpenWeatherMap – fetch current weather for the farm
- Function – calculate irrigation recommendation from temperature and rain
- Plivo (SMS) – send the advisory to the farm manager or crew
It looked lightweight, understandable, and easy to customize. The only question was whether it would really match the way she made decisions in the field.
Rising action: turning Ana’s morning routine into an automated workflow
Ana decided to import the workflow into her n8n instance and walk through each step as if she were teaching it how to think like a farm manager.
Step 1 – Teaching the workflow when her day starts
The first node was a Cron trigger. In the past, Ana had set an alarm for 5:45 a.m. to check the weather. Now she set the Cron node to do that for her.
She configured the node to fire at 06:00 local time, right before irrigation decisions were usually made. In the n8n workflow settings, she made sure the farm’s timezone was correctly set so the trigger would run at the expected local hour, not at some random UTC time.
For the first time, she realized she could sleep through the old alarm and still have the information she needed waiting on her phone.
Step 2 – Connecting the farm to real-time weather
Next was the OpenWeatherMap node, which would replace Ana’s habit of refreshing a weather app and squinting at icons.
She configured it as follows:
- Operation:
currentWeather - Location: city name or latitude/longitude for the farm
- Credentials: her OpenWeatherMap API key
For her farm in Salinas, she used precise coordinates. The node returned temperature, humidity, and a weather array with descriptions like “Rain,” “Clouds,” or “Clear.”
This was the same data Ana used every day, but now it would feed straight into the logic of the workflow without her needing to interpret it manually.
Step 3 – Encoding her irrigation rules into a Function node
The heart of the workflow was the Function node called calculate-irrigation-need. This was where Ana’s field experience became code.
Inside the node, the example logic extracted temperature and the main weather description, then mapped them to four possible recommendations:
- HIGH – Irrigate 30-45 minutes when hot and not raining
- MEDIUM – Irrigate 15-30 minutes when warm and not raining
- LOW – Check soil moisture, irrigate if dry
- NONE – Skip irrigation when rain is expected
One line in particular caught her eye:
if (temp > 25 && precipitation !== 'Rain') { irrigationRecommendation = 'HIGH - Irrigate 30-45 min today';
}
That was almost exactly how she thought about hot, dry days. She adjusted the thresholds slightly to match her own experience, then added a calculatedAt timestamp so she could log when each decision was made.
She also made a mental note:
- OpenWeatherMap returns Kelvin by default, so she explicitly configured it for Celsius and confirmed the conversion.
- Later, she could feed in soil moisture or crop type for more precise control.
For now, the simple rule-based logic was enough to replace her daily mental math.
Step 4 – Delivering the advice by SMS with Plivo
The final piece of the puzzle was communication. Ana used to type out messages to her crew every morning. Now, the Plivo node would do that automatically.
She configured the SMS node with:
- Her verified Plivo sender number
- The crew’s phone numbers as recipients
- Securely stored Plivo credentials in n8n, instead of hard-coding them
The example message format was short and actionable:
Farm: Salinas – 26°C, Rain chance light rain. Recommended irrigation: MEDIUM – Irrigate 15-30 min today.
Ana customized the wording slightly to match how her team liked to read updates, but kept the essential structure: location, temperature, rain chance, and a clear recommendation.
The turning point: testing the workflow before going live
Before trusting an automated system with something as important as water, Ana wanted proof. She walked through a simple validation routine inside n8n.
- Manual runs with different weather scenarios
She used sample weather payloads to simulate:- Hot and dry days
- Warm and cloudy days
- Rainy mornings
Each time, she checked that the Function node produced the recommendation she would have chosen herself.
- Checking units and timezones
She verified that OpenWeatherMap was returning Celsius, not Kelvin, and confirmed that the Cron trigger aligned with her local timezone. - Sending test SMS messages
First she sent messages to her own phone to confirm formatting, then to a second test number to ensure Plivo was correctly configured and using E.164 format.
By the end of the afternoon, the workflow was behaving exactly like her own decision process, only faster and more consistent.
Resolution: life after automation
The first week with the automated irrigation advisory changed Ana’s mornings. At 6:00 a.m., her phone buzzed with a short SMS:
Farm: Salinas – 24°C, Clouds. Recommended irrigation: MEDIUM – Irrigate 15-30 min today.
She forwarded it to the crew chat and started her day without opening a single weather app. On a rainy morning, the message read:
Farm: Salinas – 19°C, Rain. Recommended irrigation: NONE – Skip irrigation, rain expected.
No guesswork, no wasted water, and no scrambling to update the team mid-morning.
Over time, Ana began to refine and extend the workflow, turning a simple automation into a small decision-support system for her farm.
How Ana improved the basic n8n irrigation workflow
Adding soil moisture sensors for smarter decisions
As her confidence grew, Ana integrated soil moisture data. Using LoRaWAN sensors and an API, she sent moisture readings into n8n and passed them into the same Function node.
With a simple threshold check, the logic could now say, “Even if it is warm and dry in the air, do not irrigate if the soil is still moist.” This prevented unnecessary watering the day after a deep irrigation or heavy rain.
Scaling to multiple fields and crops
Eventually, Ana wanted different rules for different blocks: leafy greens, fruiting crops, and a small greenhouse. She stored farm metadata in a Google Sheet that included:
- Coordinates per field
- Crop type
- Preferred irrigation durations
The workflow read from this sheet, looped through each farm block, and applied slightly different thresholds and messages. What started as a single SMS became a structured multi-farm advisory, still managed by the same n8n template.
Using short-term rainfall forecasts instead of only current conditions
Ana also realized that current conditions were not always enough. A clear sky at 6:00 a.m. did not guarantee a dry afternoon. She enabled OpenWeatherMap’s forecast endpoints and used hourly or daily forecasts to check whether measurable rain was expected in the next 6-12 hours.
Now, the workflow could say, “Skip irrigation if rain is predicted soon,” instead of only reacting to what the sky looked like at that moment.
Logging, trends, and alerts
To track how often the farm needed heavy watering, Ana added a logging step. Each decision was written to a CSV file or Google Sheet with:
- Date and time
- Temperature
- Weather description
- Irrigation recommendation
She even set up an additional notification: if the system produced repeated HIGH recommendations several days in a row, n8n would send her an email or Slack message. That pattern could indicate a leak, a broken emitter, or unusually hot weather that needed extra attention.
Operational realities: what Ana learned about running this in production
Costs and usage
As the workflow matured, Ana kept an eye on:
- OpenWeatherMap API costs for higher request volumes or detailed forecasts
- SMS charges from Plivo or any other provider she might switch to
She optimized by limiting recipients to key decision makers and avoided unnecessary test runs once the system was stable.
Security practices in n8n
From the start, she followed good security hygiene:
- Stored API keys and phone credentials in n8n credentials, never inside Function code
- Restricted access to her n8n instance
- Used HTTPS for remote access
This kept sensitive data safe while still allowing her to adjust logic and thresholds easily.
Reliability and error handling
Occasionally, external services would fail. Ana added basic error handling so that if the weather API call failed, the workflow would either retry or send her an alert instead of silently doing nothing.
Using n8n’s error workflows and retry logic, she made sure that a temporary API outage did not turn into a missed irrigation day.
Troubles Ana solved along the way
Like any automation, the irrigation advisory needed a bit of tuning. Ana ran into a few common issues and fixed them quickly:
- Strange temperature readings
When numbers looked wrong, she checked the OpenWeatherMap unit settings and confirmed she was using Celsius instead of Kelvin. - SMS messages not delivering
She verified that her Plivo sender number was correctly provisioned and that recipient numbers followed international E.164 format. - Recommendations that felt slightly off
She adjusted thresholds, for example using 22°C instead of 20°C for “warm,” and folded in soil moisture data where available.
Each tweak made the system feel more like a trusted colleague and less like a rigid script.
Who this kind of n8n irrigation workflow helps
Ana’s story is one example, but the same n8n template works well for:
- Small vegetable farms that hand-water or run simple drip systems
- Greenhouse operations that need daily checks without adding staff
- Cooperative farms that share a single irrigation manager across multiple sites
Anywhere that daily irrigation decisions depend on weather and quick communication, an automated advisory can reduce stress and improve water efficiency.
Your next chapter: putting the template to work
With just a few n8n nodes, Ana turned a stressful morning routine into a calm, repeatable process. You can follow the same path:
- Import the workflow JSON into your n8n instance.
- Set your OpenWeatherMap credentials and configure units (Celsius or Fahrenheit).
- Add your Plivo credentials and verified phone numbers.
- Update farm coordinates or city name for your location.
- Run manual tests with different weather scenarios.
- Enable the Cron trigger and monitor results for a week.
- Tune thresholds and rules to match your crops, soil, and local climate.
From there, you can expand to multi-farm setups, integrate soil moisture sensors, or switch from current conditions to forecast-based logic, all within the same n8n framework.
Ready to try it? Import the template, connect your APIs, and let your first automated irrigation advisory arrive tomorrow morning instead of waking up to another guessing game.
