Describe the problem/error/question
I have a content marketing workflow that has been working well for the last few months.
It runs via Airtable (to organize everything). Lately, no matter what I do, the workflow uses a previous article topic. Even though it has been previously marked as Completed.
So, in other words, the workflow udpates the correct record (row), but with an OLD topic. We are unable to write new topics because it is trying to produce the same article over and over.
For context, we have a tri-fork switch node that directs the article to the right subbranch, depending on what stage we are at with that article.
The input into our AI Agent node is working properly. The output of the AI Agent node is where it breaks. It’s as if the AI agent node is simply running from its cache (I have confirmed there is no data pinned anywhere).
I have already tried deleting the nodes and recreating them, updating n8n (painstakingly and to no avail), and creating brand new records in Airtable… nothing worked
What is the error message (if any)?
No error message. According to n8n it is successful. In Airtable, I see the issues.
Please share your workflow
{
“nodes”: [
{
“parameters”: {},
“type”: “n8n-nodes-base.manualTrigger”,
“typeVersion”: 1,
“position”: [
-1536,
848
],
“id”: “24043fb6-96df-4ab4-a267-0c025aaeccfd”,
“name”: “Manual Workflow Execution”
},
{
“parameters”: {
“rules”: {
“values”: [
{
“conditions”: {
“options”: {
“caseSensitive”: true,
“leftValue”: “”,
“typeValidation”: “strict”,
“version”: 3
},
“conditions”: [
{
“leftValue”: “={{ $json.Status }}”,
“rightValue”: “Status A”,
“operator”: {
“type”: “string”,
“operation”: “equals”
},
“id”: “dcf2f56a-4f3f-4b63-bf48-f378a980ae55”
}
],
“combinator”: “and”
},
“renameOutput”: true,
“outputKey”: “Path 1”
},
{
“conditions”: {
“options”: {
“caseSensitive”: true,
“leftValue”: “”,
“typeValidation”: “strict”,
“version”: 3
},
“conditions”: [
{
“id”: “f4620cd5-730e-4da5-ad25-ff5b9cb02ba2”,
“leftValue”: “={{ $json.Status }}”,
“rightValue”: “Status B”,
“operator”: {
“type”: “string”,
“operation”: “contains”
}
}
],
“combinator”: “and”
},
“renameOutput”: true,
“outputKey”: “Path 2”
},
{
“conditions”: {
“options”: {
“caseSensitive”: true,
“leftValue”: “”,
“typeValidation”: “strict”,
“version”: 3
},
“conditions”: [
{
“id”: “4e114479-5e98-40d6-b826-ba1144b4f1dd”,
“leftValue”: “={{ $json.Status }}”,
“rightValue”: “Status C”,
“operator”: {
“type”: “string”,
“operation”: “equals”,
“name”: “filter.operator.equals”
}
}
],
“combinator”: “and”
},
“renameOutput”: true,
“outputKey”: “Path 3”
}
]
},
“options”: {}
},
“type”: “n8n-nodes-base.switch”,
“typeVersion”: 3.4,
“position”: [
-1104,
832
],
“id”: “073be42f-aa9f-4223-a1bc-5d8496321e2d”,
“name”: “Switch”
},
{
“parameters”: {
“promptType”: “define”,
“text”: “=You are an expert AI assistant tasked with data processing.\n\nAnalyze the following title and generate the foundational data based on the instructions below. \n\nITEM TITLE: {{ $json.fields[‘Item Title’] }}\n\nINSTRUCTIONS:\n1. Main Topic: Identify the primary topic.\n2. Related Terms: Provide 2-4 variation keywords, separated by commas.\n3. Output Value: Recommend a target numerical value based on complexity.\n4. Target Categories: Identify the specific categories relevant to this topic.\n5. Notes: Write a brief summary of the most important info to consider for this topic. \n\n## Your Job\n\nOUTPUT STRICT JSON ONLY:\n{\n “main_topic”: “string”,\n “related_terms”: “string”,\n “target_value”: number,\n “target_categories”: [“string”],\n “notes”: “string”\n}”,
“hasOutputParser”: true,
“options”: {}
},
“type”: “@n8n/n8n-nodes-langchain.agent”,
“typeVersion”: 3.1,
“position”: [
-624,
208
],
“id”: “adad6b9d-4f42-4627-8938-354809101270”,
“name”: “AI Agent”
},
{
“parameters”: {
“options”: {}
},
“type”: “n8n-nodes-base.splitInBatches”,
“typeVersion”: 3,
“position”: [
-864,
192
],
“id”: “07e66167-f0e5-43a9-8f8d-a4c3d435ceba”,
“name”: “Loop Over Items”
},
{
“parameters”: {
“jsCode”: "const aiOutput = $input.first().json.text || $input.first().json.output;\n\ntry {\n const cleanJson = aiOutput.replace(/
Share the output returned by the last node
I do not see how this well help, in this case, as the output looks proper, only for a previous article.
Information on your n8n setup
- n8n version: 2.25.7
- Database (default: SQLite): PostgreSQL (specifically, Postgres 16)
- n8n EXECUTIONS_PROCESS setting (default: own, main): main
- Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
- Operating system: Ubuntu Linux (running a Debian Bookworm container)