Backup N8N workflows to Github

Describe the issue/error/question

In the “Backup N8N workflows to GitHub” workflow, after the initial run I get an error on the ‘isDiffOrNew’ node. It seems to be an error on the 56th workflow to go through, though I’m not sure how to tell what is actually causing it or how to fix it.

What is the error message (if any)?

Within the node I get “Error: Unexpected end of JSON input [line 4]” with the following detail error.

SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at /usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Code:4:27
    at /usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Code:44:2
    at VM2 Wrapper.apply (/usr/local/lib/node_modules/n8n/node_modules/vm2/lib/bridge.js:485:11)
    at Sandbox.run (/usr/local/lib/node_modules/n8n/node_modules/vm2/lib/nodevm.js:426:23)
    at Sandbox.runCodeAllItems (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Code/Sandbox.js:36:42)
    at Sandbox.runCode (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Code/Sandbox.js:30:62)
    at Object.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Code/Code.node.js:75:39)
    at Workflow.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/Workflow.js:658:51)
    at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:590:68

Please share the workflow

Information on your n8n setup

  • n8n version: 0.220.0
  • Database you’re using (default: SQLite): Postgres
  • Running n8n with the execution process [own(default), main]: own (default)
  • Running n8n via [Docker, npm, n8n.cloud, desktop app]: docker

Just some additional information. The workflow that is failing has a few nodes with pinned data. Not sure if that matters.

I also noticed that the key “content” that comes in from the previous Merge node has no value when it fails on workflow 56.

Hey @mbowler,

What is in workflow 56?

This is the workflow causing the issue. Not anything too crazy going on. (edit. looks like I have to split it into two parts due to character limit.)

Part 1

Part 2

It looks like this as one

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.