Google Sheets (Apps step)

Updated Nov 23, 2026
DataMagik Automate

Google Sheets

Reads, appends and overwrites cell values in Google Sheets.

Use it to keep a shared Google Sheet in step with the plant: append a row for every shipment or scrap entry, read a planning sheet someone maintains by hand, or overwrite a status block each hour.

Beta. This step has not yet been checked against a live Google Sheets account, so treat its first runs as a test, and tell us if an operation does not answer as described.

Find it in the workflow editor's palette under Apps. See Apps steps for what every Apps step has in common.

Set it up

  1. In Google Cloud Console, choose or create a project, open APIs & Services › Library and enable the Google Sheets API.
  2. Open APIs & Services › OAuth consent screen and set it up; for a Google Workspace company choose Internal, so the sign-in does not expire. An External app left in Testing must list the signing-in account as a test user, and Google ends its sign-in after 7 days.
  3. Open APIs & Services › Credentials › Create credentials › OAuth client ID, choose Web application, and keep the client ID and client secret for the DataMagik credential.
  4. Add sheets.googleapis.com to Allowed Domains in the workflow's Script settings.

Credential: An OAuth 2.0 credential for your Google OAuth client, connected with the Google account whose spreadsheets the step reads and writes.

Signing in with OAuth 2.0

Grant typeSign in with the provider (authorization code). Save the credential, then click Connect on it.
Sign-in (authorization) URLhttps://accounts.google.com/o/oauth2/v2/auth
Token URLhttps://oauth2.googleapis.com/token
Scopehttps://www.googleapis.com/auth/spreadsheets

Register the Redirect URI the credential form shows in the provider's app settings.

Create the OAuth client in Google Cloud Console as type Web application, enable the Google Sheets API in the same project, and add the Redirect URI the DataMagik credential shows to the client's Authorized redirect URIs.

Hosts it calls: sheets.googleapis.com

Operations

OperationWhat it does
Values › GetReads the cells in a range.
Values › Append rowsAdds rows after the last row of the table in a range, leaving the rows above untouched.
Values › UpdateOverwrites the cells in a range, starting at its top-left cell.

Values › Get

Reads the cells in a range.

Calls GET /{spreadsheetId}/values/{range}.

FieldRequiredWhat to put
Spreadsheet IDYesThe long id in the sheet's address, between /d/ and /edit. For example 1AbCdEfGhIjKlMnOpQrStUvWxYz0123456789.
RangeYesThe cells, in A1 notation with the tab name first, such as Sheet1!A1:D; a tab name alone means the whole tab. For example Sheet1!A1:D.
Values asNoFormatted gives each cell as the sheet shows it ($1,200.00); Unformatted gives the underlying number (1200); Formulas gives a formula cell's formula instead of its result. One of: Formatted, as shown in the sheet, Unformatted (plain numbers), Formulas.

What comes out: One item for the whole range: {{ $json.range }} (the range Google read, such as Sheet1!A1:D20), {{ $json.majorDimension }} (ROWS) and {{ $json.values }}, a list of rows, each a list of cell values. Empty trailing rows and cells are left out, and values is missing when the range is empty.

Example: Read Planning!A2:C from the planners' sheet, Split Out on values, and look up each row's part number in Plex.

Values › Append rows

Adds rows after the last row of the table in a range, leaving the rows above untouched.

Calls POST /{spreadsheetId}/values/{range}:append.

FieldRequiredWhat to put
Spreadsheet IDYesThe long id in the sheet's address, between /d/ and /edit. For example 1AbCdEfGhIjKlMnOpQrStUvWxYz0123456789.
RangeYesThe cells, in A1 notation with the tab name first, such as Sheet1!A1:D; a tab name alone means the whole tab. For example Sheet1!A1:D.
Input asNoUser entered treats each value as if typed into the cell, so 12 becomes a number and =SUM(A:A) a formula; Raw stores it as it is. One of: User entered (numbers, dates and formulas are recognised), Raw (stored exactly as text).
ValuesYesA JSON list of rows, each row a list of cell values from left to right. For example [["{{ $json.part }}", "{{ $json.qty }}"]].

What comes out: One item: {{ $json.spreadsheetId }}, {{ $json.tableRange }} (the table Google appended to) and {{ $json.updates }}, with {{ $json.updates.updatedRange }} (where the new rows went), {{ $json.updates.updatedRows }} and {{ $json.updates.updatedCells }}.

Example: Append [["{{ $json.part }}", {{ $json.qty }}, "{{ $json.shipped_at }}"]] to Shipments!A:C for every shipment confirmed today.

Values › Update

Overwrites the cells in a range, starting at its top-left cell.

Calls PUT /{spreadsheetId}/values/{range}.

FieldRequiredWhat to put
Spreadsheet IDYesThe long id in the sheet's address, between /d/ and /edit. For example 1AbCdEfGhIjKlMnOpQrStUvWxYz0123456789.
RangeYesThe cells, in A1 notation with the tab name first, such as Sheet1!A1:D; a tab name alone means the whole tab. For example Sheet1!A1:D.
Input asNoUser entered treats each value as if typed into the cell, so 12 becomes a number and =SUM(A:A) a formula; Raw stores it as it is. One of: User entered (numbers, dates and formulas are recognised), Raw (stored exactly as text).
ValuesYesA JSON list of rows, each row a list of cell values from left to right. For example [["{{ $json.part }}", "{{ $json.qty }}"]].

What comes out: One item: {{ $json.spreadsheetId }}, {{ $json.updatedRange }}, {{ $json.updatedRows }}, {{ $json.updatedColumns }} and {{ $json.updatedCells }}. Cells in the range that the values do not reach are left as they were.

Example: Every hour, write [["{{ $json.line }}", "{{ $json.status }}", "{{ $json.checked_at }}"]] to Status!A2:C2 so the board shows the latest line status.

Example

A schedule runs every hour; a Plex Data Source lists the last hour's production, and Google Sheets › Append rows adds one row per part to the Output tab with the part number, quantity and time.

Tips

  • The spreadsheet ID is the long part of the sheet's address between /d/ and /edit: 1AbC…xyz in docs.google.com/spreadsheets/d/1AbC…xyz/edit.
  • Ranges are A1 notation with the tab name first: Output!A1:D, or just Output for the whole tab. Put a tab name with spaces in single quotes: 'Line 2'!A:C.
  • Values is a JSON list of rows, each row a list of cells: [["4471-A", 12], ["4471-B", 3]]. With User entered, text such as 12 or 2026-11-22 is turned into a number or date as if typed.
  • Get puts out the whole range as one item; add a Split Out step on values to get one item per row.
  • It changes the real sheet on test runs too, so point it at a copy while building.

Settings every Apps step has

  • More query parameters: any query parameter the fields do not offer, sent as is.
  • More body fields: a JSON object merged into the request body; nested objects merge, other values replace.
  • Most requests per second: spaces the calls out for rate limits. A "too many requests" (429) answer is retried after the wait the API asks for.
  • Most pages: for operations that follow pages, the most pages to fetch (10 unless you change it, up to 100). The run warns when it stops with more to get.
  • Fail on a non-2xx response: on by default. Turn it off to handle errors yourself.

Google Sheets's own API documentation: https://developers.google.com/sheets/api/reference/rest

Was this page helpful?