Google Sheets onEdit function not triggering with automated Zapier updates

I’m working with a Google Sheets document that gets new rows added through Zapier automation. I want to automatically populate a specific column whenever these new entries are created.

When I manually add rows or modify existing data, my script works perfectly fine. But when Zapier automatically inserts new rows, the trigger doesn’t activate at all.

Has anyone encountered this issue before? What would be the best approach to fix this?

Here’s the code I’m currently using:

function onEdit(event) {
    var currentRow = event.range.getRow();
    SpreadsheetApp.getActiveSheet()
        .getRange(currentRow, 8).setValue('Updated_Value');
}

I’m wondering if there’s something about how Zapier interacts with Google Sheets that prevents the onEdit trigger from firing properly.

You’re facing a common limitation with Google Sheets’ triggers. The onEdit function specifically responds to manual edits, meaning it won’t activate for changes made via external integrations like Zapier. I experienced a similar challenge when automating my data inputs. A more reliable solution involves using a time-driven trigger to check for new entries at regular intervals. This way, you can monitor and process newly added rows regardless of how they are inputted. While it isn’t instantaneous, it ensures your sheet remains updated.

The onEdit trigger only fires when you manually edit cells in Google Sheets - it won’t catch API changes. Since Zapier uses the Sheets API, your onEdit function never runs for those automated entries. I encountered this same issue last year with automated form data. Instead, consider using an onChange trigger, which captures structural changes like new rows added via an API. To set it up, go to the script editor, hit the trigger button, and create a new trigger that executes your function on “On change” events. Alternatively, you could make Zapier call a custom Google Apps Script function directly through a webhook, which provides greater control.

yeah, this is a known zapier issue. the onEdit trigger doesn’t work with api calls unfortunately. i switched to formulas instead of scripts - used ARRAYFORMULA with IF statements to auto-populate the column based on other cell values. way simpler than dealing with triggers and works instantly when zapier adds new rows.