Describe the problem/error/question
Workflow wont load
What is the error message (if any)?
Problem importing workflow (element?? ).forEach is not a function
Please share your workflow
I have no such code in my workflow
{
“name”: “My workflow 6”,
“nodes”: [
{
“parameters”: {
“rule”: {
“interval”: [
{
“triggerAtHour”: 4
}
]
}
},
“name”: “Daily 4AM Trigger”,
“type”: “n8n-nodes-base.scheduleTrigger”,
“typeVersion”: 1.2,
“position”: [-1240, 140],
“id”: “e8b71bdd-6a7d-47c8-a4f8-d22d43648ba9”
},
{
“parameters”: {
“operation”: “5DayForecast”,
“format”: “imperial”,
“cityName”: “Carlsbad, CA, US”
},
“name”: “Weather Check”,
“type”: “n8n-nodes-base.openWeatherMapTool”,
“typeVersion”: 1,
“position”: [-900, 360],
“id”: “52eeb6eb-eee9-4ab2-aa39-b0e8b1a8e1f4”,
“credentials”: {
“openWeatherMapApi”: {
“id”: “fz9MQiAhdrPEl3uu”,
“name”: “OpenWeatherMap account”
}
}
},
{
“parameters”: {
“url”:
“options”: {
“timeout”: 10000
}
},
“name”: “AQICheck”,
“type”: “n8n-nodes-base.httpRequestTool”,
“typeVersion”: 4.2,
“position”: [-780, 360],
“id”: “4078ea85-be21-45eb-bfa7-644407f8a88f”,
“alwaysOutputData”: true,
“onError”: “continueRegularOutput”
},
{
“parameters”: {
“url”:
“options”: {
“timeout”: 30000
}
},
“name”: “AsterankQuery”,
“type”: “n8n-nodes-base.httpRequestTool”,
“typeVersion”: 4.2,
“position”: [-660, 360],
“id”: “28ab102f-2e53-4889-9fa1-b1a81d0fba89”
},
{
“parameters”: {},
“name”: “Loop Over Asteroids”,
“type”: “n8n-nodes-base.splitOut”,
“typeVersion”: 1.2,
“position”: [-660, -40],
“id”: “2361a39d-fd01-4238-afe5-d3435ab0a697”
},
{
“parameters”: {
“jsCode”: “return items.map(item => {\n const fullName = item.json.full_name;\n return {\n json: {\n …item.json,\n name: typeof fullName === ‘string’ ? fullName : ‘Unknown’\n }\n };\n});”
},
“name”: “Set Asteroid Name”,
“type”: “n8n-nodes-base.code”,
“typeVersion”: 2,
“position”: [-600, -40],
“id”: “a1b2c3d4-5678-90ef-ghij-klmnopqrstuv”
},
{
“parameters”: {
“url”: “={{https://ssd.jpl.nasa.gov/api/horizons.api?format=text&COMMAND='${$json.spkid}'&OBJ_DATA='YES'&MAKE_EPHEM='YES'&EPHEM_TYPE='OBSERVER'&CENTER='coord@399'&COORD_TYPE='GEODETIC'&SITE_COORD='-117.31,+33.11,45.0'&START_TIME='${$now.format('YYYY-MM-DD')}'&STOP_TIME='${$now.plus(5, 'days').format('YYYY-MM-DD')}'&STEP_SIZE='1h'&QUANTITIES='9,20'
}}”,
“options”: {
“timeout”: 10000
}
},
“name”: “JPLQuery”,
“type”: “n8n-nodes-base.httpRequestTool”,
“typeVersion”: 4.2,
“position”: [-540, 360],
“id”: “b2e349df-602f-4cab-bb57-6f7275c04fe8”,
“onError”: “continueRegularOutput”
},
{
“parameters”: {
“modelName”: “models/gemini-2.0-flash”,
“options”: {
“temperature”: 0.2
}
},
“name”: “Google Gemini Chat Model”,
“type”: “@n8n/n8n-nodes-langchain.lmChatGoogleGemini”,
“typeVersion”: 1,
“position”: [-1200, 320],
“id”: “f405ddb9-313b-4db5-8676-937ac4438544”,
“credentials”: {
“googlePalmApi”: {
“id”: “HzKHhZlrMygn8H3e”,
“name”: “Google Gemini(PaLM) Api account”
}
}
},
{
“parameters”: {
“promptType”: “define”,
“text”: “={{ $json[‘Readable date’] }}”,
“options”: {
“systemMessage”: “You are an astronomy assistant helping plan observations. Follow these steps:\n1. Use Weather Check for 5-day forecast\n1a. A minimum of 10% cloud cover for at least four hours is required\n2. Use AQICheck for PM2.5 a maximum of 150 is required\n3. Use AsterankQuery for asteroid candidates that will be above 45 degrees for at least 30 minutes on two nights with the five day period\n4. Use JPLQuery for visibility checks\n5. Find at least 2 viable nights with clear skies\n6. Send a report if conditions are met. Report will include date of acceptable nights and a list of asteroids\n\nExample:\nNight 2: Cloudy 20-30% from sunset to 9pm, otherwise clear\nNumber | Name | RA | Dec | Alt | Az | VMag | RiseTime | TransitTime | SetTime | Duration\n\n7. If conditions are not met send a report, and include full list of candidate asteroids retrieved from AsterankQuery that met the observing criteria with their number and names as sent to JPL\n\nAlways send an email report\nCheck asteroid visibility for all 5 nights\nShow potential targets even on nights with poor weather \nHighlight the best nights with both good weather and good targets”
}
},
“name”: “Enhanced AI Agent”,
“type”: “@n8n/n8n-nodes-langchain.agent”,
“typeVersion”: 2,
“position”: [-740, 140],
“id”: “2ec673e5-431b-435f-a198-6bc2a6d83939”
},
{
“parameters”: {
“jsCode”: “return items.map(item => {\n const text = item.json.response || ‘’;\n return {\n json: {\n subject: text.match(/Subject:(.)/i)?.[1]?.trim() || ‘Asteroid Report’,\n message: text.match(/Message:(.)/is)?.[1]?.trim() || text,\n calendarStart: text.match(/Start:(.)/i)?.[1]?.trim(),\n calendarEnd: text.match(/End:(.)/i)?.[1]?.trim()\n }\n };\n});”
},
“name”: “Code Tool”,
“type”: “@n8n/n8n-nodes-langchain.toolCode”,
“typeVersion”: 1.2,
“position”: [-380, 460],
“id”: “ee49390e-0675-4085-a47f-fedbb381c514”
},
{
“parameters”: {
“sendTo”: me
“subject”: “={{ /n8n-auto-generated-fromAI-override/ $fromAI(‘Subject’, , 'string') }}", "message": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Message',
, ‘string’) }}”,
“options”: {
“appendAttribution”: false
}
},
“name”: “Gmail”,
“type”: “n8n-nodes-base.gmailTool”,
“typeVersion”: 2.1,
“position”: [-280, 280],
“id”: “5b0bf02e-3275-43c8-9c2f-f0e8707ff057”,
“webhookId”: “5d0a9464-eff6-44c5-ac5f-a15cd442a33f”,
“credentials”: {
“gmailOAuth2”: {
“id”: “g50CBKTkxw5QfLta”,
“name”: “Gmail account”
}
}
},
{
“parameters”: {
“sessionIdType”: “customKey”,
“sessionKey”: “={{ $json[‘Readable date’] }}”
},
“type”: “@n8n/n8n-nodes-langchain.memoryBufferWindow”,
“typeVersion”: 1.3,
“position”: [-1040, 320],
“id”: “2c945e29-c14e-4f38-9e9b-806758657b66”,
“name”: “Simple Memory”
}
],
“connections”: {
“Daily 4AM Trigger”: {
“main”: [
{
“node”: “Enhanced AI Agent”,
“type”: “main”,
“index”: 0
}
]
},
“Google Gemini Chat Model”: {
“ai_languageModel”: [
{
“node”: “Enhanced AI Agent”,
“type”: “ai_languageModel”,
“index”: 0
}
]
},
“Simple Memory”: {
“ai_memory”: [
{
“node”: “Enhanced AI Agent”,
“type”: “ai_memory”,
“index”: 0
}
]
},
“Weather Check”: {
“ai_tool”: [
{
“node”: “Enhanced AI Agent”,
“type”: “ai_tool”,
“index”: 0
}
]
},
“AQICheck”: {
“ai_tool”: [
{
“node”: “Enhanced AI Agent”,
“type”: “ai_tool”,
“index”: 0
}
]
},
“AsterankQuery”: {
“ai_tool”: [
{
“node”: “Enhanced AI Agent”,
“type”: “ai_tool”,
“index”: 0
}
]
},
“Loop Over Asteroids”: {
“main”: [
{
“node”: “Set Asteroid Name”,
“type”: “main”,
“index”: 0
}
]
},
“Set Asteroid Name”: {
“main”: [
{
“node”: “JPLQuery”,
“type”: “main”,
“index”: 0
}
]
},
“JPLQuery”: {
“ai_tool”: [
{
“node”: “Enhanced AI Agent”,
“type”: “ai_tool”,
“index”: 0
}
]
},
“Gmail”: {
“ai_tool”: [
{
“node”: “Enhanced AI Agent”,
“type”: “ai_tool”,
“index”: 0
}
]
}
},
“active”: false,
“settings”: {
“executionOrder”: “v1”
},
“versionId”: “24aab4f4-9d6a-49e4-84fe-ad6d4df6cf2c”,
“meta”: {
“templateCredsSetupCompleted”: true,
“instanceId”: “e7a33d3481f228426165d5ac975aa1c95cd0e9e11bbb05ce2355360346b07bf2”
},
“id”: “1M0N68Bxx4s8ksrj”,
“tags”:
}
Share the output returned by the last node
Can’t load workflow so never got that far
Information on your n8n setup
- n8n version:
- 1.95.3
- Database (default: SQLite):
- Yes
- n8n EXECUTIONS_PROCESS setting (default: own, main):
- yep
- Running n8n via (Docker, npm, n8n cloud, desktop app):
- direct command line method using n8n start
- Operating system:
- macOS 15.5