cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Dan_176
Frequent Visitor

Add new row in Excel from Google Sheets when doesn't exist already

I'm trying to achieve something like this, sorry I'm still a newbie here...

1) My Google Sheet stores responses from a form.
2) Every hour my flow "gets rows" from that Google Sheet
3) Then, I list rows present in an Excel table, and add rows for each cell etc.

The problem is, I don't know how to filter rows from Google Sheets before they are copied into Excel.
I only want to copy new rows that do not exist in the Excel file already.

I'm trying to use the filter function, something like: If "email" or "ID" in Google sheets is equal to email/ID in Excel, then skip it. If not equal, then add new row in Excel.
But I always end up with all rows being copied multiple times. into the excel table.
Any suggestions?

step1.jpgstep2.jpg

2 REPLIES 2
v-LilyW-msft
Community Support
Community Support

Hi @Dan_176 

I set up a flow, you can refer to below screenshots to see if it helps.

vLilyWmsft_12-1647308651962.png

vLilyWmsft_13-1647308701666.png

vLilyWmsft_6-1647307682662.png

This is my test Google sheet

vLilyWmsft_7-1647307805713.png

This is my excel:

vLilyWmsft_8-1647307824611.png

After flow runs, the new row will be added to excel like below:

vLilyWmsft_11-1647308146701.png

Hope the content above may help you.

Best Regards

If my reply helps, then please consider Accept it as the solution to help the other members find it more quickly.

Dan_176
Frequent Visitor

Thanks for your response. I've been trying to test your solution, but I keep getting an error related to Google API, so I'm stuck at step 1.

The error reads like:

---

Flow save failed with code 'DynamicOperationRequestClientFailure' and message 'The dynamic operation request to API 'googlesheet' operation 'GetTable' failed with status code 'BadRequest'. This may indicate invalid input parameters. Error response: { "status": 400, "message": "Range (responses!P2:P) exceeds grid limits. Max rows: 16, max columns: 15\r\nclientRequestId: xxxxxx", "error": { "message": "Range (responses!P2:P) exceeds grid limits. Max rows: 16, max columns: 15" }, "source": "googledrive-we.azconn-we-01.p.azurewebsites.net" }'.

---

I thought the original file could be too large, so I've reduced it to 10 rows, 10 columns, still same error. So, though I'm pretty sure your solution works, there's no way I can test on my account

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (1,816)