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 trigger
With Invoke an Http action
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).
Michael E. Gernaey
497
Super User 2025 Season 1
David_MA
436
Super User 2025 Season 1
Riyaz_riz11
244
Super User 2025 Season 1