Optimize EV charging load control and alerts with HTTP API and email

Go to Workflow
0 views
Built by Oneclick AI Squad Oneclick AI Squad
Created on August 14, 2026

Description

Quick overview
This workflow polls an EV charging-network API every 5 minutes, calculates site-wide grid load and tariff status, generates per-station charging recommendations, and emails either a standard schedule update or an overload warning with a mitigation plan using SMTP.

How it works
Runs every 5 minutes on a schedule.
Requests live station demand, vehicle/queue details, grid capacity, and tariff information from a charging-network HTTP API endpoint.
Normalizes the returned station list into consistent fields (demand, capacity, battery level, and priority) for downstream processing.
Calculates total site demand versus grid capacity to derive grid load percentage, headroom, and a grid status, and flags whether the current tariff period is peak.
Builds a per-station recommended action (Charge Now, Throttle 50%, or Delay to Off-Peak) prioritizing queued and low-battery vehicles.
If grid load is high (≥80%) or marked as overload risk, waits 10 minutes, computes an estimated load reduction and projected grid load, and emails an overload warning and mitigation summary.
Otherwise, emails the standard charging schedule notification.

Setup
Configure HTTP Header Auth credentials for the charging-network API and replace the request URL with your real site status endpoint.
Configure an SMTP credential and update the from/to email addresses used by both email notifications.
Review and adjust the grid-load thresholds and prioritization rules in the JavaScript code steps to match your site capacity and operating policy.

Nodes Used (4)

Code
n8n-nodes-base.code
HTTP Request
n8n-nodes-base.httpRequest
Send Email
n8n-nodes-base.emailSend
Slack
n8n-nodes-base.slack