How to build Post API body

“users”: [
“id”: “6876adad-890a-798df7sd97f9d7f9sf7”,
“site_id”: 1,
“memberships”: [
“account_id”: “7d979dsf-799sd-dhkhfdk87-sd7f97ds9f”,
“send_activation”: “true”

Here id and account_id I have to pass from Variable.

I am trying to build it but not getting how to make the final Payload
Post.xaml (9.1 KB)
Body1.json (269 Bytes)

Any expert, please?

Have a view on this video for more insights

Cheers @c3f1e68294fdcf4a1f0a817ca

This is for very basic and here passing hard coded value, I need dynamic

Any expert help please ?


To build the final payload using the provided JSON structure and dynamically passing the id and account_id from variables, you can use the “Assign” activity to create a JSON string. Here’s how you can do it

Assign payloadJson = “{”“users”“:[{”“id”“:”“” + yourIdVariable + “”“,”“site_id”“:1,”“memberships”“:[{”“account_id”“:”“” + yourAccountIdVariable + “”“,”“send_activation”“:”“true”“}]}]}”

This will create a JSON string that you can use as your payload in your API request or wherever it’s needed in your workflow.

Assign: Expression Activity type ‘VisualBasicValue`1’ requires compilation in order to run. Please ensure that the workflow has been compiled.
getting this error


It seems there is an issue with the double-quote escaping.
Please check once.

Main.xaml (5.7 KB)

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.