Automation Blog

How to Build a Looping Zap with Google Sheets and Webhooks

How to build a self-triggering Zapier loop that reads from a Google Sheet row by row — using a Webhooks Catch Hook as the trigger, processing one row per run, marking the row as done, and re-firing the Zap via a Webhooks POST action until all rows are processed.

ZapierGoogle SheetsWebhooksLooping

By Troy Tessalone · · 6 minutes

Automation Guide

A practical field guide from Automation Ace.

How to Build a Looping Zap with Google Sheets and Webhooks

Zapier's Google Sheets trigger processes one new row at a time as rows are added. But sometimes you need to process a batch — a sheet full of contacts to enrich, orders to fulfill, or records to migrate — all at once, working through each row sequentially. The solution is a self-triggering loop: a Zap that reads the first unprocessed row, does its work, marks the row as done, then fires itself again via a Webhooks POST to process the next row. It continues until no unprocessed rows remain.

Architecture: The Google Sheets Queue Pattern

The sheet acts as a queue. Each row is a work item. A Status column tracks state:

  • pending — not yet processed
  • processing — currently being worked on (prevents duplicate runs)
  • done — completed successfully
  • error — failed, needs review

The Zap reads one pending row, updates it to processing, does the work, updates it to done (or error), then fires itself again — unless no pending rows remain, in which case the loop stops.

Sheet Setup

Create a Google Sheet with these columns (adjust to your data):

  • Row ID or a unique identifier column
  • Your data columns (email, name, order ID, etc.)
  • Status — defaults to pending for new rows
  • Processed At — timestamp written when done
  • Notes — optional error or result message

Zap Structure

Trigger: Webhooks by Zapier → Catch Hook

The Zap is triggered by an incoming webhook — not by Google Sheets. This means it only runs when explicitly called, not on a polling schedule. Copy the Catch Hook URL; you'll use it in the final step.

Step 1: Find the Next Pending Row

Add a Google Sheets → Lookup Spreadsheet Row action. Configure it to find the first row where the Status column equals pending. If your sheet has a large number of rows, ensure you're looking up by the Status column with value pending and returning only the first match.

Step 2: Check If a Row Was Found (Filter)

Add a Filter by Zapier step: only continue if the Lookup step returned a row (i.e., the row ID field is not empty). If no pending row is found, the Zap stops here — the loop is done.

Step 3: Mark Row as Processing

Add a Google Sheets → Update Spreadsheet Row action. Set the row's Status to processing. This prevents another concurrent run from picking up the same row if the loop fires faster than expected.

Step 4: Do the Work

Add whatever actions process the row — create a CRM contact, send an email, call an API, enrich data, etc. Use the row fields mapped from the Lookup step.

Step 5: Mark Row as Done

Add another Google Sheets → Update Spreadsheet Row action. Set Status to done and write a timestamp to the Processed At column using Zap Meta's machine_now field — see Zap Meta timestamps.

Step 6: Re-trigger the Zap (Self-Loop)

Add a Webhooks by Zapier → POST action. Set the URL to this Zap's own Catch Hook URL (from the trigger step). Send a minimal payload — just enough to make each request unique:

// Send a timestamp to avoid deduplication
{
  "_ts": "{{current timestamp from Zap Meta machine_now}}"
}

This fires the Zap again, which picks up the next pending row. The loop continues until the Filter in Step 2 stops it.

Starting the Loop

The loop starts with an external trigger — send a manual POST to the Catch Hook URL to kick it off. Use a browser, curl, or another Zap:

curl -X POST https://hooks.zapier.com/hooks/catch/XXXXXX/YYYYYYY/ \
  -H "Content-Type: application/json" \
  -d '{"_ts": "start"}'

After the first kick, the loop self-sustains until all pending rows are processed.

Error Handling

If Step 4 (the work) fails, the row stays in processing state and the loop may stall. Add error handling with Zapier's Error Handler path:

  • In the error path, update the row Status to error and write the error message to the Notes column
  • After the error path, add another Webhooks POST to re-trigger the Zap so it continues to the next row (skipping the errored one)

Rate and Speed Considerations

Each iteration is a full Zap run. On lower-tier Zapier plans, Zaps are queued and may not run immediately back-to-back. The loop will still drain the sheet, but more slowly. For high-volume processing (thousands of rows), consider:

  • A higher Zapier plan with faster task execution
  • Running multiple parallel loops (kick off multiple Catch Hook requests simultaneously — each picks the next available pending row)
  • Using Zapier Tables instead of Google Sheets for better filtering — see sequential queue with Zapier Tables

Deduplication

Include a timestamp or random value in the self-trigger payload to prevent Zapier from deduplicating the repeated Catch Hook requests. See webhook trigger deduplication for the full pattern.

The Google Sheets + Webhooks loop pattern is a practical batch processor: load a sheet with work items, kick the loop once, and it drains the sheet row by row until nothing is left. The Status column acts as both a concurrency guard (processing prevents double-picks) and a progress log (done/error rows show what happened). The self-triggering POST at the end is the mechanism; the Filter after the lookup is the stop condition.

For the Zapier Tables version of this pattern (more robust filtering), see sequential queue with Webhooks and Zapier Tables. For Looping by Zapier as an alternative for line item arrays, see looping and aggregating line items in Zapier. For chaining multiple Zaps together via webhooks, see chaining Zaps with webhooks. For help building a batch processing workflow, talk to Automation Ace.

ZapierGoogle SheetsWebhooksLooping

Disclaimer: This article may include links to apps, products, or services. Some links may be affiliate links, which means Automation Ace may earn a commission at no extra cost to you.

Build Better Systems

Ready to automate with confidence?

Share your tools, process, and goals. Automation Ace can design the workflow, integration, AI assist, or code bridge that fits your business.

Start a Project