https://github.com/jlumbroso/google-sheets-dump
🚀 Instantly sync Google Sheet data to CSV in your GitHub repo! Streamline data updates and supercharge your projects! 📈🔥
https://github.com/jlumbroso/google-sheets-dump
continuous-integration data-integration google-sheets template
Last synced: 5 days ago
JSON representation
🚀 Instantly sync Google Sheet data to CSV in your GitHub repo! Streamline data updates and supercharge your projects! 📈🔥
- Host: GitHub
- URL: https://github.com/jlumbroso/google-sheets-dump
- Owner: jlumbroso
- License: lgpl-2.1
- Created: 2023-08-29T03:49:24.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-08-29T04:40:13.000Z (almost 2 years ago)
- Last Synced: 2025-03-24T17:53:30.828Z (3 months ago)
- Topics: continuous-integration, data-integration, google-sheets, template
- Homepage:
- Size: 17.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 📊 Google Sheets to CSV GitHub Action Template
This repository provides a GitHub Actions template to automatically export data from a Google Sheet to a CSV file and commit the changes to your GitHub repository. This is especially useful for projects that rely on data from Google Sheets and want to keep their repository updated with the latest data.
## 🌟 Features:
* 📝 Automated export of Google Sheet data to CSV.
* 🚀 Commit and push changes to the repository.
* ⏰ Schedule regular data pulls using cron syntax.## 🚀 Getting Started:
### 1️⃣ Create Your Own Copy:
To use this template:
* Click on the `Use this template` button on the main page of this repository.
* Provide a name for your new repository and click `Create repository from template`.### 2️⃣ Configure Secrets:
In your newly created repository:
* Navigate to `Settings` ➡️ `Secrets`.
* Add the following secrets:
* `SHEET_ID`: The ID of your Google Sheet. (Hint: This can be found in the URL of your Google Sheet between `/spreadsheets/d/` and `/edit`).
* `SERVICE_ACCOUNT_JSON`: The content of the service account JSON key (🔐 make sure to wrap the entire JSON in single quotes).
* (Optional) `OUTPUT_FILENAME`: The desired name for the output CSV file. If not provided, the default will be `data.csv`.### 3️⃣ Set Up Regular Pulls:
To set up regular pulls of information from the Google Sheet:
* Visit [crontab.guru](https://crontab.guru/) to help you understand and generate the cron syntax for your desired schedule. 📅
* Edit the `.github/workflows/sheet_to_csv.yml` file in your repository.
* Under the `on` key, replace or add the `schedule` key with your desired cron schedule. For example, to run the action every day at 9 AM, you would add:
```yaml
schedule:
- cron: '0 9 * * *'
```## 📝 Final Notes:
Ensure that the Google Sheet is shared with the email address of the service account (found in the JSON key) to grant it access. 🔒
🎉 Enjoy automating your data workflow and keeping your repository up-to-date with the latest data from your Google Sheet!