npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

n8n-nodes-advanced-output-parser

v1.0.1

Published

Advanced Output Parser node for n8n with dynamic expression support

Readme

n8n-nodes-advanced-output-parser

n8n.io - Workflow Automation

Advanced Output Parser for n8n

This is a community node for n8n that provides an advanced output parser with dynamic expression support. It extends the functionality of the standard LangChain output parser by allowing you to use n8n expressions to dynamically create and modify JSON schemas at runtime.

Note: This is not yet production ready. Use at your own risk

Features

  • Dynamic Expression Support: Use n8n expressions in JSON schemas and examples
  • Multiple Schema Modes:
    • Static JSON Schema
    • Generate from JSON example with expressions
    • Fully dynamic schemas using expressions
  • Auto-Fix Functionality: Automatically retry parsing with LLM assistance when output doesn't match schema
  • Expression-Powered: Leverage workflow data to create context-aware schemas
  • Backward Compatible: Works with existing static schemas

Installation

To install this community node, you have several options:

Option 1: Install via n8n Community Nodes

  1. Go to Settings > Community Nodes in your n8n interface
  2. Enter n8n-nodes-advanced-output-parser in the npm package name field
  3. Click Install

Option 2: Manual Installation

# In your n8n installation directory
npm install n8n-nodes-advanced-output-parser

Option 3: Docker

Add the package to your n8n Docker environment:

FROM n8nio/n8n
USER root
RUN npm install -g n8n-nodes-advanced-output-parser
USER node

Usage

  1. Add the Node: Search for "Advanced Output Parser" in the node palette
  2. Connect to LangChain: Connect it to any LangChain chain or agent node
  3. Configure Schema Mode: Choose how you want to define your schema:
    • Static: Use a fixed JSON schema
    • From Example: Generate schema from a JSON example
    • Dynamic: Use expressions to build schemas from workflow data

Schema Modes

Static JSON Schema

Use a traditional, fixed JSON schema:

{
  "type": "object",
  "properties": {
    "name": { "type": "string" },
    "age": { "type": "number" }
  }
}

From Example with Expressions

Generate schema from JSON examples that can include expressions:

{
  "user": "{{ $json.username }}",
  "preferences": ["{{ $json.defaultPreference }}"],
  "metadata": {
    "source": "{{ $node.name }}"
  }
}

Dynamic Expression Schema

Build entire schemas using expressions:

{{
  $json.userType === 'admin' ?
  {
    "type": "object",
    "properties": {
      "adminData": {"type": "object"},
      "permissions": {"type": "array"}
    }
  } :
  {
    "type": "object",
    "properties": {
      "userData": {"type": "object"}
    }
  }
}}

Use Cases

  • Multi-tenant Applications: Different schemas for different tenants
  • API Response Parsing: Handle varying API response structures
  • Dynamic Form Processing: Process forms with different field sets
  • Context-Aware Data Extraction: Extract different data based on workflow context
  • Conditional Output Formatting: Format output differently based on input data

Expression Examples

Conditional Schemas

{
  {
    $json.responseType === "user" ? $json.userSchema : $json.productSchema;
  }
}

Dynamic Field Generation

{{
  {
    "type": "object",
    "properties": Object.fromEntries(
      $json.fields.map(field => [
        field.name,
        {"type": field.type, "description": field.description}
      ])
    )
  }
}}

Fallback Schemas

{
  {
    $json.customSchema || $parameter.defaultSchema;
  }
}

Configuration Options

| Option | Description | | ---------------------------- | ------------------------------------------------------------- | | Schema Mode | How to define the output schema (Static/From Example/Dynamic) | | JSON Schema | The JSON schema definition (supports expressions) | | JSON Example | Example JSON to generate schema from (supports expressions) | | Make All Fields Required | Whether generated schemas should make all fields required | | Auto-Fix Format | Automatically retry parsing with LLM when format is incorrect | | Custom Prompt | Custom prompt for auto-fix functionality |

Auto-Fix Functionality

When enabled, the auto-fix feature will:

  1. Attempt to parse the LLM output with your schema
  2. If parsing fails, automatically generate a retry prompt
  3. Send the retry prompt to the connected LLM
  4. Parse the corrected response

This is especially useful for complex schemas where the LLM might need guidance.

Development

To contribute to this project:

# Clone the repository
git clone https://github.com/volkovmqx/n8n-nodes-advanced-output-parser.git

# Install dependencies
cd n8n-nodes-advanced-output-parser
npm install

# Build the project
npm run build

# Link for local development
npm link

Requirements

  • n8n version 1.0.0 or higher
  • Node.js 18.10 or higher

Dependencies

  • @langchain/core: LangChain core functionality
  • langchain: LangChain output parsers
  • zod: Schema validation
  • generate-schema: JSON schema generation
  • json-schema: JSON Schema types

License

MIT

Support

For issues, questions, or contributions:

Changelog

v1.0.0

  • Initial release
  • Dynamic expression support for JSON schemas
  • Multiple schema modes (Static, From Example, Dynamic)
  • Auto-fix functionality
  • Full backward compatibility with standard output parsers

Made with ❤️ from Leipzig for the n8n community