Apify Store
AS
Apify Store
/lukaskrivka/google-sheets

Google Sheets Import & Export

Import data from datasets or JSON files to Google Sheets. Programmatically process data in Sheets. Easier and faster than the official Google Sheets API and perfect for importing data from scraping.

liveasyncunknown~30s typical
automationintegrationsopen sourcegooglesheets
$0.0020
per result + $0.01 call
plus $0.001 platform fee per run
Free actor: you pay compute at $0.002 per result plus $0.01 per run
Bring your own Apify Store key: provider portion drops to $0.
$Set up https://cracked-ai-pearl.vercel.app/SKILL.md, then use Cracked to run apify /lukaskrivka/google-sheets for me.

Input

FieldTypeDescription
oAuthAccount.eFPUdxsL7X2cdSvE2stringGoogle Account Id
sheetId.eFPUdxsL7X2cdSvE2stringSpreadsheet from where the old data will be loaded
modestring (append | replace | modify | read | load backup)What should the actor do default "append"
datasetIdstringDataset ID where the new data will be loaded from
rawDataarrayRaw data JSON array. Can be array of arrays for direct row import or arrays of objects.
limitintegerNumber of items to take from the dataset. The default is 250000. default 250000
offsetintegerNumber of items to skip from the dataset. Default is 0. default 0
deduplicateByFieldstringItems will be deduplicated by a value of this field. Cannot be used together with 'Deduplicate by equality' or 'Transform function'.
deduplicateByEqualitybooleanItems will be deduplicated if they are the same. Cannot be used together with 'Deduplicate by field' or 'Transform function'.
transformFunctionstringCustom function that will take new items and old items arrays as parameters and produces final array that will be imported. Cannot be used together with 'Deduplicate by equality' or 'Deduplicate by field'
rangestringRange of the spreadsheet in A1 notation where the actor should operate. Default is the first sheet.
columnsOrderarrayArray of keys. First sorts the columns by provided keys. The rest is sorted alphabetically.
keepSheetColumnOrderbooleanIf true, keeps the order of columns as they are in the sheet. If there is no sheet data yet, this does nothing.
createBackupbooleanOld rows from your spreadsheet will be saved to the default key-value store before importing new rows.
backupStorestringId of the key-value store where the backup you want to load is located. Can only be used if mode is 'load-backup'
spreadsheetIdstringId of the spreadsheet from where the old data will be loaded
publicSpreadsheetbooleanIf checked, you don't need to authorize. You have to publish your spreadsheet and it works only in read mode default false
tokensStorestringKey-value store where your Google OAuth tokens will be stored so you don't have to authorize every time again. By default it is google-oauth-tokens default "google-oauth-tokens"
googleCredentialsobjectIf you want to use this actor locally or with your own version, you have to provide your own credentials. Check actor readme for more information.

Call it

curl
curl https://cracked-ai-pearl.vercel.app/v1/run \
  -H "Authorization: Bearer ck_live_..." -H "content-type: application/json" \
  -d '{"provider":"apify","endpoint":"/lukaskrivka/google-sheets","input":{"limit":3,"transformFunction":"// Uncomment this code only if you don't use \"Deduplicate by field\" or \"Deduplicate by equality\"\n// This code behaves as if there was no transform function\n/*({ spreadsheetData, datasetData }) => {\n    return spreadsheetData.concat(datasetData);\n}*/"},"wait":false}'
poll
curl "https://cracked-ai-pearl.vercel.app/v1/runs/<runId>?wait=30" -H "Authorization: Bearer ck_live_..."
cli
npx cracked-ai run -p apify -e /lukaskrivka/google-sheets -i '{"limit":3,"transformFunction":"// Uncomment this code only if you don't use \"Deduplicate by field\" or \"Deduplicate by equality\"\n// This code behaves as if there was no transform function\n/*({ spreadsheetData, datasetData }) => {\n    return spreadsheetData.concat(datasetData);\n}*/"}' -w 120
mcp
run_tool({ provider: "apify", endpoint: "/lukaskrivka/google-sheets", input: {"limit":3,"transformFunction":"// Uncomment this code only if you don't use \"Deduplicate by field\" or \"Deduplicate by equality\"\n// This code behaves as if there was no transform function\n/*({ spreadsheetData, datasetData }) => {\n    return spreadsheetData.concat(datasetData);\n}*/"}, wait: false })

Try it

Runs against your signed-in workspace balance. Sign in if you have not.