Build a Slack knowledge graph with Claude, Neo4j and Google Sheets
Quick Overview This workflow ingests chat messages via a webhook or a 15-minute schedule, filters out low-signal content, uses Anthropic Claude to extract entities and relationships, and stores the resulting knowledge graph in Neo4j while appending an audit log row to Google Sheets.
How it works Receives a chat message via an n8n webhook or runs every 15 minutes to process polled Slack data. Normalizes the incoming payload into consistent fields like channel, sender, timestamp, and message text. Uses a Python script to tag message signals (questions, decisions, action items) and filter out noise such as greetings, bots, and very short messages. Sends each relevant message to Anthropic Claude to extract entities, relationships, a summary, message type, and importance. Sends the extracted graph to Anthropic Claude again to add implicit relationships, weights, decision-chain metadata, and a thread category. Merges both AI passes into a single nodes-and-edges knowledge graph, validates references and edge weights, and drops invalid graphs. Upserts the graph into Neo4j via its transactional HTTP endpoint, appends an audit row to Google Sheets, and returns a JSON success response to the webhook caller.
Setup Add an Anthropic API credential and select the Claude model used by the two AI steps. Configure Neo4j access by replacing the Neo4j HTTP endpoint URL and setting up HTTP Basic Auth credentials for your Neo4j instance. Configure Google Sheets OAuth2 credentials and replace the placeholder Google Sheet ID, sheet tab name/range (KnowledgeGraph), and any required API permissions. If using the webhook ingest path, copy the production webhook URL from n8n and configure your Slack/app integration to POST message payloads to /chat-ingest with the expected fields (text, channel, sender, timestamps).
Related Templates
Restore your workflows from GitHub
This workflow restores all n8n instance workflows from GitHub backups using the n8n API node. It complements the Backup ...
Build a Restaurant Voice Assistant with VAPI and PostgreSQL for Bookings & Orders
This n8n template demonstrates how to create a comprehensive voice-powered restaurant assistant that handles table reser...
Extract Named Entities from Web Pages with Google Natural Language API
Who is this for? Content strategists analyzing web page semantic content SEO professionals conducting entity-based anal...
🔒 Please log in to import templates to n8n and favorite templates
Workflow Visualization
Loading...
Preparing workflow renderer
Comments (0)
Login to post comments