Export XLSX to CSV on schedule with Python

Recipe ToolsMarketingDocument/FileSales EnablementDeveloper Tool

What it does

When the clock triggers every 5 minutes, this automation downloads an Excel file from Google Drive. Python code converts it to CSV format, and the result uploads back to Google Drive so the team has fresh data.

Who it's for

Data and analytics teams who need to convert Excel files to CSV on a regular schedule without manual work.

How teams use this

Automate Excel to CSV exports

Convert Excel files to CSV every 5 minutes without opening Google Drive or running manual scripts. The team gets fresh CSV files ready for data pipelines and analysis tools.

Sync CSV data to a warehouse

Change the schedule to run hourly instead of every 5 minutes so the CSV uploads align with the warehouse ingestion window. Only the clock interval changes.

Filter rows before conversion

Add a Python condition to exclude rows that do not meet criteria, so only relevant data appears in the CSV. The Python code step now includes a filter check.

Convert multiple Excel files in batch

Set the Python code to loop through all Excel files in a Google Drive folder and convert each one to CSV. The automation now processes multiple files instead of a single file.

How it works

  1. Run every 5 minutes. This automation starts on a schedule, checking every 5 minutes to begin the file conversion process in Google Drive.
  2. Download the Excel file. Fetch the file contents from Google Drive so the Python code can read and transform the data into CSV format.
  3. Convert Excel to CSV. Run Python code to transform the Excel file into CSV format, preparing it for upload back to Google Drive.
  4. Upload the CSV file. Save the converted CSV file to Google Drive so the team can access the transformed data immediately.