Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
User232431
Helper III
Helper III

Execute external python script in power bi

Hi , I have python script that has stored in local disk and now i want to execute this script in powerbi desktop

File path : "C/Users/DataUpload.py

 

is there any way to run above script using powerbi Button/ any other way?

 

Thanks.

 

4 REPLIES 4
rohit1991
Super User
Super User

Hi @User232431 

 

Power BI doesn’t support running local Python scripts directly with a button. But since your script is just sending an email, you can use the Power Automate visual instead.

 

Set up a flow in Power Automate that calls your SendGrid logic (via HTTP or Azure Function), then trigger that flow using a button in Power BI.


Did it work? ✔ Give a Kudo • Mark as Solution – help others too!
lbendlin
Super User
Super User

what is the result of the script? How are you planning to use that result in Power BI?

Script - Which uses SendGrid package to send mails , can this be happen with powerbi Button?Thanks

Use the Power Automate visual as @rohit1991 suggested.

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.