Templates by Issam AGGOUR
Build a multi-functional Telegram bot with Gemini, RAG PDF search & Google Suite
The Ultimate Beginner's Guide to an AI-Powered Telegram Assistant (PDF, Brave search & Google Suite) This comprehensive workflow bundle is designed as a powerful starter kit, enabling you to build a multi-functional AI assistant on Telegram. It seamlessly integrates AI-powered voice interactions, an intelligent PDF document search using a Retrieval-Augmented Generation (RAG) system, and automates various Google Suite tasks like calendar management and document generation. Perfect for beginners looking to explore advanced AI and automation capabilities. Disclaimer This template is designed for self-hosted n8n instances. 🚀 Key Features Telegram Bot Interface: Interact with your AI assistant using both text and voice commands through Telegram. AI Voice Bot: Transcribes user voice messages using OpenAI Whisper. Processes requests with an AI agent powered by Google Gemini. Responds with AI-synthesized voice using Replicate API. PDF RAG System: Index PDF documents from Google Drive via Telegram commands. Utilizes Mistral AI for Optical Character Recognition (OCR) on PDFs. Stores document content and embeddings in a Qdrant vector database. Answers questions about your documents using Google Gemini, based on retrieved context. Google Suite Automation: Manage Google Calendar: Create events, find upcoming holidays, and list birthdays. Google Drive: Search for PDF files and manage document templates. Google Docs: Automatically generate invoices from templates. Intelligent Web Search: Employs Brave Search for fetching real-time information from the web. Versatile AI Agent: Leverages Google Gemini with a suite of tools including a calculator, date & time utilities, and custom integrations (e.g., example Airbnb tools). Command-Driven Functionality: Easily trigger specific actions using Telegram commands like /help, /pdf, /rag, /invoice, /chat, /brave, and /birthday. ⚙️ How It Works The workflow is initiated by messages or commands sent to your Telegram bot. A central Switch node directs the flow based on the input received. Telegram Interaction & Command Routing A Telegram Trigger node listens for new messages (text or voice). A "typing..." indicator is sent to Telegram for better user experience. The Switch node parses the message content and routes it to the appropriate sub-workflow based on predefined commands (e.g., /pdf, /rag, /voice) or general chat. AI Voice Bot Functionality For voice messages (or if the voice path is triggered): The voice file is downloaded from Telegram. OpenAI Whisper transcribes the audio into text. The transcribed text is fed to an AI Agent (powered by Google Gemini and equipped with various tools and memory). The AI Agent's text response is then sent to the Replicate API to generate a natural-sounding voice. The generated audio response is sent back to the user on Telegram. PDF RAG System with Mistral OCR & Qdrant Indexing PDFs (via /qdrant <GoogleDriveFile_ID> command): The specified PDF is downloaded from Google Drive. The PDF is uploaded to Mistral AI for OCR processing. The extracted text (in markdown format) is retrieved. The text is split into manageable chunks. OpenAI Embeddings are generated for each chunk. These chunks and their embeddings are stored in a Qdrant vector collection. A confirmation message is sent to Telegram. Querying PDFs (via /rag <your_question> command): The user's question is processed by a RetrievalQA Chain. This chain uses Google Gemini as the Language Model and retrieves relevant document chunks from Qdrant based on semantic similarity (embeddings). Google Gemini then generates a concise answer based on the user's question and the retrieved contextual information from the documents. The answer is sent back to the user on Telegram. Searching PDFs in Drive (via /pdf <search_term> command): Searches your Google Drive for PDF files matching the provided search term. Sends a list of found PDF files (name and ID) to the user on Telegram, allowing them to easily identify files for indexing with /qdrant. AI Chat & Task Automation (General Chat & /chat command) Handles general text messages or transcribed voice inputs that are not specific commands. An AI Agent (Google Gemini) processes these inputs. The agent is equipped with tools such as: Google Calendar Tools: To create events, find the next public holiday, or list upcoming birthdays. Brave Search Tool: To search the internet for information. Calculator Tool: For mathematical computations. Date & Time Utility: For handling and formatting dates. Example Airbnb Tools: Demonstrates extensibility for custom tool integrations. The agent utilizes a "Think Node" process for reasoning and Window Buffer Memory to maintain conversational context. Responses are formulated and sent back to the user on Telegram. Google Automations Invoice Generation (via /invoice command): Copies a predefined Google Docs invoice template from your Google Drive. Populates the new document with details (client name, items, etc. – currently uses placeholder data from an 'Edit Fields' node, which can be customized to parse input from the command). Converts the populated Google Doc into a PDF file. Sends the generated PDF invoice to the user via Telegram. Calendar Management (via AI Agent or specific commands like /birthday): The /birthday command fetches upcoming birthdays from a specified Google Calendar. The AI Agent can also interact with Google Calendar to create events or retrieve information based on natural language requests. Web Search (via /brave <query> command or AI Agent) Performs a web search using the Brave Search API. Returns a list of search results, including titles and URLs, to the user on Telegram. Help Command (/help) Provides the user with a formatted list of all available Telegram commands and their basic usage instructions. 🛠️ Setup Steps & Credentials To get this workflow bundle up and running, you'll need to configure several credentials: Telegram: Create a new bot via @BotFather on Telegram to obtain a Bot Token. Add this token to the Telegram Trigger node and all Telegram (sender) nodes in the workflow. OpenAI: Obtain an API Key from platform.openai.com. Create an OpenAI credential. Use this credential in the Convert audio to text (OpenAI node for Whisper transcription) and all Embeddings OpenAI nodes (for RAG system). Replicate API (Text-to-Speech): Sign up at replicate.com and get your API token. Create an HTTP Bearer Auth credential using this token. Assign this credential to the Call Replicate API (HTTP Request) node. Google Gemini (PaLM API): Get an API key from Google AI Studio or Google Cloud Console. Create a Google Gemini(PaLM) Api credential. Assign it to all Google Gemini Chat Model nodes. Qdrant (Vector Database): Set up a Qdrant instance (either cloud-hosted or self-managed). Note your Qdrant instance URL and API Key (if security is enabled). Create a QdrantApi credential with these details. Assign it to the Qdrant Vector Store nodes. For the Refresh collection node (an HTTP Request node used to clear the collection for /pdf command demo), create an HTTP Header Auth credential with your Qdrant API key if required by your instance. Mistral AI (PDF OCR): Obtain an API key from console.mistral.ai. Create a Mistral Cloud API credential. Assign this to the Mistral Upload, Mistral Signed URL, and Mistral DOC OCR (HTTP Request) nodes. Google Drive & Google Docs: Ensure the Google Drive API and Google Docs API are enabled in your Google Cloud Console project. Set up OAuth 2.0 credentials (Client ID and Client Secret). Create Google Drive OAuth2 Api and Google Docs OAuth2 Api credentials. Assign these to the respective Google Drive and Google Docs nodes throughout the workflow. Important:* Configure relevant Folder IDs (for PDF search, invoice template source, invoice output) and the invoice template Document ID in the Google Drive and Google Docs nodes. Google Calendar: Enable the Google Calendar API in your Google Cloud Console project. Set up OAuth 2.0 credentials. Create a Google Calendar OAuth2 Api credential. Assign it to the Google CalendarTool and Google Calendar nodes. Specify the correct calendar names or IDs in the nodes (e.g., for birthdays, holidays, new event creation). Brave Search: Get a Brave Search API key from their developer portal. Create a Brave Search API credential. Assign it to the Brave Search nodes and tools. (Optional) Airbnb MCP Client: The workflow includes example nodes for Airbnb MCP tools. If you intend to use or expand these, set up the corresponding MCP Client API credentials. 💡 Customization & Learning This "Beginner Bundle" is not just a ready-to-use solution but also a fantastic learning resource: Explore AI Agent Prompts: Dive into the AI Agent nodes to see how prompts are structured to guide the LLM's behavior, including the "Think Node" process and character guidance for robust messaging. Modify Toolsets: Easily add or remove tools for the AI agent to expand its capabilities. Invoice Customization: Adapt the Edit Fields node and the Google Docs template to match your invoicing needs. You can extend it to parse invoice details directly from the Telegram command. RAG Parameters: Experiment with chunk sizes, overlap, and different embedding models in the RAG pipeline. Extend Commands: Add new commands and corresponding functionalities by expanding the main Switch node and building out new automation paths. By setting up and dissecting this workflow, beginners can gain a practical understanding of building complex, AI-driven applications, integrating various services, and managing different data flows.
Family assistant: Schedule, meal & routine management with Email & Telegram
The FamilyFlow Assistant is your n8n-powered 🚀 companion designed to streamline daily parenting tasks, reduce mental load, and bring a bit more organization and fun into your family life. This versatile workflow automates reminders, generates helpful ideas, and provides gentle nudges to keep your household running smoothly. Why FamilyFlow Assistant? 🤔 ---------------------------- Parenting is a demanding (and rewarding!) job. Juggling schedules, meals, routines, and remembering everything can be overwhelming. FamilyFlow Assistant aims to: Reduce Mental Clutter: Offload common reminders and to-dos to an automated system. Enhance Organization: Keep track of activities, appointments, and important checks. Spark Joy & Creativity: Generate meal ideas, story starters, and positive thoughts. Promote Routine: Help establish and maintain consistent morning and evening routines. Save Time: Automate repetitive prompts and checks, freeing you up for what matters most. Core Features & Automations 🧩 ------------------------------ This workflow bundle comes packed with several independent yet complementary automations: 📅 Daily & Weekly Organization: Activity & Appointment Reminders: Get a daily heads-up on scheduled events for the family. Morning Routine Checklist: Start the day right with a friendly checklist for kids (or parents!). Bedtime Routine Nudge: A gentle reminder to begin the wind-down process. Evening “Did You Remember?” Scan: A quick mental checklist for common end-of-day to-dos. Weekly “Plan Ahead” Prompt: A Sunday reminder to review the upcoming week. School/Daycare Comms Check: Prompts to check for important updates. 💡 Inspiration & Well-being: Meal Idea Generator: Never wonder “what’s for dinner?” again (or at least, less often!). Positive Thought / Fun Fact Sender: A little daily dose of brightness. Story Starter / Quick Activity Prompt: Spark imagination or a quick family interaction. Weekly Wins & Gratitude Reminder: Encourage reflection on positive moments. ⏱️ Optional Helpers: Screen Time Break Reminder: (Disabled by default) A nudge for offline time. Getting Started: Setup & Customization 🛠️ ------------------------------------------ Make FamilyFlow Assistant truly yours with these simple steps: Import the Workflow: Add the provided .json file to your n8n instance. Configure Credentials: Email: Set up your preferred email sending credential (e.g., SMTP, Gmail) in all “Email Send” nodes. You’ll likely use the same one for all. Personalize Content (Crucial!): Email Addresses: Update parents@example.com to your actual email(s) in all Email nodes. Schedules & Activities: Edit the “Define Daily Schedules” (Set node) with your family’s actual events. Meal Ideas: Customize the mealIdeas array in the “Generate Meal Idea” (Function node). Checklists & Prompts: Tailor the text/HTML in Email nodes for morning/bedtime routines, check-ins, story starters, etc., to fit your family’s style. Positive Thoughts/Facts: Update the lists in the “Get Positive Thought/Fact” (Function node). Adjust Triggers (Cron Nodes): Modify the “Rule” in each Cron node to set the exact time and frequency for each automation. Activate Automations: The main workflow and most automations are inactive by default. Toggle the “Active” switch ON for the entire workflow or for individual automations/nodes you wish to use. Remember, the “Screen Time Break Reminder” is disabled by default; enable its Email node if desired. How Each Automation Works (Briefly) ⚙️ -------------------------------------- Each automation generally follows this pattern: TRIGGER: An event starts the flow (e.g., a scheduled time via Cron). PROCESS: Data is defined (e.g., list of activities, meal ideas) or generated (e.g., a random selection, a formatted message). RESPOND: An action is taken, typically sending an email with the relevant information or reminder. For instance, the “Daily Activity Reminder” uses a Cron trigger, a Set node to hold your schedule, a Function node to filter for today’s events, an IF node to check if there are any, and finally an Email node to send the reminder. Expanding Your Assistant 🚀 --------------------------- FamilyFlow Assistant is a great starting point. Consider these ideas to extend its capabilities: Integrate Calendars: Connect to Google Calendar or Outlook Calendar to fetch events dynamically. Use Different Notifiers: Send messages via Telegram, WhatsApp, Slack, or push notifications. Smart Home Integration: If you have smart home devices, trigger lights or announcements for routines. Shared To-Do Lists: Update a shared Todoist or Microsoft To Do list. Interactive Input: Use n8n forms or Telegram commands to add events or trigger specific actions. Requirements 📋 --------------- An active n8n instance (self-hosted or cloud). Email sending credentials configured in n8n. A little time to customize the content to perfectly match your family’s needs! Embrace the flow and let your FamilyFlow Assistant help make parenting a little smoother!
Generate professional changelogs from Git commits with GPT-4 and GitHub
AI-Powered Git Changelog Generator for Automated Release Notes This workflow transforms your software release process by automatically generating clean, professional changelogs from your Git commit history. It listens for new version tags in your GitHub repository, uses AI to summarize the changes, and publishes a polished release note, saving you hours of manual work. Disclaimer This template is designed for self-hosted n8n instances and requires API credentials for GitHub and an AI provider (e.g., OpenAI, Google Gemini). 🚀 Key Features Fully Automated Process: Triggers automatically on a git push --tags event. Set it up once and forget about it. AI-Powered Summarization: Leverages a Large Language Model (LLM) to intelligently read, categorize, and summarize your commit messages into a human-friendly format. Seamless GitHub Integration: Fetches commit data and creates official GitHub Releases without leaving the n8n environment. Smart Categorization: Automatically groups release notes into sections like "Features," "Fixes," and "Other Changes" for clarity. Highly Customizable: Easily adapt the AI prompt, changelog format, and release template to match your project's style. Saves Developer Time: Eliminates the tedious, manual task of writing release notes, freeing up developers to focus on coding. ⚙️ How It Works The workflow is a linear process triggered by a webhook from GitHub. GitHub Webhook Trigger A Webhook node is configured to listen for push events from your specified GitHub repository. It is filtered to only run when a new tag (e.g., v1.2.0) is pushed, which is the standard practice for signaling a new release. Fetch Commit History Once triggered, a GitHub node uses the webhook payload to identify the repository and the new tag. It makes an API call to GitHub to compare the new tag with the most recent previous tag, fetching all the commit messages in between. AI Summarization The list of raw commit messages is passed to an AI node (e.g., OpenAI or Google Gemini). A pre-defined prompt instructs the AI to process the commits. The prompt asks the model to summarize the changes and group them into logical categories. The AI returns a single, well-formatted markdown text block representing the complete changelog. GitHub Release Creation The final GitHub node takes the AI-generated markdown. It creates a new GitHub Release, using the tag from the webhook as the release version and the AI-generated text as the release body/description. 🛠️ Setup Steps & Credentials To get this workflow running, you will need to configure the following credentials and settings: GitHub: You need a GitHub Personal Access Token with repo scope to allow n8n to access your repository. Create a GitHub OAuth2 Api or GitHub Api credential in n8n. Assign this credential to the Get Commits and Create GitHub Release nodes. In the Webhook node, copy the Test URL and add it as a new webhook in your GitHub repository's settings (Settings > Webhooks). Set the content type to application/json and select "Just the push event" or "Send me everything," then filter for tag pushes in the workflow itself. AI Provider (OpenAI / Gemini): Obtain an API Key from your chosen AI provider (e.g., platform.openai.com or aistudio.google.com). Create the corresponding credential in n8n (e.g., OpenAI API or Google Gemini(PaLM) Api). Assign this credential to the Generate Changelog with AI node. 💡 Customization & Learning This workflow is a powerful base that you can easily extend: Refine the AI Prompt: Modify the prompt in the Generate Changelog with AI node to change the tone, language, or structure of your release notes. You could ask it to generate a "What's New" section in a different style, for example. Add Notifications: Extend the workflow by adding a Discord or Slack node after the final step to notify your team or community channel that a new version has been released. Support Different Git Providers: Swap the GitHub nodes for GitLab or other provider nodes to adapt the workflow to a different platform. Experiment with Models: Try different AI models (e.g., GPT-4 vs. GPT-3.5-Turbo, or different Gemini versions) to see how it affects the quality and cost of your generated changelogs.
Manage recipes with AI-powered Telegram bot and Google Sheets database
Transform Your Telegram into a Smart Recipe Assistant! Tired of scrolling through messy notes and bookmarks to find your favorite recipes? Wish you had a personal chef's assistant to help you in the kitchen? Introducing the Culinary Companion for Telegram, an n8n workflow that turns your Telegram app into a powerful, AI-driven recipe management tool, using Google Sheets as your database. --- 🚀 Key Features Telegram Bot Interface: Interact with your recipe book using simple text commands. Google Sheets Database: Your single source of truth for recipes, easily viewable and editable outside of Telegram. AI-Powered Recipe Assistant: Utilizes Google Gemini or OpenAI to understand natural language for creating, modifying, and searching for recipes. Full Recipe Management (CRUD): Create: Add new recipes conversationally. Read: Fetch your full recipe list or view a single, detailed recipe card. Update: Modify existing recipes with AI assistance. Command-Driven & AI-Driven: Use simple commands for direct actions (/list, /select) or have a conversation with the AI for more complex tasks (/search, /create, /modify). Formatted for Mobile: All responses are sent in clean, readable Markdown, perfect for viewing on the go. --- ⚙️ How It Works The workflow is triggered by messages sent to your Telegram bot. A central Command Router (Switch node) determines the user's intent and directs the flow to the appropriate tool. Command Routing A Telegram Trigger node listens for any new message. The Command Router (Switch node) immediately inspects the message text for keywords like /list, /select, /create, etc. Based on the command, the workflow branches into either a simple data fetch or a more complex AI-powered action. Simple Recipe Lookups (/list & /select) /list: The Read Recipe Names (Google Sheets node) fetches all values from column A of your sheet. A Format List Message (Code node) transforms the raw data into a clean, numbered list. The formatted list is sent to you via the Telegram Send Recipe List node. /select [recipe name]: The Extract Select Param (Code node) isolates the recipe name from your command. The Lookup Recipe Row (Google Sheets node) searches for that specific recipe in your sheet and returns its full row of data. A Format Full Recipe (Code node) assembles the data into a beautifully formatted recipe card, complete with emojis and sections for ingredients, instructions, and notes. The final recipe card is sent via the Telegram Send Full Recipe node. AI-Powered Recipe Management (/search, /create, /modify) For more complex tasks, the workflow leverages a powerful AI agent. The user's command (e.g., /search chicken and rice or /create a pasta dish) is passed to the Recipe AI Agent. This agent is powered by either Google Gemini or an OpenAI Model. It is given a specific system prompt to act as a helpful, food-focused assistant with access to a set of tools. Tools Available to the AI: Read Recipes Sheet: Allows the AI to read the entire Google Sheet to answer broad questions or find recipes based on ingredients. Update Recipes Sheet: Gives the AI the power to add new rows (new recipes) or modify existing ones based on your conversation. Think: A tool that allows the agent to process complex requests step-by-step before acting. Conversation Memory: The agent remembers the last few messages, allowing you to have a natural, back-and-forth conversation (e.g., "Create a new recipe" -> "What should it be called?" -> "Spicy Tacos"). The AI's final, formatted response is sent back to you via the Telegram Send AI Response node. --- 🛠️ Setup Steps & Credentials Telegram Bot: Create a bot with @BotFather on Telegram to get your API token. Add this token as a credential for the Telegram Trigger and all Telegram sender nodes. Google Sheets: Create a new Google Sheet. Set up the first row with headers: Recipe Name, Cooking Time, Ingredients, Instructions, Notes. Copy the Sheet ID from the URL (it's the long string of characters in the middle). Paste the Sheet ID into the relevant fields in the Read Recipe Names, Lookup Recipe Row, and the Google Sheets Tools (Read Recipes Sheet, Update Recipes Sheet). Create Google OAuth2 credentials and connect them to all Google Sheets and Google Sheets Tool nodes. AI Provider (Choose One): For Google Gemini: Get an API key from Google AI Studio, create a Google Gemini(PaLM) Api credential, and connect it to the Google Gemini Chat Model node. For OpenAI: Get an API key from OpenAI, create an OpenAI credential, and connect it to the OpenAI Chat Model node. Note:* You only need to enable one of the two AI models. --- 💡 Customization & Learning Expand Your Database: Add more columns to your Google Sheet like Cuisine, Difficulty, or Rating, and modify the Format Full Recipe node to display them. Enhance the AI: Edit the system prompt in the Recipe AI Agent to change its personality or give it more specific instructions. Add New Tools: Create new tools for the AI agent, such as a function to fetch nutritional information from an external API based on ingredients. Different Triggers: Instead of a Telegram bot, you could trigger the /create function from a simple web form.
Auto-track Amazon prices with Google Gemini & send alerts to Telegram
AI-Powered Amazon Price Tracker to Telegram Overview Automate your deal hunting with this intelligent Amazon price tracker. This workflow uses the power of AI to monitor any Amazon product page at regular intervals. When the price drops to or below your desired target, it instantly sends a notification to your Telegram chat. Say goodbye to manual price checking and never miss a sale, a lightning deal, or a Black Friday bargain again. Unlike traditional scrapers that break when a website's layout changes, this workflow uses a Large Language Model (Google Gemini) to understand the page content, making it significantly more robust and reliable. 🚀 Key Features AI-Powered Data Extraction: Leverages Google Gemini to intelligently read the product page and extract the name and price, making it resilient to Amazon's frequent layout updates. Scheduled Automation: Set it up once with a schedule (e.g., every hour) and let it run in the background. Instant Telegram Alerts: Get real-time notifications directly in Telegram the moment a price drops to your target. Centralized & Easy Configuration: A single Set node holds all your settings—product URL, target price, and Telegram Chat ID—for quick and easy updates. Built-in Error Handling: Intelligently checks if data was extracted correctly and sends an error alert if it fails, so you're always in the loop. Cost-Efficient Processing: Includes a pre-processing step to clean and simplify the page's HTML, reducing the amount of data sent to the AI and lowering potential token costs. ⚙️ How It Works The workflow follows a clear, linear process from scheduling to notification. Initiation and Configuration A Schedule node triggers the workflow automatically at your chosen interval (e.g., every hour). A Set node named Config: Product & Alert acts as your control panel. Here, you define the Amazon product URL, your target price, and your Telegram Chat ID. Fetch and Clean Product Page An HTTP Request node fetches the full HTML content of the Amazon product URL. A Code node then cleans this raw HTML. It strips out unnecessary scripts, styles, and tags, leaving only the core text content. This crucial step makes the data easier for the AI to analyze accurately and efficiently. AI-Powered Data Extraction An AI Agent node sends the cleaned text to the Google Gemini model. It uses a specific prompt to ask the AI to identify and extract the product's name (productName) and its current price (priceValue) as a number. A Structured Output Parser ensures the AI returns the data in a clean, predictable JSON format (e.g., {"productName": "...", "priceValue": 49.99}), which is essential for the next steps. Validate and Compare Price An IF node first validates the AI's output, checking if a valid price was successfully extracted. If not, it routes the workflow to send an error message. If the data is valid, a second IF node compares the extracted priceValue with your priceTarget from the configuration node. Prepare and Send Telegram Notification If the current price is less than or equal to your target price, the workflow proceeds down the "true" path. A Set node constructs a formatted, user-friendly success message including the product name, the new low price, and a direct link to the product page. Finally, a Telegram node sends this prepared message to your specified Chat ID. If an error occurred at any stage, a corresponding error message is sent instead. 🛠️ Setup Steps & Credentials To get this workflow running, you'll need to configure the following: Google Gemini: You need a Google AI (Gemini) API Key. Create a Google Gemini(PaLM) Api credential in n8n. Assign this credential to the Google Gemini Chat Model node. Telegram: You need a Telegram Bot Token. Get one by talking to the @BotFather on Telegram. You also need your personal Chat ID. You can get this from a bot like @userinfobot. Create a Telegram credential in n8n with your Bot Token. Assign this credential to both the Send Success and Send Error Telegram nodes. Workflow Configuration: Open the Config: Product & Alert node. Replace the placeholder values: telegramChatId: Paste your Telegram Chat ID. amazonUrl: Paste the full URL of the Amazon product you want to track. priceTarget: Set your desired price (e.g., 49.99). Once configured, save the workflow and activate it using the toggle in the top-right corner. 💡 Customization & Learning This workflow is a powerful template that you can easily adapt and expand: Track Multiple Products: Modify the workflow to read product URLs and target prices from a Google Sheet or Airtable base to monitor many items at once. Add More Notification Channels: Duplicate the Telegram node and add Discord, Slack, or Email nodes to receive alerts on multiple platforms. Store Price History: Connect a Google Sheets, Airtable, or database node after the AI extraction step to log the price of the product over time, creating a historical price chart. Switch AI Models: Easily swap the Google Gemini node for an OpenAI or Anthropic model by adjusting the prompt and credentials.
Classify and convert GitHub issues to Jira tickets with OpenAI
AI-Powered GitHub Issue to Jira Ticket Automation Bridge the gap between your development and project management workflows with this intelligent n8n template. This isn't just a simple sync; it uses an AI agent to analyze, classify, and intelligently route new GitHub issues into the correct Jira ticket type, saving you countless hours of manual triage. --- 🚀 Key Features AI-Powered Issue Classification: Leverages an AI Agent (powered by OpenAI) to analyze the content of a new GitHub issue and determine its type (e.g., bug, task, improvement). Intelligent Routing: Automatically creates the corresponding ticket type in Jira. Bugs in GitHub become Bugs in Jira; other issues become Tasks. Seamless Integration: Triggers instantly when a new issue is created in your specified GitHub repository. Rich Data Transfer: Migrates the issue title and body directly into the Jira ticket description for full context. Structured AI Output: Uses a structured output parser to ensure the AI's classification is reliable and consistent. Beginner-Friendly & Educational: The workflow is annotated with sticky notes, explaining each step of the process, making it a great tool for learning how to use AI in n8n. --- ⚙️ How It Works The workflow is designed for clarity and power, moving from issue creation to ticket generation in four automated steps. Trigger: New GitHub Issue The GitHub Trigger node constantly listens for new issues being created in your designated repository. Once an issue is opened, the workflow springs into action. Analyze: AI Classification The issue's title and body are passed to an AI Agent. Using a prompt designed for classification and an OpenAI Chat Model, the agent determines if the issue is a bug, task, or another category. A Structured Output Parser ensures the AI returns clean, usable JSON data (e.g., {"type": "bug"}). Route: Conditional Logic An IF node checks the structured output from the AI agent. If the type is "bug," the workflow proceeds down the "bug" path. Otherwise, it follows the default path for "tasks." Create: Jira Ticket Generation Depending on the route, the corresponding Jira node is activated. A new ticket is created in your specified Jira project with the appropriate issue type (Bug or Task) and includes the full context from the original GitHub issue. --- 🛠️ Setup Steps & Credentials To get this AI-powered workflow running, you'll need to configure a few credentials: GitHub: Create a GitHub credential in n8n. In the GitHub Trigger node, select your credential and specify the owner (your GitHub username or organization) and the repository you want to monitor. OpenAI: Obtain an API Key from platform.openai.com. Create an OpenAI credential in n8n. In the OpenAI Chat Model node, select your newly created credential. You can also experiment with different models like gpt-4.1-mini for speed or gpt-4o for higher accuracy. Jira: Create a Jira API token from your Atlassian account settings. Create a Jira credential in n8n using your email, API token, and Atlassian domain. In both the Create Jira Ticket (Bug) and Create Jira Ticket (Task) nodes, select your Jira credential and set your target project key. --- 💡 Customization & Learning This workflow is a powerful starting point. Here are a few ways you can customize it and learn more: Expand Classification: Modify the AI Agent's prompt and the IF node to handle more issue types, like improvement, documentation, or feature-request. Add More Data: Enhance the Jira nodes to include labels, assignees, or priority levels based on the AI's output or the original GitHub issue's properties. Swap AI Models: Try different language models by replacing the OpenAI node with one for Google Gemini, Anthropic Claude, or others supported by n8n. Error Handling: Add a path for what to do if the AI fails to classify an issue, such as sending a notification to a Slack channel for manual review. --- 📋 Requirements An active n8n instance. GitHub API credentials. OpenAI API credentials. Jira API credentials.