You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FlowSynx plugin to loads and parses local JSON files. Supports transformation, extraction, and mapping of hierarchical data structures in workflows.
1
+
# FlowSynx JSON Plugin
2
+
3
+
The **FlowSynx JSON Plugin** is a built-in, plug-and-play integration for the FlowSynx automation engine. It enables parsing, transforming, extracting, and mapping structured or semi-structured JSON data within workflows with no custom coding required.
4
+
5
+
This plugin is automatically installed by the FlowSynx engine when selected in the workflow builder. It is not intended for standalone developer usage outside the FlowSynx platform.
6
+
7
+
---
8
+
9
+
## Purpose
10
+
11
+
The JSON Plugin allows FlowSynx users to:
12
+
13
+
- Parse and inspect complex JSON structures.
14
+
- Extract values using JSONPath.
15
+
- Flatten nested objects.
16
+
- Map JSON data to specific output fields using flexible rules.
17
+
18
+
It integrates seamlessly into FlowSynx no-code/low-code workflows.
19
+
20
+
---
21
+
22
+
## Supported Operations
23
+
24
+
-**extract**: Extracts a specific value using a `jsonPath` expression.
25
+
-**transform**: Flattens a nested JSON structure into flat `key: value` pairs.
26
+
-**map**: Maps fields to new keys using a dictionary of JSONPath expressions.
27
+
28
+
---
29
+
30
+
## Input Parameters
31
+
32
+
Below are the parameters accepted by the plugin:
33
+
34
+
-`Operation` (string): Required. The type of operation to perform. Supported values are `extract`, `transform`, and `map`.
35
+
-`Json` (string): Required. The raw JSON string to process.
36
+
-`jsonPath` (string): Required for `extract` operation. A JSONPath expression to locate a specific value.
37
+
-`Mappings` (dictionary): Required for `map` operation. A dictionary where each key is an output field and each value is a JSONPath expression.
38
+
-`Flatten` (bool): Optional. Used with `transform` to specify whether to flatten nested objects (`true`) or not (`false`).
39
+
40
+
Example input:
41
+
```json
42
+
{
43
+
"Operation": "map",
44
+
"Json": "{...}",
45
+
"jsonPath": "$.some.path",
46
+
"Mappings": {
47
+
"Name": "$.person.name",
48
+
"Email": "$.person.contact.email"
49
+
},
50
+
"Flatten": true
51
+
}
52
+
```
53
+
54
+
---
55
+
56
+
## Operation Examples
57
+
58
+
### extract Operation
59
+
60
+
**Input JSON:**
61
+
```json
62
+
{
63
+
"meta": {
64
+
"version": "1.0.2",
65
+
"timestamp": "2024-12-01T10:00:00Z"
66
+
}
67
+
}
68
+
```
69
+
70
+
**Input Parameters:**
71
+
```json
72
+
{
73
+
"Operation": "extract",
74
+
"Json": "{...}",
75
+
"jsonPath": "$.meta.version"
76
+
}
77
+
```
78
+
79
+
**Output:**
80
+
```json
81
+
"1.0.2"
82
+
```
83
+
84
+
---
85
+
86
+
### transform Operation
87
+
88
+
**Input JSON:**
89
+
```json
90
+
{
91
+
"user": {
92
+
"profile": {
93
+
"name": "Bob",
94
+
"email": "bob@example.com"
95
+
}
96
+
}
97
+
}
98
+
```
99
+
100
+
**Input Parameters:**
101
+
```json
102
+
{
103
+
"Operation": "transform",
104
+
"Json": "{...}",
105
+
"Flatten": true
106
+
}
107
+
```
108
+
109
+
**Output:**
110
+
```json
111
+
{
112
+
"user.profile.name": "Bob",
113
+
"user.profile.email": "bob@example.com"
114
+
}
115
+
```
116
+
117
+
---
118
+
119
+
### map Operation
120
+
121
+
**Input JSON:**
122
+
```json
123
+
{
124
+
"person": {
125
+
"name": "Alice",
126
+
"contact": {
127
+
"email": "alice@example.com"
128
+
}
129
+
}
130
+
}
131
+
```
132
+
133
+
**Input Parameters:**
134
+
```json
135
+
{
136
+
"Operation": "map",
137
+
"Json": "{...}",
138
+
"Mappings": {
139
+
"Name": "$.person.name",
140
+
"Email": "$.person.contact.email"
141
+
}
142
+
}
143
+
```
144
+
145
+
**Output:**
146
+
```json
147
+
{
148
+
"Name": "Alice",
149
+
"Email": "alice@example.com"
150
+
}
151
+
```
152
+
153
+
---
154
+
155
+
## Example Use Case in FlowSynx
156
+
157
+
1. Add the JSON plugin to your FlowSynx workflow.
158
+
2. Set `Operation` to one of: `extract`, `transform`, or `map`.
159
+
3. Provide the JSON input string.
160
+
4. Configure `jsonPath`, `Mappings`, or `Flatten` depending on the operation.
161
+
5. Use the output downstream in your workflow.
162
+
163
+
---
164
+
165
+
## Debugging Tips
166
+
167
+
- If the result is null, ensure `jsonPath` is valid and points to an existing element.
168
+
- If nothing is mapped, check for typos in the JSONPath expressions inside `Mappings`.
169
+
- If the result isn't flattened, double-check that `Flatten` is set to `true`.
170
+
171
+
---
172
+
173
+
## Security Notes
174
+
175
+
- No data is persisted unless explicitly configured.
176
+
- All operations run in a secure sandbox within FlowSynx.
177
+
- Only authorized platform users can view or modify configurations.
0 commit comments