I am trying to use a custom APEX API call which will simultaneously upload the File to the salesforce Parent ID and also send the email to requestor.
When i use the same call using POSTMAN , it works fine . The file is rightly attached to the case , email is sent and the file is readable from email and Case .
But when i am performing the call from UiPath using HTTP Request . The is getting attached and the email is being sent . But the file is not readable/corrupt.
Below are the methods i tried to use to attach .
Convert to Byte stream , use Body attribute with body format as application/binary
There are many different variations of the call too many to list here and every time the file is not readable after it is attached to the case . So , just wanted to ask the community if they have faced this issue or have any possible solution . Let me know if any other methods i can try .
The HTTP Request activity in UiPath does not yet support binary attachments.
Alternative approach you can try-
One option is to use the Invoke Code activity, where custom VB.NET or C# code can be written to send the request. However, the preferred approach is to use Coded Workflows, which provide more flexibility and control over the request, including handling binary data. This can be achieved by leveraging .NET libraries like HttpClient to execute the request properly.
Meanwhile, the UiPath team is actively working on improving the HTTP Request activity to support this functionality in the future.
Indeed, but The HTTP Request activity in UiPath does not currently support binary attachments directly, even though the same call works in Postman. Converting the file to base64 is a valid approach, but it may not align with the API’s requirements for binary uploads.