Disappearing Python in Code Node

Describe the problem/error/question

I have a production workflow that uses Python code in the Code Module.
In the recent update of n8n, looks like you updated the name to “Python” which deleted the piece of code that was living in that node. Now it simply errors and when selecting Python, the default example code is set.

Even cloning the last version (19 Jan), I can’t recover that piece of code.

This happens in 2 nodes in the same workflow(see images).

Is there any way to recover those 2 pieces of code? Maybe by downgrading the version?

Please share your workflow

Information on your n8n setup

  • core

    • n8nVersion: 2.4.6

    • platform: docker (cloud)

    • nodeJsVersion: 22.21.1

    • nodeEnv: production

    • database: sqlite

    • executionMode: regular

    • concurrency: 5

    • license: enterprise (sandbox)

Hey @Vicente_Moreno

So looking at your screenshots and the fact you’re on n8n 2.4.6, I think I know what’s going on here. That “The value ‘python’ is not supported” message is the key.

Your Python code probably didn’t actually disappear — it’s more likely still sitting in the database somewhere. What’s happening is that recent versions of n8n changed how the Code node works. The editor no longer recognizes the old language: "python" value that was stored in your workflow JSON. When the node can’t handle that language setting anymore, it basically gets stuck in a broken state, and the UI won’t show you the code even though it might still be there.

Here’s what I’d try:

  1. Export the workflow as JSON , but don’t open that broken node first. Just export it directly. Then open the JSON file in a text editor and look for your Python code in there.
  2. Check your database directly if you have access to it (should be SQLite). The workflow data might still have your code intact.
  3. Temporarily downgrade to an earlier version of n8n as a recovery step (not ideal, but sometimes works).

If none of that helps you recover it, you might need to reach out to n8n Support and see if they can assist. :confused:

Hope you can get your code back!

1 Like
2 Likes

Updated solution for Cloud users(like me):
Since downgrading the version is not possible, the support bot suggested:

You can try to recover your workflows by downloading your latest backup:

  1. Log in to your n8n Cloud dashboard.

  2. Navigate to the Admin Dashboard, then open the Manage section.

  3. Go to the Export tab and click ‘Download Workflows’ to retrieve your backup.

If your lost Python code is not recoverable via these backups and the upgrade resulted in data loss, please let us know so we can escalate your case to our support team for further assistance.

And it worked perfectly!

  • Navigate to a date before you updated the version.
  • Download all workflows
  • Select the json of the one you want to recover
  • Import in n8n as new flow. You can also drop it in your LLM of choice and extract from there but now n8n should be able to show the code even with the “python” issue.
1 Like

Cheers for the solution!