Comflowy Extract JSON
Pull the one value you need out of a response blob
- json_value
- text1
- text2
- text3
- text4
- text5
APIs don't hand you what you need; they hand you a JSON blob and make you dig. Comflowy Extract JSON is the digging tool. You feed it a JSON value plus up to five dot-separated paths, and it pulls the value at each path out as a string. This is the node that closes the loop in any workflow where structured data meets text: HTTP request returns a response → extract the one field → feed it into a prompt, a filename, or another node.
The pack's data story only makes sense with this node in it. Comflowy Http Request brings JSON in, Comflowy Preview JSON lets you see it, and this node turns it into something usable. Without it, an API response is a dead end - with it, you can do things like pull a job ID out of a POST response and feed it to the next request in the chain. It's the difference between "my workflow can talk to an API" and "my workflow can use what the API said."
How it works and the inputs
The node walks the JSON using the dot-separated path as a key sequence. a.b.c digs into nested objects; an array index works too - the node description's own example is outputs.0.text for "the first item's text field." Paths that resolve to a string come back as-is; anything else (objects, lists, numbers) gets json.dumps'd so you still get something usable.
- json_value (required) - the JSON object to dig into.
- json_path1 through json_path5 (optional) - up to five independent paths. Leave one blank and its output stays empty.
Outputs: text1 through text5 - one STRING per path, in order. The node is an output node, so it also shows a combined preview of all five.
Installing and the gotchas
Install Comflowy's Custom Nodes via ComfyUI Manager (search "Comflowy") or git clone https://github.com/6174/comflowy-nodes into custom_nodes, restart. No API key; it's a local, pure-Python node.
The two things that trip people up:
- Missing paths return an error string, not empty. The node description is explicit: if the path isn't found, you get an error message string ("Extract error: ...") in the output. If your downstream node suddenly has text that looks like a Python traceback, you've got a wrong path - and the error string is the tell.
get_nested_valuereturns the first missing key's default and stops. Ifaexists buta.bdoesn't, you get the error path, not a graceful fallback. Confirm your path against Comflowy Preview JSON first.- Arrays need indexes, not names. If the value is a list,
outputs.textwon't work - you needoutputs.0.text. The example in the node description is the pattern to copy.
One more habit worth building: keep Comflowy Preview JSON upstream of this node while you're debugging. See the structure, then write the path that matches reality.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| json_value | JSON | — | |
| json_path1opt | STRING | — | |
| json_path2opt | STRING | — | |
| json_path3opt | STRING | — | |
| json_path4opt | STRING | — | |
| json_path5opt | STRING | — |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| text1 | STRING | — |
| text2 | STRING | — |
| text3 | STRING | — |
| text4 | STRING | — |
| text5 | STRING | — |