API token storage
A setup function prompts once for a token, saves it in Script Properties, and nightly UrlFetchApp reads it without a visible cell on the sheet.
PropertiesService stores small key-value strings that persist between script runs. Use it for API tokens, last sync timestamps, feature flags, or webhook secrets instead of hiding values in cells. Script, user, and document property stores each serve different sharing and scope needs in a spreadsheet project.
Use PropertiesService when scripts need memory across runs: remember the last processed row ID, store a shared API key for triggers, or save per-user preferences in a multi-user tool.
Skip PropertiesService for large data tables or anything users should audit in the grid. Use a Settings tab or a database when values belong in the sheet or need bulk editing.
Call PropertiesService.getScriptProperties() for project-wide keys shared by all users and triggers.
Use getUserProperties() for per-user values when someone runs a custom menu tool.
Use getDocumentProperties() for values tied to this spreadsheet file only.
Set with setProperty('key', 'value') and read with getProperty('key').
Delete stale keys with deleteProperty when rotating tokens.
Never log secret values to Executions or a public Debug tab.
A setup function prompts once for a token, saves it in Script Properties, and nightly UrlFetchApp reads it without a visible cell on the sheet.
After each import, setProperty('lastRow', String(lastRow)) so the next trigger only processes new rows.
A sidebar saves the user's preferred status filter in User Properties and restores it on next open.
Build this without starting from a blank cell
Use a Better Sheets tool for PropertiesService, then watch a walkthrough when you want the full pattern.
Watch how PropertiesService works
Guides that explain PropertiesService in more depth.
Transferring Data Between Cells in Different Spreadsheets
Read post →Nothing is better than Google Sheets. You just need to learn more about the unlimited power of Google Sheets. Functions, Formulas, Apps Script and more.
Read post →4 Ways Google Sheets Can Help You Start Up Create a list Curate Links Track Something Write Code
Read post →The Script Editor is the Apps Script workspace inside your spreadsheet where you write JavaScript that talks to Sheets, Gmail, and other Google services. You open it from Extensions > Apps Script. Every function you save can be run manually, bound to a trigger, or linked from a custom menu.
Read guide →Triggers tell Apps Script when to run a function: on edit, on open, on a schedule, or when a form is submitted. Simple triggers use reserved names like onEdit. Installable triggers are created in the Apps Script Triggers page and can do more, including running as a specific user or on a timer.
Read guide →The Google Sheets API lets other programs read and update spreadsheets over HTTP using JSON. It is how dashboards, backends, and mobile apps sync data without opening the Google Sheets UI. Apps Script inside a file is simpler for sheet owners; the API fits systems built in Python, Node, or other stacks.
Read guide →Automation means work happens without repeating the same clicks every day: imports update, emails send, rows move, and dashboards refresh. In Sheets, automation usually stacks built-in features, Apps Script, and sometimes the Sheets API or add-ons. Start with the lightest tool that still solves the job.
Read guide →Done reading about PropertiesService?
Membership unlocks 636+ tutorials, unlimited generators, and every template. Practical lessons. Zero fluff.
Need this once
Jump to a free tool or a single tutorial for this topic.
Learning Sheets for real
Unlock the full library, generators, and templates with membership.