HTTP module giving BundleValidationError when using Map fields and Multipart/form-data

Hi

I’m trying to use the HTTP module to send information using Multipart/form-data structure, as that is the format the receiving system is expecting. Everything works well when I fill the information in the fields provided by HTTP module. However, because the amount of information in my actual process varies, I need to use the Map -option to dynamically create the information. When using this alternative, the module gives the following error:

BundleValidationError
Validation failed for 1 parameter(s).
Array of objects expected in parameter ‘formDataFields’.

In the attached picture I have sent the same information without using the Map -option and with using the Map -option. The data is copy pasted from the Input bundles of the successful run into the unsuccessful run with Map -option. I simply can’t understand why the validation fails with Map-option, when the same data is accepted without it.


Hello @PetriV ,

Change Body type from Multipart/form-data to Raw and then select content type JSON

Hi! Thanks for the suggestion! But the system we are sending the data expects to receive it in Multipart/form-data format.

Welcome to the Make community!

You are trying to use JSON (string type) in a field that requires a “Mapping” of a Make array (array-type), because you’ve turned on the Map toggle on this field.

To map a Make array, you first need to use the Parse JSON module, or I think it’s already parsed by the HTTP module, so you should just open up the variables panel and select the formDataFields variable.

Hope this helps! Let me know if there are any further questions or issues.

@samliew

P.S.: Investing some effort into the Make Academy will save you lots of time and frustration using Make.