cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Add attachment to list item triggers flow again

I have a flow which runs on trigger "When an Item is created or modified".

 

I want to add an attachment to the same List item. (same list where item is created/modified).

 

I am using this "Add attachment" action for attaching the attachment.

 

My real problem is, when my flow runs it adds the attachment. and then the flow re-triggers! 

And it goes into infinite loop as same flow triggers when item is modified.

 

Overall structure of flow is like this :

Item is created/modified --> I get the attachment content --> I upload the attachment to the same list item

 

Any solution here?

 

I tried below things which did not work for me :

1. I can not use a dummy status column where I can set some status while creating the item as "Add attachment" does not allow me to modify any other column of the list.

2. I can not use Send HTTP request to sharepoint as this also allows me to only update attachment, not rest of the columns.

 

Any help is appreciated.

Capture.JPG

1 ACCEPTED SOLUTION

Accepted Solutions
efialttes
Community Champion
Community Champion

Hi!

THere are several aproaches to avoid infinite loops, this article includes links to the most common ones:

https://powernimbus.com/2019/06/microsoft-flow-avoiding-the-sharepoint-list-update-trigger-infinite-...

Hope this helps



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



View solution in original post

5 REPLIES 5
efialttes
Community Champion
Community Champion

Hi!

THere are several aproaches to avoid infinite loops, this article includes links to the most common ones:

https://powernimbus.com/2019/06/microsoft-flow-avoiding-the-sharepoint-list-update-trigger-infinite-...

Hope this helps



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



ScottShearer
Super User
Super User

@Anonymous 

Here is a link to a blog post that I wrote that demonstrates a way around the infinite loop without using and additional account/license.

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott
Anonymous
Not applicable

Thanks @efialttes 

 

This does work for me.

 

But, for that I will have to create a new account. 

Anonymous
Not applicable

Hi @ScottShearer ,

This will work in most of the cases. But it does not work for updating attachments.

 

Other than attachments column, this will work fine.

 

 

 

Hi again

Please note other than having a dedicate acount, there are two more approaches mentioned in the article:

"There are several ways to solve this: Melissa Hubbard found a way that implies using a new field for checking. Mikael Svenson uses another approach by dealing directly with the SharePoint API. "

 

Let's hope any of these additional two approaches help you to overcome your challange



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (3,728)