Showing results for 
Search instead for 
Did you mean: 
Not applicable

SharePoint List - New Item - Has attachments (field), Get Attachments (Action)

There are two bugs i am reporting

1) the 'Has attachments' field of the 'When a new item is created' variable is always false

2) the Get attachments action does not return the attachments when triggered initially. When i resubmit the flow later on it works as expected.

Here is my flow



It works fine for List items that DO NOT have attachements 


However, when a list item is created that does have attachments the Get Attachments action returns an empty array initially (upon resubmitting the flow a few minutes later the Get Attachments action does successfully return the attachments). 

here is my flow when triggered normally



Here is the same event being Resubmitted 



Community Support
Community Support

Re: SharePoint List - New Item - Has attachments (field), Get Attachments (Action)

Hi @Anonymous,


It seems that your images are not able to be checked on my side. According to your description, I made the following tests.


I created a simple flow using the trigger “When an item is created”, and use the action Compose to get the value for dynamic content Has attachments, adding the action Get attachments.



First, I added an item without attachment. The Compose returned false and Get attachments returned null.



For another test, I added an item with attachments. There was no need for me to resubmit the run, it ran successfully once it was triggered. Please check the following screenshot, the Compose returns true, and Get attachments returns value as expected.



Could you try again with it on your side? Please share your images again so that I can check it on my side.



Best regards,

Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Not applicable

Re: SharePoint List - New Item - Has attachments (field), Get Attachments (Action)

hi mabel mao,


thanks for your assistance.

i updated teh photos in my post. take a look.


I just tested my flow again to the same effect. glad it is working for someone though...



Advocate V
Advocate V

Re: SharePoint List - New Item - Has attachments (field), Get Attachments (Action)

Hi Mark,


I think I can offer some assistance with your issue. My tests with this trigger were fine until I started creating the list item with a 3MB image as my attachment. When in testing mode, the trigger began detecting "hasAttachments" as false, just as you are seeing. I don't expect your attachments are very large but it seems the upload time may be a factor.


With some considerations, a 'Do Until' may help you get around this.

Do While hasAttachments.PNG

Perhaps someone can chime in on whether the 'Delay' is necessary - I've only added it because in some brief research I have not yet located any mention of the minimum time interval for the 'Get item' action. The depicted configuration (Count: 6, Timeout PT1M) should give 1 minute for the attachment to appear before proceeding as though no attachment is present (6 counts of a 10 second delay and then a new 'Get item').


The big trade-off here is if there is no way to determine whether an attachment is expected for any newly created item then those items without attachments will always be delayed by the full minute. That's not ideal in a support ticket setting, so any distinguisher the creating system could provide would shorten the loop for those items. In my testing (on a fast network), an 8MB attachment was detected as present on the first run of 'Get item', so perhaps the Delay, Count and Timeout settings could be reduced to cut the time down.


Hope this helps!


Not applicable

Re: SharePoint List - New Item - Has attachments (field), Get Attachments (Action)for

thanks for your good workaround. I considered doing something like this but did not want to delay every run unless i really had to. and it looks like i am going to have to...

Advocate II
Advocate II

Re: SharePoint List - New Item - Has attachments (field), Get Attachments (Action)

Adding a delay seems the best approach for now, but if you are uploading multiple attachments you don't really know how long you have to wait. One possibility if you have control of the upload attachment application is to set a field on the list with "upload=complete", and then have a loop checking the item until, this field is set. 

Mikael Svenson
Microsoft MVP

Helpful resources

Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Users online (5,194)