Pro feature
Google Sheets export
5-minute setup. Pluck POSTs rows to a Google Apps Script you deploy on your own account โ no OAuth, no Pluck-managed credentials.
1. Create a sheet
- Open sheets.new
- Row 1: column headers matching your Pluck job (e.g.
title,price)
2. Apps Script
In the sheet: Extensions โ Apps Script. Replace Code.gs with:
function doPost(e) {
var payload = JSON.parse(e.postData.contents);
var sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
var lastCol = sheet.getLastColumn();
var headers = lastCol > 0
? sheet.getRange(1, 1, 1, lastCol).getValues()[0]
: [];
if (headers.length === 0 && payload.columns && payload.columns.length > 0) {
sheet.getRange(1, 1, 1, payload.columns.length).setValues([payload.columns]);
headers = payload.columns;
}
var rowsToAppend = payload.rows.map(function (row) {
return headers.map(function (h) { return row[h] != null ? row[h] : ''; });
});
if (rowsToAppend.length > 0) {
sheet
.getRange(sheet.getLastRow() + 1, 1, rowsToAppend.length, headers.length)
.setValues(rowsToAppend);
}
return ContentService
.createTextOutput(JSON.stringify({ ok: true, appended: rowsToAppend.length }))
.setMimeType(ContentService.MimeType.JSON);
}3. Deploy as web app
- Deploy โ New deployment โ Web app
- Execute as: Me
- Who has access: Anyone (required for Pluck to POST)
- Copy the web app URL (ends in
/exec)
4. Paste into Pluck
Extension popup โ edit job โ enable Append rows to a Google Sheet โ paste the URL โ Save.
Security: the Apps Script URL is a shared secret โ anyone with it can append rows to your sheet. Don't share it publicly.
Stuck? Email ernest2011kostevich@gmail.com or see the FAQ.