Forum Discussion
How to run a Python script on a SharePoint list in order to generate a PowerPoint file?
SharePoint, by itself, doesn't provide native support for executing Python scripts directly within its environment...so far I know.
To streamline the process of running a Python script that interacts with SharePoint data and generates a PowerPoint file, you'll need to leverage several tools and services within Microsoft 365 and SharePoint Online.
To implement the solution to run a Python script on a SharePoint list and generate a PowerPoint file, they could consider these steps:
Host the Python script on an external service such as Azure Functions or a web server.
Set up Power Automate to trigger the Python script when a user clicks a button in SharePoint.
Use SharePoint REST API or Microsoft Graph API in Python to get the CSV file directly from SharePoint.
Process the CSV data and generate the PowerPoint file using libraries such as Pandas and Python-PPTX.
Return the generated PowerPoint file to the user by either uploading it to SharePoint or sending a download link via Power Automate.
This approach provides users with a seamless experience without requiring them to manually download CSV files or run scripts locally.
My answers are voluntary and without guarantee!
Hope this will help you.