Build A Complete WhatsApp AI Assistant With N8n Ready To Use Workflow

July 8, 2025

Develop a WhatsApp AI agent customised for your company that can interpret customer communications through text, voice, and visuals, responding in both written and spoken formats

Using this guide, you can deploy a fully operational AI assistant with multimedia capabilities on your system or cloud infrastructure within minutes. This assistant will serve as a digital customer service representative tailored to specific business needs.

Discover Flows! The new Wassenger feature to automate your messages

Table of Contents

  • Introduction
  • Setup
  • Personalization
  • Multimedia processing implementation: Text
  • Multimedia processing implementation: Voice
  • Multimedia processing implementation: Pictures
  • RAG (Retrieval-Augmented Generation) Integration
  • Launch and Testing

🤩 🤖 Wassenger provides a comprehensive API platform for WhatsApp. Register for a 7-day complimentary trial and begin immediately!

In this guide, you’ll discover how to build a ChatGPT-driven WhatsApp assistant that can:

  • Handle and reply to written messages with contextual and precise responses
  • Convert and analyze voice recordings to deliver suitable responses
  • Analyze and extract data from pictures to create relevant responses
  • Manage combinations of these input formats in seamless conversations

We’ll utilise Wassenger’s built-in Flows feature (powered by n8n), the Wassenger API for WhatsApp connectivity, and the OpenAI API (ChatGPT) to provide our assistant with sophisticated natural language processing and multimedia understanding capabilities.

Upon completing this guide, you’ll possess a completely operational WhatsApp assistant that can comprehend and respond to customer inquiries regardless of their presentation format, substantially enhancing user experience and customer service effectiveness.

🤩 🤖 Wassenger provides a comprehensive API platform for WhatsApp with built-in Flows (workflow automation) functionality. Register for a 7-day complimentary trial and begin immediately!

Let’s begin with setting up our multimedia WhatsApp assistant using Wassenger’s integrated Flows feature.

Requirements

  • Wassenger account with Flows feature access: Register at no cost to obtain API access and workflow automation capabilities
  • WhatsApp number: Minimum one WhatsApp number linked to Wassenger
  • OpenAI API credentials: available from here
  • Google Account

Important! 💬 Wassenger’s Flows feature provides built-in workflow automation powered by n8n technology, eliminating the need for self-hosting or separate n8n platform setup. Everything runs directly within Wassenger’s platform!

Now, let’s build our new AI Assistant! 🤖

Setup

1. Access Wassenger Flows Feature

In your Wassenger dashboard, navigate to the ‘Flows’ section to access the built-in workflow automation feature powered by n8n technology.

🤩 🤖 Wassenger provides a comprehensive API platform for WhatsApp with built-in Flows (workflow automation) functionality. Register for a 7-day complimentary trial and begin immediately!

2. Set up the Wassenger Trigger

Now that we’re within Wassenger’s Flows interface, we’ll establish the trigger as follows:

  • Select ‘Add first step’
  • Search for ‘Wassenger Trigger’ (already integrated within the platform)
  • Choose the ‘On new inbound message received’ trigger
  • A window similar to this will appear

Since you’re working within Wassenger’s platform, the API credentials are automatically configured for your account.

3. Configure your Flow Trigger

Since you’re using Wassenger’s built-in Flows feature, the webhook configuration is automatically handled within the platform. Simply:

  • Select the WhatsApp number you want to monitor for incoming messages

  • Choose the message types you want to process (text, audio, images)

  • The system will automatically route messages to your Flow

🤩 🤖 Wassenger provides a comprehensive API platform for WhatsApp with built-in Flows (workflow automation) functionality. Register for a 7-day complimentary trial and begin immediately!

4. Build a module that identifies text, voice and pictures

First, select ‘Test step’ to receive incoming message data to your Wassenger Flow for management and processing:

After sending a message to your connected WhatsApp number, you’ll observe something similar to this:

Now we can begin working with the retrieved data

Let’s build a ‘Switch’ module within the Flows interface

We’ll then establish three potential scenarios and include a defined expression that will sort different message types

  • Text: {{ $json.data.type }}
  • Voice: {{ $json.data.media.type }}
  • Image: {{ $json.data.media.type }}

5. Include the AI Agent

We’ll now add the AI Agent module that will assist us in analysing all incoming messages and creating outgoing responses

Click on the bottom node from the ‘Switch’ module

The following window will appear.

We’ll proceed with this configuration:

  • Source for Prompt (User Message): DEFINE BELOW
  • Prompt (User Message): {{ $json.data.body }}

🤩 🤖 Wassenger provides a comprehensive API platform for WhatsApp with built-in Flows (workflow automation) functionality. Register for a 7-day complimentary trial and begin immediately!

6. Link the OpenAI chat Model

A window like this will appear, and you’ll insert your OpenAI credentials

Create an OpenAI account and locate your credentials here

Then add it to your Wassenger Flow

We’ll now add a system message to provide the AI with additional instructions, including who the AI is communicating with (Customer) and the exact conversation time:

You are a helpful assistant named Sam.Respond with a friendly and kind tone.
You are currently speaking with {{ $('Switch').item.json.data.chat.name }}
The current time is {{ $now.toISO() }}

🤩 🤖 Wassenger provides a comprehensive API platform for WhatsApp. Register for a 7-day complimentary trial and begin immediately!

7. Include the memory node

The Memory node enables an AI model to recall and reference previous interactions, requiring no credentials since it’s stored within n8n

  • Extend the ‘Context Window Length’ to 20
  • Define the Session ID as defined below
  • Change the field to Expression and add: {{ $(‘Switch’) }}

8. Build the Voice messages flow

Next, we’ll set up how our bot will analyse and handle voice messages sent by our customers. Let’s begin!

As shown in the image below, the process includes 4 primary steps:

  1. Retrieve the voice message from the Wassenger API
  2. Create the download file from an HTTP request
  3. Convert the voice message using AI
  4. Send this converted text to our AI agent

Let’s retrieve the voice message from Wassenger.

Search for Wassenger > Chat Files Download File

Configure the following:

  • Add your Wassenger account
  • Select Chat Files as Resource
  • Operation: Get File Details
  • WhatsApp Number: {{ $json.device.id }}
  • File ID: {{ $json.data.media.id }}

Next, we’ll add an HTTP module to retrieve the file

Configure the module as follows:

  • Method: GET
  • URL: https://api.wassenger.com{{ $('Wassenger Trigger').item.json.data.media.links.download }}
  • Authentication: Generic Credential Type
  • Generic Auth Type: Header Auth
  • Header Auth: Use your Wassenger API credentials (automatically available in Flows)

Then, we’ll add:

  • Name: Token
  • Value: Your Wassenger API token (accessible directly within the Flows platform)

🤩 🤖 Wassenger provides a comprehensive API platform for WhatsApp. Register for a 7-day complimentary trial and begin immediately!

Now, we’ll add the OpenAI module that converts the voice message

Search for: New module > Advanced AI > OpenAI > Transcribe a recording

Then, configure the module:

Finally, we’ll send the converted voice message to our AI agent using the SET module

And configure it:

  • Mode: Manual Mapping
  • Fields to Set: data.bodyas String and {{ $json.text }}

Now our Voice conversion is ready!

9. Process images

For our BOT to analyse images, we’ll execute a process similar to voice messages. Let’s examine it

From the Switch module, add a new Wassenger Download Media module

Configure the following:

  • Add your Wassenger account
  • Select Chat Files as Resource
  • Operation: Get File Details
  • WhatsApp Number: {{ $json.device.id }}
  • File ID: {{ $json.data.media.id }}

Next, let’s retrieve the image using the HTTP module as we did previously with voice messages

  • Method: GET
  • URL: https://api.wassenger.com{{ $('Wassenger Trigger').item.json.data.media.links.download }}
  • Authentication: Generic Credential Type
  • Generic Auth Type: Header Auth
  • Header Auth: Use your Wassenger API credentials (automatically available in Flows)

🤩 🤖 Wassenger provides a comprehensive API platform for WhatsApp. Register for a 7-day complimentary trial and begin immediately!

Now, we’ll add the OpenAI module that processes the image

Search for: New module > Advanced AI > OpenAI > Analyze image

And configure the module as follows:

  • Credential to connect with: OpenAI account (Set the credentials mentioned earlier)
  • Resource: Image
  • Operation: Analyse Image
  • Model: CHATGPT-4O-LATEST
  • Text input: Analyse the image
  • Input Type: Binary File(s)
  • Input Data Field Name: data

Finally, add the SET module to transfer all information to our AI agent

And configure it:

  • Mode: Manual Mapping
  • Fields to Set: data.bodyas String and
# The user submitted the following image and text.
## Image Description:
{{ $json.content }}

Perfect! We now have three potential scenarios for our bot to process text, voice, and images

Now let’s set up how we want our bot to respond based on the message type it receives

10. Build the Voice response

From our AI Agent module, let’s add a new module called ‘IF’. This will help us modify our response depending on the message type received.

For setup, we’ll establish a value of ‘true’ or ‘false’ depending on whether the received message is a voice message or an image/text. For voice messages, we’ll respond with a different voice message, but this configuration can be adjusted to your preference. The options are unlimited!

Conditions: {{ $(‘Switch’).item.json.data.media.type }}is equal to audio

Now, we’ll create the voice response flow, starting by adding the OpenAI module to produce audio:

Add nodes > Advanced AI > OpenAI > Generate Audio

And configure it like this:

  • Credential to connect with: OpenAI account (Set the credentials mentioned earlier)
  • Resource: Audio
  • Operation: Generate Audio
  • Model: TTS-1
  • Text input (Expression): {{ $('AI Agent').item.json.output }}
  • Voice: Select your preference

For WhatsApp to recognise our generated audio, we need to convert it from audio/mp3 to audio/mpeg using a simple script provided below:

Create a new Code module

  1. Configure it with the following JavaScript code:
// Loop over input items and change the MIME type of binary data
for(const item of $input.all()) {
// Check if the item has binary data
if(item.binary) {
// Find the binary property name(assuming there's at least one)
const binaryPropertyNames = Object.keys(item.binary);
for(const propName of binaryPropertyNames) {
// If the MIME type is 'audio/mp3', change it to 'audio/mpeg'
if(item.binary[propName].mimeType === "audio/mp3") {
item.binary[propName].mimeType = "audio/mpeg";
}
}
}
}
return $input.all();

Once our audio is converted to the proper format for sending through Wassenger, we need to store it locally or in the cloud. Here, we’ll use the cloud, providing us with a public URL so this file can be sent through the Wassenger API. For this tutorial, we selected Google Drive, but you can use any platform that works best for you.

Create a new module for Google Drive (Upload File)

  1. Configure all Google credentials within Wassenger Flows

If you don’t know how to connect your Google account to Wassenger Flows, watch this tutorial

  1. In the File Name, we’ll add the following expression: {{ $json.fineName }}
  2. Set the Parent Drive as My Drive
  3. For the Parent Folder, we need to create a new folder within our Drive

Then, make that folder public to be accessible from Wassenger Flows. If you don’t make the folder public, the API call will return unauthorised access

🤩 🤖 Wassenger provides a comprehensive API platform for WhatsApp. Register for a 7-day complimentary trial and begin immediately!

Now, we’ll create a Send Multimedia Message module with Wassenger to send the newly generated audio extracted from the URL provided by Google Drive

Configure the module:

  • Define the number from which you want to send the message
  • Set the target number retrieved from the webhook data we configured initially: {{ $(‘Switch’).item.json.data.fromNumber }}
  • Set the file URL: {{ $json.webContentLink }}

Finally, we’ll remove our file from Google Drive to avoid storing too many files in our cloud and running out of storage. This step is optional. If you want to keep all generated audio files, you can do so, but you’ll need to add a variable to name the audio files to prevent errors.

Set the file ID to be removed: {{ $(‘Google Drive’).item.json.id }}

🤩 🤖 Wassenger is a complete API solution for WhatsApp. Sign up for a 7-day free trial and get started in minutes!

11. Build the Text response

Now that we have our Voice generator, we’ll create our text message generator, which will execute from the IF module and will handle cases where users send us images (The bot will analyse the message with the image and return text) or when they send us simple text messages

From the IF, add a new module

And configure the module:

  • Credentials to connect with: Wassenger Key account
  • Resource: Send Message
  • Operation: Send Text Message
  • WhatsApp number: Your Connected Number
  • Target: Phone
  • Target: {{ $(Wassenger Trigger’).item.json.data.fromNumber }}`
  • Message: {{ $json.output }}

And there it is! Our bot is completely configured! Now we can test the workflow to confirm everything is functioning correctly.

Get the full workflow here!

{
  "name": "WhatsApp Agent Pro",
  "nodes": [
    {
      "parameters": {
        "device": "[DEVICE_ID_HIDDEN]",
        "events": ["message:in:new"]
      },
      "type": "n8n-nodes-wassenger.wassengerTrigger",
      "typeVersion": 1,
      "position": [380, 240],
      "id": "3e55c9a4-ca16-4fb5-8d6a-220b8ad01c9d",
      "name": "Wassenger Trigger",
      "webhookId": "[WEBHOOK_ID_HIDDEN]",
      "credentials": {
        "wassengerApiKey": {
          "id": "[CREDENTIAL_ID_HIDDEN]",
          "name": "WhatsApp API key"
        }
      }
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "={{ $json.data.body }}",
        "options": {
          "systemMessage": "=You are a helpful assistant called Sam.Responde with a frendly and kinkd tone.\n\nYou are currently talking to {{ $('Switch').item.json.data.chat.name }}\n\nThe current time is {{ $now.toISO() }} "
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 1.8,
      "position": [2700, 260],
      "id": "41d0158b-ef6b-43ab-9c46-bad27fcac028",
      "name": "AI Agent"
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini"
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.2,
      "position": [2640, 460],
      "id": "87e73037-c99f-42a6-86eb-e49015c0ad8c",
      "name": "OpenAI Chat Model",
      "credentials": {
        "openAiApi": {
          "id": "[OPENAI_CREDENTIAL_ID_HIDDEN]",
          "name": "OpenAi account"
        }
      }
    },
    {
      "parameters": {
        "device": "[DEVICE_ID_HIDDEN]",
        "phone": "={{ $('Wassenger Trigger').item.json.data.fromNumber }}",
        "message": "={{ $json.output }}",
        "options": {}
      },
      "type": "n8n-nodes-wassenger.wassenger",
      "typeVersion": 1,
      "position": [3540, 420],
      "id": "f9b6dbd2-0494-441d-9993-2180259473c5",
      "name": "Wassenger",
      "credentials": {
        "wassengerApiKey": {
          "id": "[CREDENTIAL_ID_HIDDEN]",
          "name": "WhatsApp API key"
        }
      }
    },
    {
      "parameters": {
        "rules": {
          "values": [
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "leftValue": "={{ $json.data.media.type }}",
                    "rightValue": "audio",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "id": "94a56d29-cb88-4eb0-8d6b-07b1b91bfc3f"
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "Voice message"
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "id": "e14c0da3-f892-46c2-af90-c81c963a0df5",
                    "leftValue": "={{ $json.data.media.type }}",
                    "rightValue": "image",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "Image message"
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "id": "6ce0d87f-bdfc-4c65-a3fb-8d86bb682c4e",
                    "leftValue": "={{ $json.data.type }}",
                    "rightValue": "text",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "Text message"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.switch",
      "typeVersion": 3.2,
      "position": [1120, 240],
      "id": "3961ea74-1586-444b-9796-44f911fc8790",
      "name": "Switch"
    },
    {
      "parameters": {
        "resource": "chat-files",
        "operation": "getDeviceFileDetails",
        "device": "={{ $json.device.id }}",
        "fileId": "={{ $json.data.media.id }}"
      },
      "type": "n8n-nodes-wassenger.wassenger",
      "typeVersion": 1,
      "position": [1660, -160],
      "id": "8e5f176a-62fd-4067-b7be-fd4e611d8e41",
      "name": "Download Audio",
      "credentials": {
        "wassengerApiKey": {
          "id": "[CREDENTIAL_ID_HIDDEN]",
          "name": "WhatsApp API key"
        }
      }
    },
    {
      "parameters": {
        "url": "=https://api.wassenger.com{{ $('Wassenger Trigger').item.json.data.media.links.download }}",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [1880, -160],
      "id": "5f99188d-8cf2-46d4-a756-790e7f34c74e",
      "name": "Download Audio1",
      "credentials": {
        "httpHeaderAuth": {
          "id": "[HTTP_AUTH_CREDENTIAL_ID_HIDDEN]",
          "name": "Header Auth account"
        }
      }
    },
    {
      "parameters": {
        "resource": "audio",
        "operation": "transcribe",
        "binaryPropertyName": "=data",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "typeVersion": 1.8,
      "position": [2100, -160],
      "id": "3c455966-a4b7-4108-84e0-84e416ca6bdf",
      "name": "Audio transcription",
      "credentials": {
        "openAiApi": {
          "id": "[OPENAI_CREDENTIAL_ID_HIDDEN]",
          "name": "OpenAi account"
        }
      }
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "4aeaa661-b3e8-4587-851e-dac366a37d0c",
              "name": "data.body",
              "value": "={{ $json.text }}",
              "type": "string"
            }
          ]
        },
        "includeOtherFields": "=",
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [2320, -160],
      "id": "8b274388-06dc-4edf-94eb-084f3abf2851",
      "name": "Edit Fields"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "13087e41-3b49-4b44-96ed-5ff74651c371",
              "leftValue": "={{ $('Switch').item.json.data.media.type }}",
              "rightValue": "audio",
              "operator": {
                "type": "string",
                "operation": "equals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [3200, 260],
      "id": "1c8d7147-9e91-4e76-b96d-9d88b5220aae",
      "name": "If"
    },
    {
      "parameters": {
        "sessionIdType": "customKey",
        "sessionKey": "={{ $('Switch') }}"
      },
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "typeVersion": 1.3,
      "position": [2820, 460],
      "id": "ce935651-35bc-4caf-bdd2-a84ad509d3fc",
      "name": "Simple Memory"
    },
    {
      "parameters": {
        "resource": "audio",
        "input": "={{ $('AI Agent').item.json.output }}",
        "voice": "nova",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "typeVersion": 1.8,
      "position": [3540, 160],
      "id": "2888d451-832d-44f6-93ca-b3a9342cb9ad",
      "name": "OpenAI",
      "credentials": {
        "openAiApi": {
          "id": "[OPENAI_CREDENTIAL_ID_HIDDEN]",
          "name": "OpenAi account"
        }
      }
    },
    {
      "parameters": {
        "jsCode": "// Loop over input items and change the MIME type of binary data\nfor(const item of $input.all()) {\n // Check if the item has binary data\n if(item.binary) {\n // Find the binary property name(assuming there's at least one)\n const binaryPropertyNames = Object.keys(item.binary);\n\n for(const propName of binaryPropertyNames) {\n // If the MIME type is 'audio/mp3', change it to 'audio/mpeg'\n if(item.binary[propName].mimeType === \"audio/mp3\") {\n item.binary[propName].mimeType = \"audio/mpeg\";\n }\n }\n }\n}\n\nreturn $input.all();"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [3760, 160],
      "id": "f2a0b34a-ec2e-4984-9c5c-8bc3ed823d95",
      "name": "Code"
    },
    {
      "parameters": {
        "name": "={{ $json.fileName }}",
        "driveId": {
          "__rl": true,
          "value": "My Drive",
          "mode": "list",
          "cachedResultName": "My Drive",
          "cachedResultUrl": "https://drive.google.com/drive/my-drive"
        },
        "folderId": {
          "__rl": true,
          "value": "[GOOGLE_DRIVE_FOLDER_ID_HIDDEN]",
          "mode": "list",
          "cachedResultName": "n8n whatsapp audios",
          "cachedResultUrl": "[GOOGLE_DRIVE_FOLDER_URL_HIDDEN]"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleDrive",
      "typeVersion": 3,
      "position": [3980, 160],
      "id": "bfff5e16-8ebd-40bd-91f9-b9ab8b572e54",
      "name": "Google Drive",
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "[GOOGLE_DRIVE_CREDENTIAL_ID_HIDDEN]",
          "name": "Google Drive account"
        }
      }
    },
    {
      "parameters": {
        "operation": "sendMedia",
        "device": "[DEVICE_ID_HIDDEN]",
        "phone": "={{ $('Switch').item.json.data.fromNumber }}",
        "mediaUrl": "={{ $json.webContentLink }}",
        "options": {}
      },
      "type": "n8n-nodes-wassenger.wassenger",
      "typeVersion": 1,
      "position": [4200, 160],
      "id": "02d42a3e-c444-409f-a20b-2ad4c48b723e",
      "name": "Wassenger1",
      "credentials": {
        "wassengerApiKey": {
          "id": "[CREDENTIAL_ID_HIDDEN]",
          "name": "WhatsApp API key"
        }
      }
    },
    {
      "parameters": {
        "operation": "deleteFile",
        "fileId": {
          "__rl": true,
          "value": "={{ $('Google Drive').item.json.id }}",
          "mode": "id"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleDrive",
      "typeVersion": 3,
      "position": [4420, 160],
      "id": "dcd55245-6092-4599-bea9-03e1faf06c6a",
      "name": "Google Drive1",
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "[GOOGLE_DRIVE_CREDENTIAL_ID_HIDDEN]",
          "name": "Google Drive account"
        }
      }
    },
    {
      "parameters": {
        "resource": "chat-files",
        "operation": "downloadDeviceFileDetails",
        "device": "={{ $json.device.id }}",
        "fileId": "={{ $json.data.media.id }}"
      },
      "type": "n8n-nodes-wassenger.wassenger",
      "typeVersion": 1,
      "position": [1660, 100],
      "id": "e86972a8-a14e-4718-a63d-ef3064888f10",
      "name": "Download image",
      "credentials": {
        "wassengerApiKey": {
          "id": "[CREDENTIAL_ID_HIDDEN]",
          "name": "WhatsApp API key"
        }
      }
    },
    {
      "parameters": {
        "url": "=https://api.wassenger.com{{ $('Wassenger Trigger').item.json.data.media.links.download }}",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [1880, 100],
      "id": "58f5b3c9-b599-4d05-98df-7fafbea560d8",
      "name": "Download API audio",
      "credentials": {
        "httpHeaderAuth": {
          "id": "[HTTP_AUTH_CREDENTIAL_ID_HIDDEN]",
          "name": "Header Auth account"
        }
      }
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "dcf61ad5-2b19-411d-8e84-b9a4cd9bc74c",
              "name": "data.body",
              "value": "=# The user provided the following image and text.\n\n## Image Description:\n{{ $json.content }}\n\n## User Message:\n{{ $('Wassenger Trigger').item.json.data.media.caption }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [2320, 100],
      "id": "a2922296-70bd-4998-9da3-0d35f12ffd47",
      "name": "Image + Text Prompt"
    },
    {
      "parameters": {
        "resource": "image",
        "operation": "analyze",
        "modelId": {
          "__rl": true,
          "value": "chatgpt-4o-latest",
          "mode": "list",
          "cachedResultName": "CHATGPT-4O-LATEST"
        },
        "text": "Analyze the image",
        "inputType": "base64",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "typeVersion": 1.8,
      "position": [2100, 100],
      "id": "1a9206d8-960d-45e7-8144-c1b8b88fb762",
      "name": "Analyze Image",
      "credentials": {
        "openAiApi": {
          "id": "[OPENAI_CREDENTIAL_ID_HIDDEN]",
          "name": "OpenAi account"
        }
      }
    }
  ],
  "pinData": {},
  "connections": {
    "Wassenger Trigger": {
      "main": [
        [
          {
            "node": "Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Switch": {
      "main": [
        [
          {
            "node": "Download Audio",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Download image",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download Audio": {
      "main": [
        [
          {
            "node": "Download Audio1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download Audio1": {
      "main": [
        [
          {
            "node": "Audio transcription",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Audio transcription": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If": {
      "main": [
        [
          {
            "node": "OpenAI",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wassenger",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI": {
      "main": [
        [
          {
            "node": "Code",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code": {
      "main": [
        [
          {
            "node": "Google Drive",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Drive": {
      "main": [
        [
          {
            "node": "Wassenger1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wassenger1": {
      "main": [
        [
          {
            "node": "Google Drive1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download image": {
      "main": [
        [
          {
            "node": "Download API audio",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download API audio": {
      "main": [
        [
          {
            "node": "Analyze Image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Image + Text Prompt": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Analyze Image": {
      "main": [
        [
          {
            "node": "Image + Text Prompt",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {},
  "versionId": "[VERSION_ID_HIDDEN]",
  "meta": {
    "templateId": "9000001",
    "templateCredsSetupCompleted": true,
    "instanceId": "[INSTANCE_ID_HIDDEN]"
  },
  "id": "[WORKFLOW_ID_HIDDEN]",
  "tags": []
}

Live Test 🤖

From the WhatsApp mobile application

Congratulations! You’ve just mastered how to configure the WhatsApp Agent Pro workflow using Wassenger’s built-in Flows feature, converting your WhatsApp into an intelligent, AI-powered assistant. Consider the possibilities!

If this guide assisted you, why not share the enthusiasm? Spread the word by sharing this article with your network. Let’s help more people discover the power of WhatsApp automation with Wassenger’s integrated Flows platform. Together, we can transform how businesses connect with their customers.

Ready to begin? Visit Wassenger now and explore the Flows feature to take the first step toward smarter, more efficient customer communication. Your audience is waiting!

Ready to transform your WhatsApp communication?

Start automating your customer interactions today with Wassenger

Get Started Free