How to pass body from config to Http Request Activity

image this is the json body which is fetch from config
how to pass this body in http request activity by using string.format method

String.Format(in_CreateUserJsonBody,In_Email.ToString,In_FirstName.ToString,In_LastName.ToString,DepartmentId.ToString,OfficeLocationId.ToString)
did like this but got error
image

Thanks in advance
P.Srujana

@srujana13a5,

It is because of the newline character in the input string from the config file. You can remove it and make it a single string in single line then try with that.

Hi!

You can’t pass the double quotation marks in double quotation marks…

you can pass like this ““email””

or else paste the string here

Regards,
NaNi

String.Format({“email”: “{0}”,“firstName”: “{1}”,“lastName”: “{2}”,“phone”: “{3}”,“userGroupId”: {4}, “officeLocationId”: {5}},“tommy@gmail.com”,“timmy”,“dummy”,"

below is the json body getting from config file
{
“email”: “{Email}”,
“firstName”: “{FirstName}”,
“lastName”: “{LastName}”,
“phone”: “”,
“userGroupId”: 93,
“officeLocationId”: {Jurisdiction}
}

Thanks in advance
P.Srujana

Hi!

Try this and let me know…

String.Format("{""email"": ""{0}"",""firstName"": ""{1}"",""lastName"": ""{2}"",""phone"": ""{3}"",""userGroupId"": {4}, ""officeLocationId"": {5}},""tommy@gmail.com"",""timmy"",""dummy"",""2434567762"",23,4")

Regards,
NaNi

getting same error Assign: Input string was not in a correct format

Hi!

Could you please show us the error?

i can’t see any error here?

Regards,
NaNi

Assign: Input string was not in a correct format

Hi!

Could you please take a snap of that error and paste it here?

Regards,
NaNi

image

Hi!

Could you please explain the process what you’re trying to achieve? will help you in that.

Regards,
NaNi