πͺ Generate JSON
πͺ Generate JSON
The Generate JSON block allows you to convert simple data (text, numbers, lists, Booleans) into a structured JSON string, usable for API requests or webhooks.
This block is particularly useful for preparing standardized payloads before sending them to external services, ensuring interoperability with third-party systems.
π₯ Entries
- keys (List[Text]): List of variable names to include in the final JSON. Each element in this list dynamically generates a corresponding entry for the associated values.
- (Dynamic variables): Entries automatically generated for each specified key, accepting Text, Number, Boolean or List values.
π€ Outings
- out (Flow): Continuation of the execution flow after generating the JSON.
- json (Text): Formatted JSON string containing structured data, ready to be transmitted or stored.
π‘ Example of use
Scenario: Preparing an API request for a reservation system
- A user fills out a form with their name, age and the list of desired services.
- Data is stored in variables:
name(Text),age(Number),services(List[Text]). - The Generate JSON block is placed in the flow to structure this data.
- The
keysentry is populated with the list["name", "age", "services"]. - The variables
name,ageandservicesare connected to the generated dynamic inputs. - The resulting JSON is sent via a Webhook block to create a reservation in the external system.
βοΈ Technical Details
- Dynamic input generation: Inputs for values are created automatically based on the
keyslist, allowing flexible adaptation to the needs of the scenario. - Supported types: The block accepts Text, Number, Boolean and List types for dynamic values.
- Output format: The
jsonoutput is a valid string according to the JSON standard, compatible with most systems and programming languages.
Updated on: 04/03/2026
Thank you!
