AutomationFlowsAI & RAG › WhatsApp AI Response via OpenAI

WhatsApp AI Response via OpenAI

Original n8n title: Modelo Whatsapp

Modelo WhatsApp. Uses openAi, httpRequest. Webhook trigger; 5 nodes.

Webhook trigger★★★★☆ complexityAI-powered5 nodesOpenAIHTTP Request
AI & RAG Trigger: Webhook Nodes: 5 Complexity: ★★★★☆ AI nodes: yes Added:

This workflow follows the HTTP Request → OpenAI recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "name": "Modelo WhatsApp",
  "nodes": [
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "{{session_id}}",
        "options": {}
      },
      "id": "webhook-node",
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [
        1360,
        580
      ]
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "name": "nome",
              "value": "={{ $json.body.data.pushName }}"
            },
            {
              "name": "celular",
              "value": "={{ $json.body.data.key.remoteJid }}"
            },
            {
              "name": "mensagem",
              "value": "={{ $json.body.data.message.conversation }}"
            },
            {
              "name": "idcliente",
              "value": "={{ $json.body.data.key.id }}"
            }
          ]
        }
      },
      "id": "set-node-entrada",
      "name": "Dados vindos Whatsapp",
      "type": "n8n-nodes-base.set",
      "typeVersion": 1,
      "position": [
        1620,
        580
      ]
    },
    {
      "parameters": {
        "resource": "assistant",
        "assistantId": {
          "__rl": true,
          "value": "{{assistant_id}}",
          "mode": "id"
        },
        "prompt": "define",
        "text": "={{ $json.body.data.message.conversation }}",
        "options": {}
      },
      "id": "openai-node",
      "name": "OpenAI",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "typeVersion": 1,
      "position": [
        1860,
        580
      ],
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "name": "mensagem",
              "value": "={{ $json.output }}"
            }
          ]
        }
      },
      "id": "set-node-saida",
      "name": "Dados vindos OpenAI",
      "type": "n8n-nodes-base.set",
      "typeVersion": 1,
      "position": [
        2260,
        580
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://wsapi.guarumidia.com/message/sendText/{{session_id}}",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendBody": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "number",
              "value": "={{ $('Dados vindos Whatsapp').item.json.body.data.key.remoteJid }}"
            },
            {
              "name": "text",
              "value": "={{ $json.output }}"
            }
          ]
        },
        "options": {
          "response": {
            "response": {
              "fullResponse": true,
              "neverError": true
            }
          }
        }
      },
      "id": "http-node",
      "name": "Envia para WhatsApp",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        2480,
        580
      ],
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      }
    }
  ],
  "connections": {
    "Webhook": {
      "main": [
        [
          {
            "node": "Dados vindos Whatsapp",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Dados vindos Whatsapp": {
      "main": [
        [
          {
            "node": "OpenAI",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI": {
      "main": [
        [
          {
            "node": "Dados vindos OpenAI",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Dados vindos OpenAI": {
      "main": [
        [
          {
            "node": "Envia para WhatsApp",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  }
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

Modelo WhatsApp. Uses openAi, httpRequest. Webhook trigger; 5 nodes.

Source: https://github.com/daniel3g/atenderme/blob/9cbb20602d54ae378054701c1c06d7ec44493a2b/src/assets/WhatsApp_modelo.json — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

This powerful n8n automation workflow is designed to execute advanced B2B lead enrichment and hyper-personalization for cold email outreach. By orchestrating a complex chain of data scraping, AI analy

OpenAI, HTTP Request, Airtable
AI & RAG

Eu Clara – Funil Kiwify Completo. Uses postgres, openAi, httpRequest, gmail. Webhook trigger; 70 nodes.

Postgres, OpenAI, HTTP Request +1
AI & RAG

This workflow bridges the gap between raw product data and revenue sales tools. It automates the entire Product Qualified Lead (PQL) lifecycle—from real-time intent routing to churn prevention—reducin

HTTP Request, Anthropic, OpenAI
AI & RAG

Lua Nova - Sistema Completo. Uses postgres, httpRequest, openAi. Webhook trigger; 55 nodes.

Postgres, HTTP Request, OpenAI
AI & RAG

User Signup & Verification: The workflow starts when a user signs up. It generates a verification code and sends it via SMS using Twilio. Code Validation: The user replies with the code. The workflow

Postgres, HTTP Request, OpenAI +2