Nugu Text Utility icon

Nugu Text Utility

Small text helpers for in-house n8n workflows

Actions2

Text → Extract JSON

AI-generated

Summary

Extract and parse a JSON object or array embedded within a given text string, optionally removing Markdown code fences before parsing.

Inputs

  • Text (required) — The text containing the JSON to extract and parse.
  • Strip Markdown Code Fence — Whether to remove surrounding Markdown code fences like ```JSON before parsing (default: true).
  • Output Mode — How to output the parsed JSON: merge with the input item, replace the input item, or place into a specified field (default: merge).
  • Output Field — Name of the field that receives the parsed JSON when output mode is set to 'Put Parsed JSON In Field' (default: parsedJson).

Output shape

a list of items, one per input item

Output items will contain the parsed JSON according to the selected output mode: merged into the original item (default), replacing the item JSON, or stored under the specified field name. If JSON extraction fails, an error message is included when 'Continue On Fail' is enabled.

Examples

Example 1: Parse JSON embedded in text containing Markdown code fences, output merged with input item.

Text set to the input string with JSON inside triple backticks, 'Strip Markdown Code Fence' enabled, and 'Output Mode' set to 'Merge With Input Item'.

Links

Discussion