Tutorials6 min read

n8n AI Agent Workflows — Connecting OpenAI and Claude to Your Business Tools

S

SNBD Host Team

July 13, 2026

Automation gets interesting when it can make decisions, not just move data. That's what n8n's AI agent nodes do — they let you drop an LLM (like OpenAI's GPT-4 or Anthropic's Claude) into the middle of any workflow, where it can read inputs, reason about them, and produce outputs that drive the rest of the automation.

This guide is aimed at Bangladesh business owners who already understand what ChatGPT is, but aren't sure how to connect it to their actual business operations. We'll build three practical workflows that you can adapt for your own business.

How n8n's AI Nodes Work

n8n has a set of dedicated AI nodes available under the "AI" category in the node panel. The key ones are:

  • AI Agent: A full reasoning agent that can use tools, call APIs, and loop until it completes a task
  • Basic LLM Chain: Sends a prompt to an LLM and returns the response — simpler, predictable
  • Chat Memory: Maintains conversation context across multiple exchanges
  • Vector Store nodes: For building RAG (retrieval-augmented generation) systems using your own data

For most business workflows, you'll use the Basic LLM Chain to send structured prompts and process responses. The AI Agent node is for more complex tasks where the LLM needs to decide what to do next.

Setting Up Your LLM Credentials

In n8n, go to Settings > Credentials. Add either:

  • OpenAI API: Paste your OpenAI API key. You'll need a paid OpenAI account — prices vary by model, but GPT-4o Mini at $0.15/million input tokens is very affordable for most business use cases.
  • Anthropic API: Paste your Anthropic API key to access Claude models. Claude 3.5 Haiku is fast and inexpensive for high-volume classification tasks.

Both providers charge per token (roughly per word). For most automation tasks — classifying an email, summarizing a support ticket, drafting a short reply — a single call costs a fraction of a cent. Running 10,000 automated classifications per month typically costs ৳500–৳1,500 in API fees depending on which model you use.

Workflow 1: Automated Support Email Categorization and Routing

If your business receives support emails in Bengali and English, manually routing them to the right team member is time-consuming. Here's an n8n workflow that does it automatically.

Trigger: Gmail/IMAP node polling your support inbox every 5 minutes

Step 1: Extract subject and body from the email

Step 2: Send to LLM Chain with this prompt:

You are a customer support classifier for a Bangladesh web hosting company.
Categorize this email into exactly one of: billing, technical, sales, abuse, other.
Reply with only the category name.

Email Subject: {{ $json.subject }}
Email Body: {{ $json.text }}

Step 3: Use a Switch node to route based on the LLM's response. "billing" goes to the billing team, "technical" goes to tech support, etc.

Step 4: Add to the appropriate Google Sheet or CRM, and send a Slack or Telegram notification to the relevant team member.

This workflow processes emails in seconds and routes them correctly more than 90% of the time. The remaining edge cases can be handled by a human review queue.

Workflow 2: AI-Powered Product Description Generator

For Bangladesh e-commerce sellers who need to list products in both Bengali and English, writing product descriptions is slow. This workflow automates it.

Trigger: New row added to a Google Sheet (your product upload template)

Columns in your sheet: Product Name, Category, Key Features (comma-separated), Target Price (BDT)

LLM Prompt:

Write a product listing for an online shop in Bangladesh.

Product: {{ $json['Product Name'] }}
Category: {{ $json['Category'] }}
Features: {{ $json['Key Features'] }}
Price: ৳{{ $json['Target Price'] }}

Write:
1. A 2-sentence Bengali description (natural, not translated)
2. A 2-sentence English description
3. 5 SEO-friendly tags

Format as JSON with keys: bengali_description, english_description, tags

After the LLM node: Parse the JSON response using n8n's JSON Parse node, then write the generated content back to the same Google Sheet row using the Google Sheets Update Row node.

A typical e-commerce seller adding 20 products per day saves 2-3 hours of writing time with this workflow. At ৳499/month for n8n hosting and maybe ৳200/month in API costs, the ROI is immediate.

Workflow 3: Customer Message Intent Detection + Auto-Response

This workflow connects to your WhatsApp or Facebook Messenger channel and handles common questions automatically.

Trigger: Webhook receiving incoming customer messages

AI Agent setup: Use the AI Agent node with a system prompt that describes your business:

You are a customer service agent for [Business Name], a Bangladesh-based online retailer.
You help customers with:
- Order status queries (you have access to the order lookup tool)
- Shipping information (standard: 2-3 days Dhaka, 4-5 days outside Dhaka)
- Return policy (7 days, unused items, customer bears return shipping)
- Payment methods accepted: bKash, Nagad, bank transfer, cash on delivery

If the customer asks something you cannot answer with confidence, say:
"I'll connect you with our team. Please expect a response within 2 hours."

Never make up information about specific orders without using the lookup tool.

Attach tools to the AI Agent node — you can define custom tool nodes that the agent can call, such as an HTTP Request to your order API. The agent will decide when to call the tool based on the customer's question.

Keeping Costs Predictable

AI API costs can surprise you if you're not careful. A few practices to keep bills manageable:

  • Use cheaper models (GPT-4o Mini, Claude 3.5 Haiku) for classification and simple tasks. Reserve expensive models for complex reasoning.
  • Set maximum token limits on your LLM nodes so a runaway prompt doesn't generate a large expensive response.
  • Add n8n's Wait node to avoid running AI workflows more frequently than needed — polling every 5 minutes instead of every 30 seconds reduces API calls by 10x.
  • Use n8n's built-in error handling to catch and log failures before they loop and rack up charges.

Running AI Workflows on a Reliable Server

AI agent workflows often involve multiple sequential API calls and can take 10-30 seconds to complete. This means your n8n instance needs to stay connected to the internet reliably throughout the entire execution chain. On a low-quality shared hosting server, dropped connections can break AI workflows mid-execution.

SNBD HOST's n8n hosting runs on dedicated VPS infrastructure with a BDIX connection, meaning you get stable, low-latency connectivity to both international APIs (OpenAI, Anthropic) and local Bangladeshi services. Plans start from ৳499/month with process monitoring included.

What's Possible Next

Once you're comfortable with basic LLM chains, look into:

  • RAG workflows: Upload your product catalog or FAQ to a vector store, then query it with customer questions so the AI answers from your actual data, not hallucinated information
  • Multi-step agents: Agents that browse web pages, extract data, and compile reports
  • Image analysis: Send product photos to GPT-4o Vision and extract attributes automatically

n8n's AI capabilities are expanding with every release. The architecture you set up today for email routing will scale to complex multi-agent pipelines as your automation needs grow.

n8nai agentsopenaiclaudeworkflow automationbangladesh
S

Written by

SNBD Host Team

The SNBD Host team shares hosting guides, automation tips, and business growth strategies for Bangladeshi entrepreneurs.

Share Article