Skip to main content

I have a google sheet pulling from PostgreSQL, I have the Zap adding and updating rows, however, I need to remove rows that no longer exist in the database. I know I can’t fully delete a row but can I blank out rows that have been removed?

I’m stuck with PostgreSQL as the input but am not wed to Googlesheets so if this is possible with another output such as ZapTables or Excel I’m happy to do it that way.

Hi @PeterCaliach 

You’d likely need to try this type of logic…

Add a column to indicate a row was added/updated.

Then after processing the data from PostgreSQL, you can search for rows that don’t have a column value to indicate the row was added/updated.

Zap action: GSheets - Lookup Rows

The Looping Zap app can be used to iterate on the returned list of rows to then clear out.


@PeterCaliach 

Airtable or Zapier Tables would be another options vs GSheets/Excel.

May depend on the number of records/rows you are trying to process.

 


@PeterCaliach 

Another approach may be to simply clear the entire GSheet except for Row 1 with the column headers, then add all the new records as rows.

A GSheets API request can be used to clear a worksheet.

Help link for creating custom actions in Zapier for Zap apps with the help of AI: https://help.zapier.com/hc/en-us/articles/16277139110157-Create-a-custom-action


Hi @PeterCaliach,
 
We just wanted to see how everything is going with your Zap. Did Troy's recommendation get the job done? Feel free to reach out if you need further assistance with your Zap. We're glad to address any concerns and assist you.
 
We're looking forward to your response.


Reply