From python to interact with n8n docker

Hey community, I’m new for n8n and I have a question hope to find answer here. I pull the official docker image and run inside it successfully. Now I would like to run agent based python code to interact with it. Somehow it look likes I have local python code and I wish to invoke the service from n8n docker. Do we have any way to support this type of connection? Thanks in advance.

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Hi @TurboMa, how to interact with your Python code will depend on your exact requirements.

I assume by local python code you mean you have code living outside of n8n itself? If so, you could consider calling it through the Execute Command node in n8n which allows you to run any shell command. n8n will then receive the result from stdout (and stderr) once your command finishes.

Or are referring to a Python application permanently running alongside n8n? If so you would need to check which APIs exactly it supports. Ideally you’d have a REST API you could call through n8n’s HTTP Request node (and pretty much any other application) whenever needed.

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