Skip to main content

Wix chat auto-responder with OpenAI GPT and email fallback

Workflow preview

Workflow preview
100%
Wix chat auto-responder with OpenAI GPT and email fallback preview
Open on n8n.io

Important notice

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

1. Workflow Overview

Wix Chat Auto Responder with OpenAI GPT and Email Fallback This template connects Wix Chat with OpenAI via n8n to automate intelligent customer responses on your website only when no human has resp...

Best for

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

Tools used

n8n-nodes-base.webhook, n8n-nodes-base.httprequest, n8n-nodes-base.executeworkflow, n8n-nodes-base.emailsendtool, n8n-nodes-base.if, @n8n/n8n-nodes-langchain.agent, n8n-nodes-base.code, @n8n/n8n-nodes-langchain.lmchatopenai

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Ryan McMahan.

Original n8n.io source

1.1 Workflow description

Title
Wix chat auto-responder with OpenAI GPT and email fallback
Workflow name
Wix chat auto-responder with OpenAI GPT and email fallback

Wix Chat Auto-Responder with OpenAI GPT and Email Fallback

This template connects Wix Chat with OpenAI via n8n to automate intelligent customer responses on your website only when no human has responded recently. It uses smart throttling, checks for member vs. anonymous visitors, pulls chat history, and optionally alerts support staff via email if AI shouldn't reply.

Perfect for solopreneurs, agencies, or customer support teams looking to auto-handle conversations while maintaining a fallback system.

Key Features

  • 🔌 Connects Wix Chat API to n8n seamlessly
  • 🧠 Uses GPT-4 (via OpenAI) to auto-generate replies
  • 🧍‍♂️ Detects member vs. guest via webhook payload
  • 📬 Optional email alert to support staff if AI should not reply
  • ⏱️ Only responds if a human hasn't answered in the past 12 hours
  • ✂️ Splits long AI messages into chunks to fit Wix API constraints
  • 🧱 Modular & customizable—adapt for CRM, Slack, SMS, etc.

Requirements

  • Published Wix site with Wix Inbox enabled
  • Wix Developer App credentials (Client ID, Secret, Instance ID)
  • OpenAI API Key
  • Active n8n instance (self-hosted or cloud)
  • Working SMTP credentials (for fallback email alert)

Setup Instructions

1. Import the Workflow

Download and import the .json file into your n8n instance. All nodes should appear in the visual editor.

2. Rename Key Nodes (Recommended for Clarity)

Rename the following nodes for easier maintenance:

  • IfCheck Member vs Visitor
  • Execute WorkflowGenerate OAuth Token
  • Send EmailAlert Technician via Email

3. Configure OAuth for Wix API

In the node HTTP Request1, replace the placeholder values:

"client_id": "YOUR_WIX_APP_ID",
"client_secret": "YOUR_WIX_APP_SECRET",
"instance_id": "YOUR_WIX_INSTANCE_ID"

💡 You may move this to a separate workflow and call it using Execute Workflow.

4. Set Up the Webhook in Wix

  1. Copy the Webhook URL from the Webhook node.
  2. Go to your Wix dashboard:
    • Navigate to: Settings > Automations > Create New
    • Trigger: "When someone sends a message via chat"
    • Action: "Send a Webhook"
  3. Paste the n8n Webhook URL in the configuration.

5. Add Your OpenAI API Key

Open both OpenAI Chat Model1 and OpenAI Chat Model2 nodes:

  • Add your OpenAI credentials.
  • Adjust the model (e.g., GPT-4 or GPT-4o) and temperature as needed.

6. Customize Response Logic (Optional)

In the Code node labeled Response Throttle, modify:

const allowChat = true;
const allowEmail = false;
const humanResponseTimeWindow = 43200000; // 12 hours in ms

Change values to:

  • Disable chat or email
  • Modify the delay window before AI is allowed to respond

7. Set Up Email Fallback (Optional)

If human support is required, the workflow sends an email:

  • Add SMTP credentials in the Send Email node
  • Customize the message, or replace the node with Slack, webhook, or SMS alert

8. Test

  1. Open your Wix site in an incognito browser tab.
  2. Use the chat and monitor the bot's response.
  3. Check Executions in n8n to debug or verify the flow.

How to Customize

  • Trigger follow-up actions (e.g., Zapier, CRM sync) after AI response
  • Customize GPT prompt via AI Agent nodes
  • Prevent replies by channel (e.g., don’t reply via email)
  • Add filters for keywords, lead scoring, or VIP contacts with If or Code nodes

Includes

  • 1 Workflow JSON file
  • 🔐 OAuth2 logic (can be modularized into a separate workflow)
  • 📝 Sticky notes and comments to guide usage
  • ⚙️ Production-ready, extensible logic for any support stack

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 - Webhook

Type / Role
n8n-nodes-base.webhook - webhook
Config choices
Version 2

Block 2 - HTTP Request2

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 3 - Execute Workflow

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

Block 4 - Send Email

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

Block 5 - If

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 6 - HTTP Request3

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 7 - AI Agent1

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

Block 8 - HTTP Request4

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 9 - Code

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 10 - If1

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 11 - OpenAI Chat Model1

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

Block 12 - Loop Over Items

Type / Role
n8n-nodes-base.splitInBatches - splitInBatches
Config choices
Version 3

Block 13 - HTTP Request6

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 14 - Code5

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 15 - Window Buffer Memory1

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

Block 16 - End chat

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

Block 17 - Window Buffer Memory

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

Block 18 - AI Agent

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

Block 19 - HTTP Request5

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 20 - Code1

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 21 - If2

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 22 - Human reponse within last hour, END1

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

Block 23 - OpenAI Chat Model2

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

Block 24 - Loop Over Items1

Type / Role
n8n-nodes-base.splitInBatches - splitInBatches
Config choices
Version 3

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

3. Summary Table

Workflow Wix chat auto-responder with OpenAI GPT and email fallback
Complexity advanced
Nodes 32
Categories Support Chatbot, AI Chatbot
Author Ryan McMahan
Published 07 May 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/3925/3925.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 Wix chat auto-responder with OpenAI GPT and email fallback do?

Wix Chat Auto Responder with OpenAI GPT and Email Fallback This template connects Wix Chat with OpenAI via n8n to automate intelligent customer responses on your website only when no human has resp...

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.