cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MihirY
Level 8

Flow is triggering unevenly

I have flow which will send email to people on item submission through PowerApp form and also on item changed. I am having strange situation like below:

  1. I have submitted item without any attachments - flow is triggering once.
  2. I have submitted item with attachments in smaller size - flow is triggering once
  3. I have submitted item with attachments in larger size - flow is triggering twice

My assumption here was, to attach any attachments to list item, first PowerApp is creating item then documents are being attached. since two actions are happening on same item, flow is triggering twice, that too only for larger attachments.

 

But I am having Office 365 plan where flow should trigger for every 5minutes. But why it is triggering twice when item was submitted? Anyone having this issue?

 

 

11 REPLIES 11
SCTdan
Level 8

Re: Flow is triggering unevenly

Can you post screenshots of / copy&paste the trigger output from scenario 2  and 3?  

MihirY
Level 8

Re: Flow is triggering unevenly

Below is snapshot of when item submitted with larger attachments (more than 5MB) flow is triggering twice. 

image.png

SCTdan
Level 8

Re: Flow is triggering unevenly

Sorry, can you dig into each of those and expand the first trigger step, like this-

5jdLGnPBasically we just want to look and see what the differences are between small attachments vs large.  Do the large attachment runs show an individual file being passed in, or both?  

MihirY
Level 8

Re: Flow is triggering unevenly

Trigger: When an item created or modified.

This step is very big i cannot take screenshot of this step, because this list is having more than 30 columns. But interesting thing is there is a column with name "Has Attachments" in flow history which is having value as false in both the cases.

image.pngimage.png

SCTdan
Level 8

Re: Flow is triggering unevenly

I don't have an app to test with, but this may be a PowerApps thing.  I can't replicate it just adding two large attachments to a list item.  If it were just triggering twice, you'd see them at the same time.  With a two-minute difference in your screenshot, the only way to explain that is time to upload (shouldn't take nearly that long unless your internet upload speed is slow, but who knows).

When creating a new list item direct from sharepoint, you can't actually save it until all selected attachments are uploaded.  PowerApps may just behave differently here.  

 

Sorry I can't be of more help, hopefully someone else has the answer for you.

Might be worth posting this to the PowerApps forum as well if you don't get a satisfactory answer here.

Community Support Team
Community Support Team

Re: Flow is triggering unevenly

Hi @MihirY,

 

I have tested on my side and find the same issue, it not caused by PowerApps or MS Flow, this is the mechanism SharePoint USES when an attachment uploaded to an item is too large.

If the attachment too large, the other field will be created first and the attachment will upload in the back.

So the reason that Flow will be triggered twice cause the item created first, then it be modified.

Annotation 2019-09-12 175253.png

You can check the return created and modified time field of the Flow.

Also, you can check the version history of SharePoint item:

Annotation 2019-09-12 175140.png

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

MihirY
Level 8

Re: Flow is triggering unevenly

Yes I have verified with version history also. But it is not acceptable by clients. 

Community Support Team
Community Support Team

Re: Flow is triggering unevenly

Hi @MihirY,

 

If so, maybe you could create trigger When an item is created to prevent Flow be big attachment triggered twice.

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

MihirY
Level 8

Re: Flow is triggering unevenly

How to do that?

Community Support Team
Community Support Team

Re: Flow is triggering unevenly

Hi @MihirY,

 

There is a trigger named When an item is created in the SharePoint connector, it's only be triggered when an item is created. But if you want the flow will be triggered when item modified, it can't do it.Annotation 2019-09-18 154610.png

I am not sure your scenario whether need the Flow will be triggered when item modified, if no need, this method above is the best way. If you need, you could refer to the following method:

1. Open setting of the trigger When an item is created to set the trigger condition.

2. Input the following expression, the expression is to prevent the Flow would be triggered if the item created without attachment. then the Flow will be triggered when the attachment upload completed. If in the future, you want to modify the item, it will be triggered.

@not(equals(triggerBody()?['Created'],triggerBody()?['Modified']))

Annotation 2019-09-18 163541.png

 

Annotation 2019-09-18 163608.png

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

MihirY
Level 8

Re: Flow is triggering unevenly

@v-litu-msft  Thanks for the solution, but unfortunately we alredy had everything what you have explained. The flow is very big. And we need to trigger that when item created or modified. It is keep on triggering for second time when large attachments are there. 

Helpful resources

Announcements
firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (5,446)