Skip to main content

Automate WooCommerce customer support with Gemini & GPT via Telegram & Gmail

Workflow preview

Workflow preview
100%
Automate WooCommerce customer support with Gemini & GPT via Telegram & Gmail preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

AI Support Bot for WooCommerce with Gemini & GPT (Telegram & Gmail) Managing customer support across multiple platforms like email and chat can be a huge time sink. Answering the same questions ...

Best for

  • Support Chatbot automation workflows
  • AI Chatbot automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.merge, n8n-nodes-base.woocommercetool, n8n-nodes-base.telegramtrigger, n8n-nodes-base.gmailtrigger, @n8n/n8n-nodes-langchain.lmchatgooglegemini, @n8n/n8n-nodes-langchain.lmchatopenai, @n8n/n8n-nodes-langchain.memorybufferwindow, n8n-nodes-base.set

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by AppStoneLab Technologies LLP.

Original n8n.io source

1.1 Workflow description

Title
Automate WooCommerce customer support with Gemini & GPT via Telegram & Gmail
Workflow name
Automate WooCommerce customer support with Gemini & GPT via Telegram & Gmail

๐Ÿค– AI Support Bot for WooCommerce with Gemini & GPT (Telegram & Gmail)

Managing customer support across multiple platforms like email and chat can be a huge time sink. Answering the same questions about order status repeatedly takes your focus away from growing your business. This workflow solves that problem by deploying a 24/7 conversational AI agent to act as your first line of support for your WooCommerce store.

This AI-powered bot can handle customer inquiries from both Telegram and Gmail, understand conversational follow-ups, and use a tool to fetch live order data directly from your WooCommerce store. It's designed to be reliable, with a primary/fallback AI model setup, and robust enough to prevent the common pitfalls of email automation like infinite reply loops.

How It Works โš™๏ธ

The workflow operates in a clear, logical sequence:

  1. ๐Ÿ“ข Multi-Channel Ingestion: The workflow starts when it receives a message from one of two sources:

    • Telegram: An instant webhook trigger fires for every new message.
    • Gmail: A polling trigger checks your inbox every minute for new, unread emails.
  2. ๐Ÿ’Ž Data Normalization: All incoming requests are merged and processed by a Set node. This crucial step transforms the platform-specific data into a universal format that the rest of the workflow can understand (e.g., platform, sender_id, query_text).

  3. ๐Ÿง  AI Processing: The standardized query is sent to a LangChain Agent. This agent is the "brain" of the operation. It uses Conversational Memory to understand the context of the conversation (like when a user provides an order ID in a follow-up message).

  4. ๐Ÿ› ๏ธ Tool Usage: Based on its prompt, the AI Agent determines if it has enough information to use its one available tool: Get an order in WooCommerce. If a valid Order ID is present, it calls the tool to fetch live order details.

  5. ๐Ÿ“ฎ Response & Routing: The agent formulates a natural language response. A Switch node then inspects the platform field and routes the response to the correct channel.

  6. โœ… Cleanup: For the Gmail path, two final actions occur in parallel: the reply is sent, and the original incoming email is marked as 'Read'. This is a critical step to prevent the workflow from re-triggering on the same email in an infinite loop.

Nodes Used ๐Ÿ”—

This workflow uses a combination of standard nodes and AI nodes to achieve its goal:

  • Telegram Trigger: To receive messages from Telegram in real-time.
  • Gmail Trigger: To poll for new unread emails.
  • Merge: To combine inputs from multiple triggers.
  • Set: To normalize data into a consistent format.
  • LangChain Agent: The core AI "brain" that orchestrates the logic, memory, and tools.
  • Google Gemini & OpenAI: Used as the primary and fallback language models for the agent.
  • WooCommerce Tool: The tool the AI agent uses to fetch order data.
  • Switch: To route the final reply to the correct platform.
  • Telegram: To send the final response to Telegram.
  • Gmail: To reply to emails and mark them as read.

Prerequisites ๐Ÿ”‘

To use this workflow, you will need:

  • An active n8n instance (self-hosted or cloud).
  • A Telegram Bot account and its API token.
  • A Gmail account with OAuth2 credentials configured in n8n.
  • A WooCommerce store with API credentials (Consumer Key and Secret).
  • An OpenAI API key.
  • A Google AI (Gemini) API key.

Usage ๐Ÿš€

Follow these steps to set up the workflow:

  1. Download the Workflow: Import the workflow JSON file into your n8n instance.

  2. Configure Credentials:

    • Telegram: Select your Telegram API credentials in the Fetch user query and Send Telegram Response nodes.

    • Gmail: Select your Gmail OAuth2 credentials in the Fetch support mail, Send Response via Mail, and Mark received mail as read nodes.

    • WooCommerce: Select your WooCommerce API credentials in the Get an order in WooCommerce node.

    • AI Models: Select your OpenAI and Google AI credentials in the Fallback Model and Primary Model nodes, respectively.

  3. Activate Telegram Webhook:

    • Open the Fetch user query (Telegram Trigger) node.
    • Copy the Webhook URL.
    • Register this URL with your Telegram bot using the /setWebhook command in the BotFather chat.
  4. Customize AI Prompt (Optional):

    • Open the WooCommerce Customer support Agent1 node.
    • You can edit the prompt in the Text field to change the AI's personality, rules, or language.
  5. Activate the Workflow: Save the workflow and toggle the "Active" switch ON. Your multi-channel AI support agent is now live! Send a message to your Telegram bot or a new, unread email to your connected Gmail account to test it out.

Resources ๐Ÿ“š

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Merge

Type / Role
n8n-nodes-base.merge - merge
Config choices
Version 3.2

Block 2 - Get an order in WooCommerce

Type / Role
n8n-nodes-base.wooCommerceTool - wooCommerceTool
Config choices
Version 1

Block 3 - Fetch user query

Type / Role
n8n-nodes-base.telegramTrigger - telegramTrigger
Config choices
Version 1.2

Block 4 - Fetch support mail

Type / Role
n8n-nodes-base.gmailTrigger - gmailTrigger
Config choices
Version 1.2

Block 5 - Primary Model [Gemini 2.5 Flash]

Type / Role
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - lmChatGoogleGemini
Config choices
Version 1

Block 6 - Fallback Model [GPT 4.1 mini]

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.2

Block 7 - Conversation Memory

Type / Role
@n8n/n8n-nodes-langchain.memoryBufferWindow - memoryBufferWindow
Config choices
Version 1.3

Block 8 - Set Manual Fields

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 9 - Reply to Specific Platform

Type / Role
n8n-nodes-base.switch - switch
Config choices
Version 3.2

Block 10 - Send Telegram Response

Type / Role
n8n-nodes-base.telegram - telegram
Config choices
Version 1.2

Block 11 - Send Response via Mail

Type / Role
n8n-nodes-base.gmail - gmail
Config choices
Version 2.1

Block 12 - Mark received mail as read

Type / Role
n8n-nodes-base.gmail - gmail
Config choices
Version 2.1

Block 13 - WooCommerce Customer support Agent1

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 2.2

Block 14 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 15 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 16 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 17 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 18 - Sticky Note4

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 19 - Sticky Note5

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 20 - Sticky Note6

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 21 - Sticky Note7

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 22 - Sticky Note8

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 23 - Sticky Note9

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 24 - Sticky Note10

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Showing the first 24 of 25 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Automate WooCommerce customer support with Gemini & GPT via Telegram & Gmail
Complexity advanced
Nodes 25
Categories Support Chatbot, AI Chatbot
Author AppStoneLab Technologies LLP
Published 06 Aug 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/7037/7037.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Automate WooCommerce customer support with Gemini & GPT via Telegram & Gmail do?

AI Support Bot for WooCommerce with Gemini & GPT (Telegram & Gmail) Managing customer support across multiple platforms like email and chat can be a huge time sink. Answering the same questions ...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Support Chatbot, AI Chatbot use case.