Automation Action – Create JSON | ThinkAutomation

Automation Action: Create JSON

Create a Json Document and assign it to a variable.

Create Json text and assign variables to each Json element. The resulting Json text can be assigned to a variable for use on subsequent actions.

You first need to enter or paste valid Json text in the Enter Or Paste Json Here To Parse entry. You need to obtain the Json schema that you want to update and copy/paste into this entry. Then click the Parse > button.

The Json will be parsed and all elements will be listed in a tree structure.

Select each line in the tree in turn. The Selected XPath, Element and Type will be shown as you select each entry.

In the Set To Value entry enter or specify the data that you want to be assigned to the selected entry. Fields/Variables can be specified here. Then click the Update button. The updated Json will be shown in the Preview Result view. Repeat for each element that you want to update.

In the Assign Json To list select the variable you want to resulting Json assigned to. If the Compact option is enabled then the Json will be returned in compact format, otherwise it will be formatted and indented.

When the message is processed each element in the Json will be assigned the value you specify and the resulting Json assigned to the specified variable.

This Json can then be used on other actions by referencing this variable.

You can also use the Update Json and Set Variable actions to manually create Json. The Set variable text can contain %variable% replacements. When ThinkAutomation replaces values during Automation execution it checks if the value is being replaced inside Json – and if so the replaced value will be Json ‘escaped’. See: Json Notes.
This is one action from over 180 actions included with ThinkAutomation. The ThinkAutomation business process automation (BPA) solution is designed to automate on-premises and cloud-based business processes that are triggered from incoming messages. Automate messages received by email, database updates, webhooks, web forms, web chat, SMS messages, Twitter, Teams messages, documents, local files and other messages sources. Create any number of workflow automations using the drag-and-drop low-code designer. Simple fixed pricing, with unlimited message processing reduces overall costs compared to hosted automation solutions.

You can also extend ThinkAutomation by creating your own custom automation actions using the built-in designer and C#/VB.net code editor.

Download Free 30 Day Trial

Back To Automation Actions List

ThinkAutomation Home