Export Excel to CSV on schedule with Python

Recipe ToolsMarketingDocument/FileSales EnablementDeveloper Tool

What it does

Every 5 minutes, this automation downloads an Excel file from Google Drive and converts it to CSV format using Python code. The converted file is stored in file storage and each step is logged to the job report.

Who it's for

Data and analytics teams who need to convert Excel files to CSV automatically without manual work.

How teams use this

Convert files on a daily schedule

Change the clock trigger to run once per day instead of every 5 minutes so Excel files are converted during off-peak hours. The rest of the flow stays the same.

Add filtering for specific file names

Include a condition after the download step to check the file name and only convert files that match a pattern. This prevents unnecessary conversions of unrelated files.

Notify a team when conversion completes

Add a Slack step after the CSV is stored to send a message to a channel confirming the file is ready. Teams stay informed without checking file storage manually.

Archive converted files to cloud storage

Add a step to move the CSV file to a cloud storage bucket after it is saved in file storage. This creates a backup and keeps files organized in one central location.

How it works

  1. Run every 5 minutes. This automation starts on a 5-minute schedule so files are converted regularly throughout the day.
  2. Download the Excel file. Fetch the file contents from Google Drive so the Python code can read and transform the data.
  3. Convert Excel to CSV with Python. Run Python code that reads the Excel file and outputs it in CSV format for storage and analysis.
  4. Store the CSV file in file storage. Append the converted CSV to file storage so the data is saved and ready for downstream processes.
  5. Log the conversion result. Write a message to the job report documenting that the file was downloaded, converted, and stored.