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

Announcements

News and Announcements icon
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,999 Super User 2026 Season 1 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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 607

#2
Valantis Profile Picture

Valantis 340

#3
11manish Profile Picture

11manish 284

Last 30 days Overall leaderboard