Pipe any Apify dataset into Google Sheets (and read a sheet back as JSON)
说明与用途
在 Apify 与 Google 表格之间自动化数据传输:从公共表格读取、通过 Sheets API 写入,以及使用现成的 Apify 角色。
问题
Scraping jobs often need to output rows to a spreadsheet and sometimes read spreadsheet inputs back as JSON for further processing.
结果
The article demonstrates how to automate data transfer between Apify and Google Sheets, highlighting pitfalls such as header management, nested data flattening, deduplication, formula injection, and API limits, and offers a ready-made actor to handle these concerns.
工作流
- 1. Use CSV export URL for public sheets to read data without an API key.
- 2. Set up a Google Cloud project, enable Sheets API, create a service account, share the sheet with the account, and use spreadsheets.values.append or values.update to write data.
- 3. Deploy or use the hosted Apify actor "Google Sheets Import & Export" to handle headers, nested data, deduplication, and safe replace logic automatically.
证据
If a sheet is shared as "Anyone with the link can view", you don't need an API key to read it.
To write, you need the Google Sheets API. The usual setup for scripts and servers is a service account:
I packaged this as a hosted tool, Google Sheets Import & Export on Apify, with the source on GitHub.
- 记录日期: 2026-11-03T19:14:31.968Z