How to paas Multine Line text value through Flow Designer Rest API Actions in ServiceNow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2023 06:29 AM
Hi All,
Using Flow Designer Actions, I am making REST API call to send details using JSON format.
I have input type string variable in which I want to Requester For Details like Name, Location, Email and Manager.
In the script section of input variables, I have written below code.
And I am getting error like {"statusCode":400,"error":"Bad Request","message":"Invalid request payload JSON format"}.
I want to pass details like below.
RequetserFor:- ABC
Location:- XYZ
Email:-abc@gmail.com
var reqinfo = "Requested For: "+ fd_data.trigger.current.u_request_item.variables.requestbytmp2_name.getDisplayValue()+ "\n"+
"Email: "+ fd_data.trigger.current.u_request_item.variables.requestbytmp2_email+ "\n"+
"Location / Property: "+ fd_data.trigger.current.u_request_item.variables.requestbytmp2_location.getDisplayValue()+ "\n"+
"Preferred Phone Number: "+ fd_data.trigger.current.u_request_item.variables.requestbytmp2_extension+ "\n"+
"Manager: "+ fd_data.trigger.current.u_request_item.variables.requestfor_manager.getDisplayValue();
return reqinfo;
How to send multiline text using JSON format in Flow Designer ServiceNow.
Thanks in Advance,
Shantanu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2023 06:36 AM
Hi,
Please use JSON type of input variable
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2023 06:54 AM
Hi Shruti,
It is still not working using input variable type as JSON.
It is throwing same error {"statusCode":400,"error":"Bad Request","message":"Invalid request payload JSON format"}.