AI Agent for Querying GitHub Issues using Redis RAG - n8n Workflow

Implement an advanced Retrieval-Augmented Generation (RAG) system using n8n and Redis. This n8n workflow creates an AI agent to chat with GitHub issues data, providing accurate answers based on semantic search.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?


  1. Developers and engineering managers needing quick, semantic insights into repository issues. 2. Data scientists experimenting with Retrieval-Augmented Generation (RAG) architectures. 3. Users looking for advanced examples of n8n templates involving vector databases and large language models (LLMs). 4. Automation specialists seeking to deploy custom AI agents using the n8n node ecosystem.

Overview

Searching through large numbers of GitHub issues using simple keywords can be inefficient and miss critical context. This sophisticated n8n workflow solves that challenge by implementing a cutting-edge Retrieval-Augmented Generation (RAG) system. It leverages the power of OpenAI embeddings and Redis as a high-performance vector store to enable semantic search on your repository data. The solution is executed via two distinct n8n flows: one for secure data ingestion and one for the live, public chat interface. This powerful n8n template ensures that the AI agent provides answers grounded in actual, current GitHub issue data, making information retrieval precise and contextually relevant. Every core component relies on a dedicated LangChain n8n node, streamlining the integration process.

How it Works

This highly effective n8n workflow operates in two distinct phases: data preparation and live querying.

Phase 1: Data Ingestion (Top Flow)


  1. Manual Trigger: The ingestion process begins when the "When clicking ‘Execute workflow’" n8n trigger is manually executed.

  2. Fetch Data: The HTTP Request n8n node connects to the GitHub API to retrieve all open issues from the specified repository, handling pagination automatically.

  3. Data Preparation: The Document Default Data Loader formats the issue titles and bodies, enriching them with crucial metadata (URL and state).

  4. Vectorization: The Embeddings OpenAI n8n node converts the issue text into high-dimensional vector embeddings.

  5. Storage: The Vectorize and store in Redis n8n node inserts these embeddings and documents into the Redis vector database under the index githubissuesv1.

Phase 2: AI Chat Interface (Bottom Flow)


  1. Chat Trigger: The When chat message received n8n trigger activates the second flow, providing a public webhook chat interface for user interaction.

  2. AI Orchestration: The AI Agent using RAG n8n node acts as the central orchestrator, utilizing the specified LLM (via the OpenAI Chat Model n8n node) and access to various tools.

  3. Chat History: The Redis Chat Memory n8n node manages conversation history, enabling continuous, multi-turn interactions and contextual awareness.

  4. Retrieval Tool: When a query requires factual grounding, the Agent uses the "Augment with results from Redis" n8n node (a specialized Redis Vector Store configured as a tool) to perform a semantic search, retrieving relevant issues based on vector similarity.

  5. Final Response: The Agent uses the retrieved GitHub issues as context to generate an accurate, grounded, and helpful response to the user's question. This entire process is orchestrated efficiently within the n8n workflow structure.

Installation Guide


  1. Import the n8n workflow: Copy the provided JSON data and paste it into your n8n instance using the "Import Workflow" function.

  2. Configure Credentials: This n8n workflow requires credentials for both OpenAI and Redis. Ensure you have these configured globally or specifically within the respective n8n node settings.

  3. Set Up Redis: Ensure your Redis server is running and accessible to n8n, ideally version 8.x or newer, which natively supports vector search capabilities.

  4. Configure GitHub Fetch: In the "Fetch issues from GitHub" n8n node, update the URL parameters to point to your desired GitHub repository owner and name. For large repositories, consider using a GitHub Personal Access Token within the HTTP Request n8n node to avoid unauthenticated API rate limits.

  5. Run Ingestion: Execute the top flow (starting with the Manual Trigger n8n node) once to populate the Redis vector database with the initial dataset.

  6. Activate Chat Flow: Activate the bottom flow (starting with the Chat Trigger n8n node) to enable the public chat endpoint for user interaction with the RAG agent. This setup completes the required configuration for this advanced n8n template.

Node Details

When clicking ‘Execute workflow’ (n8n trigger):
Function: Manually initiates the GitHub issue data ingestion process.
Fetch issues from GitHub (HTTP Request n8n node):
Function: Retrieves issue data from the GitHub REST API using the configured URL, handling full response pagination.
Embeddings OpenAI (n8n node):
Function: Generates vector embeddings for the text content of each GitHub issue using the OpenAI API, essential for semantic search.
Default Data Loader (n8n node):
Function: Structures the raw GitHub JSON data into documents, extracting title and details while adding url and state as metadata.
Vectorize and store in Redis (n8n node):
Function: The vector store sink, which stores the embedded documents into the Redis index named githubissuesv1. This is a critical component of the RAG n8n template.
When chat message received (n8n trigger):
Function: Acts as the public chat interface webhook, initiating the AI agent flow when a user sends a message.
OpenAI Chat Model (n8n node):
Function: Provides the LLM capabilities for the Agent, configured to use gpt-4.1-mini for fast, efficient reasoning.
Redis Chat Memory (n8n node):
Function: Maintains conversation history across multiple turns by storing and retrieving context in Redis.
Augment with results from Redis (n8n node):
Function: Configured as a tool (retrieve-as-tool) for the AI Agent. It executes semantic similarity searches against the Redis vector index to find relevant issue context.
AI Agent using RAG (LangChain Agent n8n node):
Function: Orchestrates the entire interaction. It processes the user query, consults the chat history, decides whether to use the Redis vector search tool, and generates the final, context-aware response. This complex n8n node is the core of the RAG logic.

Related n8n Workflows

Free

Nodes: 10 Nodes
Updated: December 26 2025
View all
Created by

Software engineer @ Redis Inc.

Featured*