Automate Chat Responses with OpenAI GPT and Serp API Integration

This workflow seamlessly integrates OpenAI GPT and Serp API to enhance your chat interactions by providing AI-driven responses based on real-time information. Ideal for AI-powered automation users, it requires 2 accounts: OpenAI API and Serp API. Save hours in customer engagement and provide instant, accurate information, boosting your response efficiency and customer satisfaction.

Chat Trigger
965,976 views5 nodesOct 2023Tom Wilson

Categories

Personal ProductivityAI Chatbot

AI Features

OpenAI GPTAI ChatAI Agent

Credentials

2 required

Quick Actions

Copy or download to import into your n8n instance

Workflow JSON
{
  "meta": {
    "instanceId": "408f9fb9940c3cb18ffdef0e0150fe342d6e655c3a9fac21f0f644e8bedabcd9",
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "ef4c6982-f746-4d48-944b-449f8bdbb69f",
      "name": "When chat message received",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "position": [
        -180,
        -380
      ],
      "webhookId": "53c136fe-3e77-4709-a143-fe82746dd8b6",
      "parameters": {
        "options": {}
      },
      "typeVersion": 1.1
    },
    {
      "id": "e6183978-5077-4252-9718-6b36b6a7cd74",
      "name": "Simple Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        160,
        -160
      ],
      "parameters": {},
      "typeVersion": 1.3
    },
    {
      "id": "1719e956-f9c8-48f5-9744-ee62345a9f7d",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        20,
        -160
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "8gccIjcuf3gvaoEr",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "f0815af7-da61-4863-9cfa-b35be836b59c",
      "name": "SerpAPI",
      "type": "@n8n/n8n-nodes-langchain.toolSerpApi",
      "position": [
        300,
        -160
      ],
      "parameters": {
        "options": {}
      },
      "credentials": {
        "serpApi": {
          "id": "aJCKjxx6U3K7ydDe",
          "name": "SerpAPI account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "2d3b4012-bd5f-46d5-be6d-af1ede6c155b",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        60,
        -380
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 1.8
    }
  ],
  "pinData": {},
  "connections": {
    "SerpAPI": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "When chat message received": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

Related Workflows

Automate WhatsApp Responses with OpenAI GPT and Vector Store

Streamline your customer interactions by automating WhatsApp responses using the WhatsApp Business API and OpenAI GPT. This workflow integrates AI Chat capabilities with advanced Vector Storage and AI Embeddings, making it perfect for AI-powered automation users. Requires 3 accounts: WhatsApp Trigger API, OpenAI API, and WhatsApp Business API. Save hours on customer queries and boost engagement, handling 100+ interactions effortlessly.

378,376 views
Lead NurturingAI Chatbot

Automate Customer Interactions with OpenAI GPT Chat Agent

Streamline your customer engagement by automating interactions using the OpenAI GPT API and AI Chat features. This workflow connects chat triggers to an AI Agent, enabling seamless, intelligent responses to user inquiries. Perfect for AI-powered automation users looking to enhance customer experience. Requires 1 account: OpenAI API. Save hours of manual responses and boost customer satisfaction by handling multiple queries simultaneously.

244,798 views
EngineeringAI Chatbot

Automate RSS Feed Analysis with Google Gemini & AI Agent

Streamline your RSS feed monitoring by leveraging Google Gemini and AI Agent for real-time insights. This workflow reads RSS feeds, processes data through HTTP requests, and engages in AI chat for interactive analysis. Perfect for developers and integrators. Requires 0 accounts. Save hours weekly by automating data collection and enhancing decision-making with intelligent insights.

214,116 views
Personal ProductivityAI Chatbot

Automate Telegram Responses with OpenAI GPT Integration

Leverage the power of the Telegram Bot API and OpenAI GPT to automate intelligent conversations on Telegram. This workflow is designed for AI-powered automation users looking to enhance engagement through AI-driven responses. Requires 2 accounts: Telegram Bot Token and OpenAI API Key. Save hours of manual replies and improve user interaction with dynamic, context-aware responses instantly.

190,488 views
Support ChatbotAI Chatbot

How to Use This Workflow

1Import to n8n

  1. Copy the JSON using the button above
  2. Open your n8n instance
  3. Click “Import workflow” or press Ctrl+V
  4. Paste the JSON and click “Import”

2Before Running

Configure credentials and update service-specific settings before executing the workflow. Review required credentials in the Technical Details section above.

966.0K