cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper V
Helper V

SharePoint get attachments not working?

Hello,

 

I'm trying to retrieve the links of the files attached on a SharePoint list; I have a previous flow that does it without any issue, but today when I try to instantiate this action I always have the error:

 

The expression "web/lists(guid'bb56258c-52da-493b-9d46-10df398c8325')/Items(Lists%2fCommessaNew%2f18_.000)/AttachmentFiles" is not valid

Do you know if it is a particular issue on this action today (or in SharePoint) that gives back this error?

 

--

Regards,

 

Marco

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: SharePoint get attachments not working?

Hi @mmangiante,

 

Could you please share a screenshot of your flow's configuration?

Do you use the "Send an HTTP request to SharePoint" action of SharePoint connector to achieve your needs?

 

The error message told that the Url that you provided is not valid. I think there is something wrong with the value that you provided within items(...) of the URL (web/lists(guid'bb56258c-52da-493b-9d46-10df398c8325')/Items(Lists%2fCommessaNew%2f18_.000)/AttachmentFiles).

 

Currently, I could not reproduce your issue on my side. I have made a test on my side and don't have the issue that you mentioned. My flow's configuration as below:16.JPG

 

17.JPG

The flow works successfully as below:18.JPG

 

In addition, you could also use the "Send an HTTP request to SharePoint" action to achieve your needs. I have made a test on my side and please take a try with the following workaround:19.JPG

Within Uri field of the "Send an HTTP request to SharePoint", type the following formula:

 

_api/web/lists(guid'df79a6e3-5929-4bcb-9a6b-a51bfc45ea7c')/items(@{triggerBody()?['ID']})/AttachmentFiles

On my side, the above formula would be converted as below when the flow works successfully:

 

 

_api/web/lists(guid'df79a6e3-5929-4bcb-9a6b-a51bfc45ea7c')/items(7)/AttachmentFiles

 

Please make sure that you have provided a proper Item ID within the items(...) of above formula.

 

Note: The Item ID is a Integer value rather than a String value. The standard format of above formula as below:

_api/web/lists(guid'list GUID')/items(Item ID​)/AttachmentFiles

 

The flow works successfully as below:20.JPG

 

Please take a try with above solution that I provided, then check if the issue is solved.

 

Best regards,

Kris

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

View solution in original post

3 REPLIES 3
Highlighted
Community Support
Community Support

Re: SharePoint get attachments not working?

Hi @mmangiante,

 

Could you please share a screenshot of your flow's configuration?

Do you use the "Send an HTTP request to SharePoint" action of SharePoint connector to achieve your needs?

 

The error message told that the Url that you provided is not valid. I think there is something wrong with the value that you provided within items(...) of the URL (web/lists(guid'bb56258c-52da-493b-9d46-10df398c8325')/Items(Lists%2fCommessaNew%2f18_.000)/AttachmentFiles).

 

Currently, I could not reproduce your issue on my side. I have made a test on my side and don't have the issue that you mentioned. My flow's configuration as below:16.JPG

 

17.JPG

The flow works successfully as below:18.JPG

 

In addition, you could also use the "Send an HTTP request to SharePoint" action to achieve your needs. I have made a test on my side and please take a try with the following workaround:19.JPG

Within Uri field of the "Send an HTTP request to SharePoint", type the following formula:

 

_api/web/lists(guid'df79a6e3-5929-4bcb-9a6b-a51bfc45ea7c')/items(@{triggerBody()?['ID']})/AttachmentFiles

On my side, the above formula would be converted as below when the flow works successfully:

 

 

_api/web/lists(guid'df79a6e3-5929-4bcb-9a6b-a51bfc45ea7c')/items(7)/AttachmentFiles

 

Please make sure that you have provided a proper Item ID within the items(...) of above formula.

 

Note: The Item ID is a Integer value rather than a String value. The standard format of above formula as below:

_api/web/lists(guid'list GUID')/items(Item ID​)/AttachmentFiles

 

The flow works successfully as below:20.JPG

 

Please take a try with above solution that I provided, then check if the issue is solved.

 

Best regards,

Kris

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

View solution in original post

Helper V
Helper V

Re: SharePoint get attachments not working?

Hello @v-xida-msft

 

I suppose I found where is the problem in my flow: in get attachments, in previous working flows, I have and "ID" property from the dynamic content, now there isn't an "ID" but "Identifier"; I supposed "Identifier" was a new name or placeholder for "ID" and used that an so the error; to make it works I write down the expression triggerBody()['ID'] and it works, but I don't know why I can't see "ID" from the dynamica content.

 

I have only a little problem: when I attach a file, if the file is a txt I see the link, but if the file is an Excel or Word file in get attachment I see no link, like the files are treated as spam.

 

Any idea?

 

Marco

Highlighted
Helper V
Helper V

Re: SharePoint get attachments not working?

Hello,

 

I suppose to have found the solution to the issue about the attachments disappeared in the link list; this is a great forum post that explain, in my opinion, the problem and a related solution:

 

https://powerusers.microsoft.com/t5/Using-Flows/Get-attachments-Multiple-list-item-attachments-only-...

 

Hope this can help other people with the same issue.

 

--

Regards

Helpful resources

Announcements
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

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!

Users online (8,180)