Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Using Connectors
Unanswered

Attachment corrupted when using Invoke HTTP action with ServiceNow REST api

(0) ShareShare
ReportReport
Posted on by 129

I am passing attachment information from PowerApp to Power Automate. In Power Automate I am calling Invoke HTTP action method to call ServiceNow REST api to add attachment. This method is attaching attachment but when i download from ServiceNow it is in corrupted mode. I tried same content bytes to create file in one drive and it worked perfectly. What could be the possible reason for document corruption. After investigation i found that, final document and original document sizes are different. If original document size is 200KB, final document size is coming as 300KB.

 

When I use HTTP action then it is working fine, but when I use Invoke HTTP request then not working as expected. See below screenshots for reference.

With Http triggerWith Http triggerWith Invoke an Http actionWith Invoke an Http action

  • bblake8480 Profile Picture
    642 Most Valuable Professional on at
    Re: Attachment corrupted when using Invoke HTTP action with ServiceNow REST api

    Off hand, and not being familiar with the ServiceNow REST API, the only thing I can think of is are you sure you are properly encoding the file when you are calling the HTTP rest API? Many APIs only support file attachments being encoded in a certain format (i.e. binary, base64, etc).

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1

Featured topics