Hello, I have the following automated process:
1. Invoices are being received by e-mail
2. Someone uploads the invoices to the proper location on Sharepoint
3. Data is extracted from invoices and put into an Excel file through the use of Power Automate (AI Builder and flow)
The flow's trigger is "When a file is created (properties only)". So, when an invoice is uploaded to Sharepoint, the flow starts running. My problem is that if another invoice is uploaded before the flow finishes running (for the previous uploaded invoice), there will be two identical entries in the Excel file. Basically it inserts the data only from one of the invoices twice. The same happens if multiple invoices (in bulk) are uploaded at the same time. Therefore, it seems that invoices can only be uploaded individually/separately and the person who uploads them must wait for the flow to finish running for each of them, in order for the data in the Excel file to be correctly entered.
The flow trigger's concurrency control is on and the degree of parallelism is set to 1. Do I need to add a condition in the trigger's settings? Or do something with the Split-On Tracking Id/Custom Tracking Id? Maybe add a column in Sharepoint where the invoices are uploaded, and create some kind of condition based on it?
The strange thing is that when I manually test the flow in edit mode and I upload an invoice, and then I upload another one right after, the data in the Excel file shows accurately (two separate rows with different data). Nothing changes for bulk uploads, though.
If save and exit the flow, and then upload two invoices one right after the other, I get the issue I stated.
If anyone has a solution to this situation, I'd be really grateful. I researched but couldn't find anything. If the only way to do it is by uploading one invoice at a time and waiting for the flow to run for each, then so be it. My concern however is that there will be cases where employees will try to upload invoices in bulk or one right after the other which will result in the inaccurate population of the Excel file.