cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
NoudFrints
Frequent Visitor

Use header names in triggermultipartbody() as indexing

Hey all,

I want to build a flow which is able to process and forward multipart HTTP requests.
I use multipart because one of the values in the HTTP request is a pdf file.

I know you can access the different fields by using indexing (e.g., triggerMultipartBody(0)).
However, if possible, I want to use the header values as index, to make the API processing more reliable and robust.
Is it possible to use the header keys to retrieve the corresponding body contents?
This way, if the API is called using a different order of keys, the processing is still done correctly.
I'm looking forward to your replies!

1 ACCEPTED SOLUTION

Accepted Solutions
NoudFrints
Frequent Visitor

After some more research in the documentation and playing around with it, I found a fix for my problem.

triggerFormDataValue('<key>') returns the value corresponding to the key 😄
The nice part of this is that it also returns the pdf file without having to decode it from base64 to string.

View solution in original post

1 REPLY 1
NoudFrints
Frequent Visitor

After some more research in the documentation and playing around with it, I found a fix for my problem.

triggerFormDataValue('<key>') returns the value corresponding to the key 😄
The nice part of this is that it also returns the pdf file without having to decode it from base64 to string.

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (5,084)