Wrong auto post message in Teams using power automate when 2 items are added at the same time

Copper Contributor

I have a power automate flow when an item is created in a sharepoint, it will post message in a Teams chat.

But the issue is when two items are created at the same time (or in a short space of time) in a sharepoint, the teams message are posting the wrong content. 

anyone can help to suggest solution for this issue? 

 

 

Power Automate Flow:

jchandra1_2-1661848087394.png

 

jchandra1_4-1661848119101.png

jchandra1_5-1661848129728.png

 

 

Sharepoint:

jchandra1_1-1661848049616.png

Power automate - Run Success

jchandra1_6-1661848157762.png

 

Power automate - Post message in Teams

jchandra1_7-1661848205094.png

 

 

4 Replies

@jchandra1 

 

It seems that it's because of Concurrency Control setting in your Power Automate. If this settings is enabled then only one instance will run for multiple items if those are added in same times. And that is the reason why you are seeing foreach loop automatically added by Power Automate when you use any field values from items because single instance will run for multiple changes.

 

You can disable it by following below steps

 

  • Go to settings of your first action which is for trigger

kalpeshvaghela_0-1661850878696.png

 

  • Disable Concurrency Control (Important: You may need to adjust your Power Automate once you do this change specially when you are using current item field values because now it will not return as collection and you don't need loop over there.

kalpeshvaghela_1-1661850916724.png

 

 


Hope it will helpful to you and if so then Please mark my response as Best Response & Like to help others in this community

@kalpeshvaghela@kalpeshvaghela 

I just check that I did not enable the concurrency control setting. 

jchandra1_0-1661853904572.png

 

@jchandra1 

 

Could you check same setting in Apply for each action as well?

Could you share little about your list structure and trigger of the flow? because from your screen shot I am seeing second action as Get Items so here are you querying to same list where Power Automate is triggered or you are querying to other list?

@kalpeshvaghela 

setting for apply to each : concurrency control is disabled 

jchandra1_0-1661916195495.png


this is the flow 

jchandra1_1-1661916463008.png

 

jchandra1_3-1661916725650.png

 

jchandra1_4-1661916754261.png