Skip to main content

Track AI model executions with LangFuse observability for better performance insights

Workflow preview

Workflow preview
100%
Track AI model executions with LangFuse observability for better performance insights preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

About this template This template is to demonstrate how to trace the observations per execution ID in Langfuse via ingestion API. Good to know Endpoint: Auth is a with a : = , = . How it works Trig...

Best for

  • Engineering automation workflows
  • AI RAG automation workflows
  • intermediate n8n builders looking for reusable templates

Tools used

n8n-nodes-base.executeworkflowtrigger, n8n-nodes-base.n8n, n8n-nodes-base.splitout, n8n-nodes-base.splitinbatches, n8n-nodes-base.httprequest, n8n-nodes-base.wait, n8n-nodes-base.removeduplicates, n8n-nodes-base.code

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Artem Makarov.

Original n8n.io source

1.1 Workflow description

Title
Track AI model executions with LangFuse observability for better performance insights
Workflow name
Track AI model executions with LangFuse observability for better performance insights

About this template

This template is to demonstrate how to trace the observations per execution ID in Langfuse via ingestion API.

Good to know

  • Endpoint: https://cloud.langfuse.com/api/public/ingestion
  • Auth is a Generic Credential Type with a Basic Auth: username = you_public_key, password = your_secret_key.

How it works

  • Trigger: the workflow is executed by another workflow after an AI run finishes (input parameter execution_id).

  • Remove duplicates Ensures we only process each execution_id once (optional but recommended).

  • Wait to get execution data Delay (60-80 secs) so totals and per-step metrics are available.

  • Get execution Fetches workflow metadata and token totals.

  • Code: structure execution data Normalizes your run into an array of perModelRuns with model, tokens, latency, and text previews.

  • Split OutLoop Over Items Iterates each run step.

  • Code: prepare JSON for Langfuse Builds a batch with:

    • trace-create (stable id trace-<executionId>, grouped into session-<workflowId>)
    • generation-create (model, input/output, usage, timings from latency)
  • HTTP Request to Langfuse Posts the batch. Optional short Wait between sends.

Requirements

  1. Langfuse Cloud project and API keys
  2. n8n instance with the HTTP node

Customizing

  1. Add span-create and set parentObservationId on the generation to nest under spans.
  2. Add scores or feedback later via score-create.
  3. Replace sessionId strategy (per workflow, per user, etc.). If some steps don’t produce tokens, compute and set usage yourself before sending.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - When Executed by Another Workflow

Type / Role
n8n-nodes-base.executeWorkflowTrigger - executeWorkflowTrigger
Config choices
Version 1.1

Block 2 - n8n

Type / Role
n8n-nodes-base.n8n - n8n
Config choices
Version 1

Block 3 - Split Out

Type / Role
n8n-nodes-base.splitOut - splitOut
Config choices
Version 1

Block 4 - Loop Over Items

Type / Role
n8n-nodes-base.splitInBatches - splitInBatches
Config choices
Version 3

Block 5 - HTTP Request

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 6 - Wait1

Type / Role
n8n-nodes-base.wait - wait
Config choices
Version 1.1

Block 7 - Remove Duplicates

Type / Role
n8n-nodes-base.removeDuplicates - removeDuplicates
Config choices
Version 2

Block 8 - Wait to get an execution data

Type / Role
n8n-nodes-base.wait - wait
Config choices
Version 1.1

Block 9 - Code: structure execution data

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 10 - Code: prepare JSON for LF

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 11 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 12 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

3. Summary Table

Workflow Track AI model executions with LangFuse observability for better performance insights
Complexity intermediate
Nodes 12
Categories Engineering, AI RAG
Author Artem Makarov
Published 21 Oct 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/9971/9971.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Track AI model executions with LangFuse observability for better performance insights do?

About this template This template is to demonstrate how to trace the observations per execution ID in Langfuse via ingestion API. Good to know Endpoint: Auth is a with a : = , = . How it works Trig...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Engineering, AI RAG use case.