HTTP POST Request of multipart/form-data in Workflow

Dear All,

Below is my script in workflow to perform http post request.

The above script is tested successfully in Postman.

But, I hit below error in Workflow:
Screenshot 2024-10-28 145114

Kindly assist.

Thanks and Regards,
Janice

Hello @CLTeh,

The reason why the below error occurs is because the FormData method is not available / undefined in neither JScript or Enhanced JScript.

[0002] W3603 : Error 0 on line, column 1: Microsoft JScript runtime error: 'FormData' is undefined
[0002] W3603 : Error running script.
[0002] Run Script: W1603 : Plugin failed - 14:51:00 (elapsed time: 00:00:00.005)

Please note that the below JavaScript code will also return an error as $ is also not available / undefined in neither JScript or Enhanced JScript.

$.ajax(settings).done(function (response) {
	console.log(response);
});