Skip to main content
Connect n8n to cognee’s AI memory engine and build powerful automation workflows with persistent knowledge graphs. Add data, process it into memory, and run semantic searches - all without writing code.

Why Use This Integration

  • No-Code Memory: Build AI memory pipelines using n8n’s visual workflow editor
  • Knowledge Graph Search: Query your data using natural language with graph-enhanced retrieval within n8n workflows
  • Workflow Automation: Combine cognee memory with 400+ n8n integrations
  • Self-Hosted Ready: Works with self-hosted n8n instances out of the box

Installation

The cognee node is available as an n8n community node. Install it directly from n8n:
  1. Login to your self-hosted n8n
  2. Go to Settings → Community Nodes
  3. Click Install button to add a new node and search for n8n-nodes-cognee
  4. Click Install to complete.
Or install via npm in your n8n instance directory:
For self-hosted n8n, you can quickly spin up an instance following their documentation:Don’t forget to set your timezone. After setup, access n8n at localhost:5678.

Credentials Setup

Before using the cognee node in your workflows, configure your API credentials:
  1. Get your API key and Base URL from your Cognee Cloud dashboard (API Keys page)
  2. In your workflow, click the + icon and search for cognee — you’ll see the available resources (Add Data, Cognify, Search, Delete, Skill)
  3. Click on the Add Data action to start
  4. Create credentials of type Cognee API using the values below
Do not include a trailing /api in the Base URL — the node appends it automatically. The connection test hits GET /health.

Quick Start

Build a complete Add → Cognify → Search workflow in minutes:

Step 1: Add Data

Add the cognee node to your workflow and configure it:
  • Resource: Add Data
  • Operation: Add
  • Dataset Name: my-dataset
  • Text Data: Your content to store

Step 2: Cognify

Process your data into cognee’s knowledge graph memory:
  • Resource: Cognify
  • Operation: Cognify
  • Datasets: my-dataset
Query your memory using natural language:
  • Resource: Search
  • Operation: Search
  • Search Type: GraphCompletion
  • Datasets: my-dataset
  • Query: Tell me about NLP
  • Top K: 10

Operations Reference

You can interact with your data cross platform. You can query a dataset that you already have in your Cognee Cloud or you can view and interact with your new data from n8n in Cognee Cloud thanks to your cognee credentials.

Add Data

Stores text content in a cognee dataset for later processing. API Endpoint: POST /api/add_text Text strings added through the n8n node are stored under an auto-generated filename of the form text_<md5_hash>.txt, derived from an MD5 hash of the content. The n8n node does not expose a filename, label, or metadata override. If you need custom labels or arbitrary metadata per item, ingest via the Python SDK using the DataItem wrapper (DataItem(data=..., label=..., external_metadata=...)) — see DataItem metadata and labels.

Cognify

Transforms raw data into structured knowledge graph memory with embeddings. API Endpoint: POST /api/cognify Queries the knowledge graph memory using semantic search. API Endpoint: POST /api/search

Delete

Removes a whole dataset or a single data item.

Skill

The self-improving skill loop, targeting the /api/v1 endpoints. A weak run becomes a reviewable, approvable edit to a skill’s instructions. Loop wiring: Ingest SkillReview Skill → (score in n8n) → Propose ImprovementGet Proposal (show diff for approval) → Apply ImprovementGet Skill.
The Add Data / Cognify / Search / Delete resources call Cognee Cloud’s /api/* endpoints. The Skill resource calls /api/v1/*, available on a self-hosted Cognee server today and rolling out to Cognee Cloud. Point the credential Base URL at whichever backend exposes the routes you need (e.g. http://localhost:8000 for self-hosted).

Search Types

Choose the search type that best fits your use case:
Combines graph traversal with vector search for comprehensive retrieval. Best for:
  • General-purpose queries
  • Finding related entities and relationships
  • Balanced accuracy and context
Uses step-by-step reasoning over the knowledge graph. Best for:
  • Complex multi-hop questions
  • Queries requiring logical inference
  • Detailed explanations
Standard RAG (Retrieval-Augmented Generation) search. Best for:
  • Simple factual queries
  • Direct document retrieval
  • Fast response times
Learn more about search here

Use Cases

Build a support bot that learns from your documentation:
  1. Add FAQ documents, guides, and knowledge base articles
  2. Cognify to build searchable memory
  3. Search with customer questions to retrieve relevant answers
Connect to Slack, email, or chat integrations in n8n for end-to-end automation.
Process and query large document collections:
  1. Use n8n’s file triggers to watch for new documents
  2. Extract text and Add to cognee datasets
  3. Schedule periodic Cognify runs
  4. Build search interfaces or connect to chatbots
Create a research workflow that accumulates knowledge:
  1. Pull data from RSS feeds, APIs, or web scraping nodes
  2. Add relevant content to topic-specific datasets
  3. Cognify to extract entities and relationships
  4. Search across all research to find connections
Build memory from sales interactions:
  1. Connect CRM triggers (HubSpot, Salesforce)
  2. Add meeting notes, emails, and deal information
  3. Cognify to build relationship graphs
  4. Search for context before calls: “What do we know about Acme Corp?”

Example Workflow

Here’s a complete workflow configuration:

Troubleshooting


GitHub Repository

View source code and contribute

n8n Documentation

Learn more about n8n community nodes