The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"name": "Alerta Clima Workflow",
"nodes": [
{
"parameters": {},
"id": "1",
"name": "Schedule Trigger",
"type": "n8n-nodes-base.scheduleTrigger",
"typeVersion": 1,
"position": [
250,
300
]
},
{
"parameters": {
"options": {},
"requestMethod": "GET",
"url": "http://localhost:3001/trpc/clima.list",
"responseFormat": "json"
},
"id": "2",
"name": "Fetch Clima",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.1,
"position": [
450,
300
]
},
{
"parameters": {
"jsCode": "const climas = $input.all()[0].json.result?.data?.json || [];\nconst alertas = climas.filter(c => c.tempMax > 35).map(c => ({\n loteId: c.loteId,\n tipo: 'ola_calor',\n severidad: 'advertencia',\n mensaje: `Temperatura m\u00e1xima ${c.tempMax}\u00b0C detectada en lote ${c.loteId}`,\n fecha: c.fecha\n}));\nreturn alertas;"
},
"id": "3",
"name": "Evaluar Alertas",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
650,
300
]
},
{
"parameters": {
"options": {},
"requestMethod": "POST",
"url": "http://localhost:3001/trpc/alertas.evaluar",
"sendBody": true,
"bodyParameters": {
"parameters": [
{
"name": "loteId",
"value": "={{ $json.loteId }}"
}
]
},
"responseFormat": "json"
},
"id": "4",
"name": "Create Alertas",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.1,
"position": [
850,
300
]
}
],
"connections": {
"Schedule Trigger": {
"main": [
[
{
"node": "Fetch Clima",
"type": "main",
"index": 0
}
]
]
},
"Fetch Clima": {
"main": [
[
{
"node": "Evaluar Alertas",
"type": "main",
"index": 0
}
]
]
},
"Evaluar Alertas": {
"main": [
[
{
"node": "Create Alertas",
"type": "main",
"index": 0
}
]
]
}
},
"settings": {
"executionOrder": "v1"
},
"staticData": null,
"tags": []
}
About this workflow
Alerta Clima Workflow. Uses scheduleTrigger, httpRequest. Scheduled trigger; 4 nodes.
Source: https://github.com/RobertoA1/lab03-soft/blob/b2fb1c72103960d5cc72a5197d3cac9b6019811d/.n8n/workflows/alerta-clima.json — original creator credit. Request a take-down →