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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@copperiq/n8n-nodes-llm-openai-langfuse

v1.0.3

Published

n8n OpenAI Language Model with built-in Langfuse observability and tracing

Readme

n8n-nodes-ai-langfuse

NPM Version License: MIT

This is an n8n community node that provides an OpenAI Language Model with built-in Langfuse observability and tracing.

n8n is a fair-code licensed workflow automation platform.

Langfuse is an open-source LLM engineering platform for tracing, evaluating, and monitoring AI applications.

Features

  • OpenAI Language Model: Full-featured OpenAI chat model with support for all latest models
  • Built-in Langfuse Tracing: Automatic observability for all LLM interactions
  • Organized Traces: Traces named as WorkflowName - NodeName with model-specific observation names
  • Session Tracking: Group related traces using session IDs
  • Custom Metadata: Add custom metadata and tags for filtering and organization
  • Token Tracking: Accurate token usage tracking including tool calls
  • User Tracking: Associate traces with specific users

Installation

Follow the installation guide in the n8n community nodes documentation.

Using npm

npm install @copperiq/n8n-nodes-ai-langfuse

Using n8n's UI

  1. Go to Settings > Community Nodes
  2. Select Install
  3. Enter @copperiq/n8n-nodes-ai-langfuse in the Enter npm package name field
  4. Agree to the risks of using community nodes
  5. Select Install

After installing the node, you can use it like any other node in your n8n workflows.

Configuration

Prerequisites

Credentials Setup

  1. Create new credentials: OpenAI API with Langfuse
  2. Enter your OpenAI API Key
  3. Enter your Langfuse Public Key
  4. Enter your Langfuse Secret Key
  5. (Optional) Enter your Langfuse Base URL if using self-hosted Langfuse

Usage

Basic Setup

  1. Add the OpenAI Language Model (Langfuse) node to your workflow
  2. Select or create OpenAI API with Langfuse credentials
  3. Choose your desired model (e.g., gpt-4o, gpt-4-turbo, gpt-3.5-turbo)
  4. Configure any additional options (temperature, max tokens, etc.)

Langfuse Tracking

The node includes optional Langfuse tracking fields for enhanced observability:

  • Session ID: Group related traces together (e.g., multi-turn conversations)
  • User ID: Associate traces with specific users
  • Tags: Add comma-separated tags for filtering (e.g., production, customer-support)
  • Custom Metadata: Add any additional context as JSON

All fields support n8n expressions for dynamic values:

// Example session ID from incoming data
{{ $json.sessionId }}

// Example user ID
{{ $json.userId }}

// Example tags
production, api-call, {{ $json.department }}

// Example metadata
{
  "customerTier": "{{ $json.tier }}",
  "region": "{{ $json.region }}"
}

Trace Organization

Traces in Langfuse are automatically organized with:

  • Trace Name: WorkflowName - NodeName (e.g., Customer Support - AI Assistant)
  • Observation Names: Actual model name (e.g., gpt-4o)
  • Trace ID: Unique per workflow execution and node
  • Metadata: Includes execution ID and workflow name

Examples

Simple Chat Completion

1. Trigger (e.g., Webhook)
2. OpenAI Language Model (Langfuse)
   - Model: gpt-4o
   - System Message: "You are a helpful assistant"
   - User Message: {{ $json.userMessage }}
3. Respond to Webhook

Conversation with Session Tracking

1. Webhook Trigger
2. OpenAI Language Model (Langfuse)
   - Model: gpt-4o
   - Langfuse Tracking:
     * Session ID: {{ $json.conversationId }}
     * User ID: {{ $json.userId }}
     * Tags: support, {{ $json.priority }}
3. Store in Database
4. Respond to Webhook

Compatibility

  • Requires n8n version 1.0.0 or above
  • Requires Node.js 18.0.0 or above
  • Compatible with all OpenAI models including latest GPT-4 and GPT-3.5 models

Resources

Support

For issues, questions, or feature requests, please visit:

License

MIT

Version History

1.0.0

  • Initial release
  • OpenAI Language Model with Langfuse integration
  • Session tracking and custom metadata support
  • Automatic token usage tracking
  • Professional trace naming and organization