Hello,
I’m building a workflow (agent flow / Power Automate flow) in Microsoft Copilot Studio and I’m trying to understand what is the simplest and recommended way to execute a small piece of Python code as part of the workflow.
My use case :
- I want to call / execute a Python script in the middle of my workflow (and I want to send arguments / variables from my workflow variables to this script)
From what I have seen, Copilot Studio workflows does not seem to natively support running Python code, but I’m unsure what approach Microsoft currently recommends as the simplest option / as a workaround.
If there is official guidance or a recommended pattern for 2026 Copilot Studio workflows, I’d really appreciate clarification.
As said, I am currently in Copilot Studio Flow (copilotstudio.microsoft.com), not an agent, not Azure Logic App, not Power Automate.
Here is a screenshot to clarify. Is there a way / work around to have an "action" block that can natively execute Python code ? If not, what is the simplest way to acheive it ?
Thank you !

Report
All responses (
Answers (