Skip to content

Execute Python scripts #4680

Answered by OMEE-69
rprince764 asked this question in Q&A
Jun 18, 2025 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

How to Run Python Scripts in Flowise Workflow

Scenario:

I want to:

  1. Run a Python script

  2. Send the script output to an LLM

  3. Capture the LLM's output

  4. Display the result to the user


Solution Options

🔹 Option 1: Use Custom Function Node + External Python API

Recommended if you're hosting Python scripts or have a backend server.

Steps:

  1. Create an API using Flask or FastAPI to run your Python script and return the output.

  2. In Flowise, use the “API” node or “Custom Function” node to call this API.

  3. Send the API response to the LLM Node (OpenAI, Anthropic, etc.).

  4. Display the final response to the user using a UI node or Chat Interface.

Visual Flow:

[User Input]

[API Node] → cal…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@rprince764
Comment options

Answer selected by rprince764
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants