web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Get Attachments - ID i...
Power Automate
Suggested Answer

Get Attachments - ID is not a integer

(0) ShareShare
ReportReport
Posted on by
I have a flow that goes from Get items, uses the ID to then Get attachments and from that response, use the File ID (body/Id) to delete the attachement. However I get this error and belive the Get Attachements is returning the wrong thing in Id.
 
Get items returns correctly and I can use the ID to then Get Attachements.
 
The Attachement ID though is something like:  "Id": "%252fLists%252bMonthly%2bReports%252fAttachments%252f6%252fcompany-service-monthly-snapshot.pdf"
 
I then use that ID in Delete Attachment and get this error:

OpenApiOperationParameterTypeConversionFailed. The 'inputs.parameters' of workflow operation 'Delete_attachment' of type 'OpenApiConnection' is not valid. Error details: Input parameter 'itemId' is required to be of type 'Integer/int64'. The runtime value '"%252fLists%252bMonthly%2bReports%252fAttachments%252f6%252fcompany-service-monthly-snapshot.pdf"' to be converted doesn't have the expected format 'Integer/int64'.
 
Output from Get Attachements:
 
 
    "body": [
        {
            "Id": "%252fLists%252bMonthly%2bPriority%2bReports%252fAttachments%252f6%252fcompany-service-monthly-snapshot.pdf",
            "AbsoluteUri": "https://<comnpany>.sharepoint.com/sites/S/Lists/Monthly Priority Reports/Attachments/6/company-service-monthly-snapshot.pdf",
            "DisplayName": "company-service-monthly-snapshot.pdf",
            "@odata.type": "#Microsoft.Azure.Connectors.SharePoint.SPListItemAttachment"
        },
        {
 
 
 
 
 
Should the Get Attachements be returning a integer on the body/Id for each attachement? Anyone else seen this issue? Any workarounds or have I totally got the wrong Id!
 
This is the same result if the attachment is added to the list via sharepoint or via power automate.
Categories:
I have the same question (0)
  • LP-03110533-0 Profile Picture
    2 on at
    Hi,

    Try to store the get items ID on a variable and use latter on attachment. It worked here

  • Suggested answer
    Ellis Karim Profile Picture
    11,691 Super User 2025 Season 2 on at
    Please check the following in your flow:
     
     
     
     



     
     

    See: â€‹â€‹â€‹â€‹â€‹â€‹â€‹Item() and Items(Apply to each) Functions Explained with Examples – Ellis Karim's Blog


    Ellis
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard