Build an AI-Powered Confluence Chatbot with n8n Automation

Struggling to quickly find answers from Confluence pages? This n8n workflow creates an AI chatbot that fetches Confluence page content and answers queries accurately, saving hours of search time.
httpRequest
agent
manualChatTrigger
+7
Workflow Identifier: 2223
NODES in Use: Sticky Note, HTTP Request, Set, Markdown, Manual Chat Trigger, Memory Buffer, LangChain AI Agent, OpenAI, Telegram, Split Out
Automate Confluence chatbot with n8n and AI agents

Press CTRL+F5 if the workflow didn't load.

Learn how to Build this Workflow with AI:

What This Workflow Does

This workflow answers questions from Confluence pages through chat. It helps users find the right info fast. It stops wasting time scrolling or guessing. The chatbot reads Confluence content, understands questions, and replies with good answers in chat.

It works by connecting chat messages to Confluence API calls, changing content to markdown, and using GPT-4o-mini AI to answer. The process keeps chat history so answers feel natural.


Tools and Services Used

  • Confluence Cloud API: Gets page data and content.
  • OpenAI GPT-4o-mini: Understands chat questions and Confluence text.
  • Telegram Bot API: Receives user messages.
  • n8n automation platform: Runs nodes and connects all steps.

Inputs, Processing, and Output

Inputs

  • User chat message with a question.
  • Confluence page IDs defined in the workflow.
  • Confluence API credentials (email + API key).
  • OpenAI API key for GPT-4o-mini.
  • Telegram bot credentials and chat ID.

Processing Steps

  • When chat message received triggers on new messages.
  • Globals Set node sets Confluence page IDs to use.
  • Search By ID HTTP request gets page metadata using page ID.
  • Split Out separates search results array for processing single page.
  • Page Schema Set node maps important page details for next call.
  • Confluence Page Storage View HTTP request fetches full page content in rich storage HTML format.
  • HTML to Markdown converts the page HTML to markdown text that AI understands better.
  • Window Buffer Memory stores recent chat history to keep context.
  • gpt-4o-mini generates answers from the user question plus page context.
  • AI Agent reinforces answers only from fetched content, replying “I don’t know.” when no info exists.
  • Chat Response Set collects AI output for sending.
  • Send Telegram Message sends answer back to user chat.

Output

Final text reply with accurate Confluence page information sent as chat message.


Who Should Use This Workflow

This workflow fits teams who use Confluence to store docs. It is made for project managers, developers, or anyone who wastes time searching pages. It helps to get instant answers in chat, reducing mistakes from outdated or hard-to-find info.

If already using n8n and APIs, this boosts productivity by combining Confluence and AI chats.


Beginner Step-by-Step: How to Use This Workflow for Production

Import the Workflow

  1. Download the workflow file using the Download button on this page.
  2. Open the n8n editor where you manage workflows.
  3. Go to the main menu and choose “Import from File.”
  4. Select the downloaded workflow file and import it.

Configure Credentials and Settings

  1. Open the workflow and find all credential nodes.
  2. Add your Confluence API Key credentials. Remember to base64 encode email:apiKey as in docs.
  3. Add your OpenAI API Key to the gpt-4o-mini node.
  4. Set your Telegram bot token and chat ID in the Send Telegram Message node.
  5. Update the Globals Set node with page IDs from your Confluence site.
  6. Double check URLs in HTTP request nodes match your Confluence instance domain.

Test and Activate

  1. Manually run the workflow once using a test chat message.
  2. Check that each node executes successfully and outputs what you expect.
  3. Send a message to the Telegram bot to confirm a reply comes back.
  4. When tests pass, toggle the workflow status to active to listen for all chats.

Now the bot will reply instantly to user questions with Confluence page content in chat.

If using self hosting options, see self-host n8n for help running this smoothly.


Customizations and Enhancements

  • Add more Confluence page IDs to the Globals Set node to widen the knowledge base.
  • Change the final message node from Telegram to Slack, Email, or other platforms by swapping nodes.
  • Adjust GPT parameters like temperature or max tokens for different reply styles.
  • Switch Confluence content format in the HTTP request query param depending on the needed output (like “view” instead of “storage”).
  • Improve conversation memory by changing the Window Buffer Memory node session size or replacing it with deeper LangChain memory techniques.

Common Issues and Fixes

  • Authentication errors on Confluence API calls: Usually wrong API token or missing base64 encoding. Recheck and regenerate keys as needed.
  • Empty or ‘Page not found’ API responses: Check all page IDs in Globals Set node. They must match exact Confluence page IDs.
  • Chatbot replies “I don’t know.” incorrectly: Make sure HTML to Markdown conversion sends proper content. Check AI prompt uses correct page text variable.
  • No response in chat: Verify Telegram bot credentials and chat ID; test sending message directly with Telegram API if unsure.

Pre-Production Checklist

  • Test Confluence API token separately using Postman or curl.
  • Make sure When chat message received node triggers on messages.
  • Confirm page IDs and URLs return data in HTTP request nodes.
  • Trial run GPT node with sample input for relevant answers.
  • Set Telegram chat ID and bot token correctly.
  • Backup workflow and API credentials before activating.

Summary of Benefits

✓ Saves time finding info in Confluence.

✓ Gives quick answers inside chat, no manual searching.

✓ Reduces errors from outdated docs by using live API content.

✓ Keeps conversation context for clearer replies.

→ Easily extend or switch messaging platforms.

→ Works with your existing n8n and API setup.


Automate Confluence chatbot with n8n and AI agents

Visit through Desktop to Interact with the Workflow.

Frequently Asked Questions

The workflow uses the Confluence REST API Search and Pages endpoints with HTTP Request nodes to retrieve page metadata and full page content in storage format.
Users need a Confluence API token (combined with their email and base64-encoded), an OpenAI API key for GPT-4o-mini, and Telegram bot credentials (token and chat ID).
After importing the workflow, edit the Globals Set node and replace the example page ID strings with actual Confluence page IDs.
This happens when the AI prompt lacks proper Confluence page context. Fix by checking that the HTML to Markdown conversion passes correct content and that the AI prompt input uses the right content variable.

Promoted by BULDRR AI

Related Workflows

Automate Twist Channel Creation and Messaging with n8n

This workflow automates creating and updating a channel in Twist and sending a personalized message to specific users. It eliminates manual setup errors and saves time managing Twist communications.

Automate Ideogram Image Generation with Google Sheets & Gmail

This workflow automates graphic design image generation via Ideogram AI, storing image data in Google Sheets and Google Drive, with email alerts via Gmail. It saves designers hours by automating image creation, remixing, review, and record-keeping.

Automate IT Support with Slack and OpenAI in n8n

Streamline IT support by automating Slack message handling using n8n and OpenAI. This workflow handles Slack DMs, filters bots, queries a Confluence knowledge base, and delivers AI-generated responses, improving support efficiency and response time.

Automate Crypto Analysis with CoinMarketCap & n8n AI Agent

Discover how this unique n8n workflow leverages CoinMarketCap’s multi-agent AI to deliver precise, real-time cryptocurrency insights directly via Telegram. Manage crypto data analysis efficiently with automated multi-source API integration.

Automate Gumroad to Beehiiv Subscriber Sync with n8n

Learn how to automatically add new Gumroad sales customers as Beehiiv newsletter subscribers using n8n automation. This workflow saves time by syncing sales data to Google Sheets CRM and notifying your Telegram channel instantly.

Generate On-Brand Blog Articles Using n8n and OpenAI

This workflow automates the creation of on-brand blog articles by analyzing existing company content using n8n and OpenAI. It extracts article structures and brand voice to produce consistent draft articles, saving significant content creation time.
1:1 Free Strategy Session
Your competitors are already automating. Are you still paying for it manually?

Do you want to adopt AI Automation?

Every hour your team does repetitive work, you're burning real money.
While you wait, faster businesses are cutting costs and moving quicker.
AI and automations aren't the future anymore — they're the present.

Book a live 1-on-1 session where we show you exactly which of your daily tasks can be automated — and what it’s costing you not to.