#AppsScript
Cómo sincronizar Google Sheets con n8n sin releer todo

Aprendé a sincronizar Google Sheets con n8n con un diseño push-sync que evita releer toda la hoja. Descubrí cómo implementarlo en tu flujo ahora.

#n8n #googlesheets #appsscript #automatización #webhooks
Cómo sincronizar Google Sheets con n8n sin releer todo
Push-sync: la hoja empuja los cambios, n8n guarda una proyección y un reconcile nocturno corrige lo que se pierde. Sin releer 50.000 filas en cada corrida.
donweb.news
October 22, 2026 at 5:57 AM
Google Apps Script now supports data regions. You can finally specify the geographic location for script execution and storage to help with your compliance requirements.

#GoogleWorkspace #AppsScript
Data regions for Google Apps Script now generally available
Take control of your Apps Script data residency. New Google Workspace updates now allow for geographic control of script execution and storage.
cloud-captains.com
September 18, 2026 at 3:20 PM
Google Apps Script gotcha: .atHour(9) is not 9:00. It fires somewhere in the 9-10 window, and it drifts day to day.

ScriptApp.newTrigger("daily").timeBased().atHour(9).everyDays(1).create();

So never derive "yesterday" from when the trigger ran. Filter on the timestamp in the row.

#AppsScript
September 10, 2026 at 11:19 AM
Ask: next week's meetings in a sheet, every Sunday.

Google Apps Script, weekly trigger:
const ev = CalendarApp.getEvents(mon, sun);
if (!ev.length) return;
sh.getRange(2,1,ev.length,2).setValues(ev.map(e=>[e.getStartTime(),e.getTitle()]));

A quiet week is 0 rows, and setValues throws. #AppsScript
September 9, 2026 at 11:22 AM
Google Apps Script gotcha: two form submits in the same second both read getLastRow() = 40, both write row 41, one silently overwrites the other.

sheet.appendRow(row) is atomic — the one write that cannot lose that race.

If you must setValues(), take a LockService lock first. #AppsScript
September 7, 2026 at 11:18 AM
結局、プログラミングなど勉強したこともなく1行もコードが書けずセキュリティ関係についても分からん人間がバイブコーディングで業務自動化ツールを作るとなると、AppsScriptみたいな箱庭の中にそれなりにツールが揃っている環境が手軽で良いのか。それだと本命の業務の自動化が図れないのだが。
May 21, 2026 at 12:54 AM
Geminiくんを使ったバイブコーディング、AppsScript用にJavaScriptを書かせると比較的面倒が無くスムーズに行くことが判明。まあそりゃそうなんだが。
May 20, 2026 at 11:41 PM
Sympathies. Yesterday I spent a while trying to write an AppsScript to run some operations only to throw it in the bin and do it with vlookups and nested IF statements instead.

Ugly but ultimately ran quicker.
January 21, 2025 at 11:31 AM
AppsScriptがわからん過ぎて頭痛え
何故壊れたんや…
私も調べながら何となくの流れしかわからんのに…(´;ω;`)
しゃーない
顧客管理のシステムだしどうにかするしかない

…ご褒美は後日届く洋服達とグッズかな
久々に散財したもんな自分の中で
来月賞与あるし、2万くらい使ったって罰当たらんやろ。笑
November 29, 2024 at 4:31 AM
Teaching ChatGPT some SQL and Apps Script, but at the same time, learning a lot myself.
Doing dynamic table selection based on table availability and date. Both Apps Script and pure SQL.
#AppsScript #BigQuery #ChatGPT
November 24, 2024 at 10:16 PM
公式情報を垂れ流す部分を真っ先に移植してるんだけどたぶんそろそろ終わる
終わったら……github で history 管理されて TypeScript で書かれた AppsScript が……稼働する……!
なんて平和な世界🕊️
AppsScript GUI なんてXXXXXXまえ!🤬🤬🤬自主規制
December 4, 2024 at 11:30 AM
Done this for a DIY AppsScript program. Needed a google form to feed results to a sheet and then into a calendar. Just kept pasting the code and errors in. Works great but code is filthy.
March 17, 2025 at 9:21 PM
Google Apps Script gotcha: simple onEdit(e) triggers run with NO auth — call GmailApp or UrlFetchApp inside one and it dies silently. No error, no log.

Need an edit-trigger that sends mail or hits an API? Make it an INSTALLABLE onEdit (Triggers → Add) — same function, full scopes. #AppsScript
July 23, 2026 at 11:24 AM
The chore: every invoice PDF in a Gmail label, saved to Drive by hand.

Google Apps Script, once:
GmailApp.search("label:invoices filename:pdf newer_than:7d")
.flatMap(t=>t.getMessages())
.forEach(m=>m.getAttachments()
.forEach(a=>folder.createFile(a)));

Trigger it, done. #AppsScript
July 21, 2026 at 1:16 PM
"Highlight every row where the amount is over 1000."

const sh = SpreadsheetApp.getActive().getActiveSheet();
sh.getDataRange().getValues().forEach((r, i) => {
if (r[2] > 1000) sh.getRange(i+1, 1, 1, r.length).setBackground("#fde68a");
});

One pass, every matching row flagged. #AppsScript
July 18, 2026 at 6:16 PM
Renaming a Drive folder full of files to a consistent scheme, one by one, eats a morning.

const files = DriveApp.getFolderById(ID).getFiles();
while (files.hasNext()) {
const f = files.next();
f.setName(f.getName().replace(/ /g, "_"));
}

Whole folder normalized in one run. #AppsScript
July 17, 2026 at 11:15 AM
getLastRow() counts a cell holding "" as content. setValue("") to clear a row leaves it in the count — your loop grinds through empty rows and your append lands in the wrong place.

clearContent() actually removes it. Or filter blanks from getValues() before trusting the length.

#AppsScript
July 15, 2026 at 4:38 PM
The Friday ritual: open the sheet, File > Download > PDF, email it to the team. A time-driven trigger (Fri 5pm) does all three — fetch the sheet's PDF-export blob, MailApp.sendEmail with it attached. You stop being the cron job. #AppsScript
July 12, 2026 at 11:30 AM
'move a row to an Archive tab when its Status cell becomes Done' →

onEdit(e): if the edited cell is the Status column and e.value == 'Done', appendRow() it to Archive, then deleteRow() from the source.

~8 lines. Pinning down the spec sentence was harder than the code. #AppsScript #GoogleSheets
July 11, 2026 at 11:30 AM
Apps Script gotcha: getValues() gives a 0-indexed array, but getRange() is 1-indexed. So data row i writes back to getRange(i + 2, col) — +1 for 1-indexing, +1 more if row 1 is a header. That off-by-one is why "my script edits the wrong row." #AppsScript
July 10, 2026 at 11:30 AM
"Archive every Gmail thread older than a year, keep anything starred."

function archiveOld() {
GmailApp.search("older_than:1y -is:starred")
.forEach(t => t.moveToArchive());
}

One sentence in, four lines out. Put it on a daily trigger and the inbox count stops climbing. #AppsScript #Gmail
July 8, 2026 at 11:30 AM
Apps Script gotcha: appendRow() in a loop makes one Sheets API call per row — 500 rows = 500 round-trips and a timeout. Build a 2D array in memory, then one setValues() over the whole range. Same result, ~100x faster. The round-trip is the cost, not the row count. #AppsScript
July 7, 2026 at 8:03 PM
A Sheets custom function stuck on an old value isn't a bug: Apps Script caches custom-function results by their arguments and only re-runs when an input cell changes. Feed it a cell that updates as a throwaway argument to force the recalc. #AppsScript #GoogleSheets
July 3, 2026 at 1:23 PM
Apps Script gotcha: Session.getActiveUser().getEmail() returns '' when the runner isn't in your Workspace domain (consumer Gmail, shared script) — your audit log looks empty for no reason. For the script owner's address, use getEffectiveUser(). #AppsScript
July 1, 2026 at 1:23 PM