Solved

Help with Power Automate: Flow is exporting every inspection to a spreadsheet instead of newly conducted ones.

  • 19 February 2024
  • 4 replies
  • 116 views

Badge

I have set up a power automate flow exporting my inspection results into an excel spreadsheet using the Safety Culture guide (Power Automate: Export inspection data to Excel Online spreadsheets... (safetyculture.com).  However, the flow is exporting every single inspection ever undertaken on the template.  What I would like it to do is only upload the newly conducted inspections. Can anyone help?

icon

Best answer by lachlancast 27 February 2024, 03:45

View original

4 replies

Hi there, and thanks for the question! 

Are you seeing in-progress inspections flowing through, that you aren’t expecting to see? If so, you will probably want to have a look at the ‘completed’ filter set up as part of step 3 - if you set this to ‘true’, only completed inspections should flow though to your excel.

Badge

I have done this.  Only completed inspections are being placed on my spreadsheet.  But every single completed inspection ever undertaken is being uploaded every time the query uploads.  

 

Example.  I have a template with 15 inspections, and they have all been exported to this excel sheet.  I want every NEWLY completed inspection to be placed on that spreadsheet.  So, if I have a query that runs at the end of every day, and one inspection was taken that day, that one inspection is added to the list.  However, right now it is uploading the new inspection and the 15 other inspections every single time causing duplicate rows.

We’ve been through something similar - instead of only returning the changed (or new) inspections since the last run, it returns all inspections.

A couple of things to check would be the ‘modified after’ filter - you could setup Power Automate to get the last successful run time (i.e. the last time it updated the spreadsheet) and use that as the ‘modified after’ filter - that should only return the inspections added/updated since the last run

You could also do this in the ‘array’ filter step (but wouldn’t be as efficient!

Badge

That completely fixed my problem.  Thanks :)

Reply