HomeAutomationsAuto-number rows in Google Sheets
Trigger: Row addedAction: Generate ID (sequential)

Auto-number rows in Google Sheets

ROW()-based numbering breaks the moment someone sorts or deletes. Sheet Automation stamps each new row with a permanent sequential ID that never changes afterwards.

Installs in 30 seconds · No credit card · Works inside Google Sheets

★★★★★ 4.9/5 · 500+ reviews · 300,000+ installs

What it does

This automation watches for new rows and writes the next number in sequence into your ID column. Unlike formulas, the ID is a real value: sorting, filtering, and deleting other rows never renumbers it. Use it for order numbers, support tickets, invoices, and registrations — anything that needs a stable reference number.

How to set it up

  1. Install Sheet Automation from the Google Workspace Marketplace and open it from your sheet.
  2. Pick the “Auto-number new rows” template.
  3. Choose the column where the ID should be written.
  4. Save. Every new row gets the next number automatically.

The ready-made template

Auto-number new rows — Trigger: a new row is added → Action: write the next sequential number into column H. Edit it live below:

Loading preview…

How to use this template

The builder above is a live preview of this automation. To run it in your own spreadsheet:

  1. Click Add to Google Sheets to install Sheet Automation (free).
  2. Open it from your sheet: Extensions → Sheet Automation → Open.
  3. Open the Templates tab and choose “Auto-number new rows”.
  4. Adjust the fields to match your data, then click Save.
  5. Trigger it once to confirm the automation runs.

FAQ

Does the number change if I sort or delete rows?
No. The ID is written as a plain value, so it stays with its row forever.
Can I use random IDs or UUIDs instead?
Yes. The Generate ID action also offers random strings and UUIDs.
Does it work with form responses?
Yes. Switch the trigger to Form Response to number each submission as it arrives.

Related automations