WAHA + n8n: No Code Low Code WhatsApp Automation Step-By-Step Guide

Posted in Tips on August 27, 2024 by devlikeapro ‐ 3 min read

Image for WAHA + n8n: No Code Low Code WhatsApp Automation Step-By-Step Guide

Here’s how you can start developing your WhatsApp automation with using n8n and WAHA in pair so you can create your own no-code or low-code WhatsApp automation:

Click to open full size.

Installation

Here’s a quick docker-compose we have prepared for you to start using n8n with WAHA:

wget https://raw.githubusercontent.com/devlikeapro/waha/core/docker-compose/n8n/docker-compose.yaml
docker login -u devlikeapro -p <dckr_pat_1111111111>
docker pull devlikeapro/waha-plus
docker logout
  • If you’re using WAHA Core (free version) - you can use the image from Docker Hub:
sed -i 's/devlikeapro\/waha-plus/devlikeapro\/waha/g' docker-compose.yaml

Now you’re ready to run:

docker compose up 
# to run in background:
# docker compose up -d

After that, open:

  1. n8n at https://localhost:5678 and set up your email/password
  2. WAHA at https://localhost:3000/dashboard (waha/waha)

Install WAHA n8n node

We provide WAHA Node, which you can install at your n8n installation.

Go to your n8n => Settings => Community nodes and install:

@devlikeapro/n8n-nodes-waha

If you need help with that, check the Install community nodes

First WhatsApp workflow

We’ll build simple workflow - when your WhatsApp account got any message, it responds with “Hi there” message

Step 1: Add WAHA API credentials

Before starting using the node, you need to add WAHA API credentials.

  1. Go to your n8n => Home => Credentials => Add first credential
  2. Find WAHA API in dropdown
  3. Host URL - http://waha:3000 or use your domain
  4. API Key - 321 or your API key set in docker-compose.yaml
  5. Click Save - it’ll check the connection and save the credentials
Click to open full size.

If you need help with that, check the Create credentials

Step 2: Create a new workflow

  1. Go to n8n => Home => Workflows => Create new workflow.
  2. Remove Manual trigger
Click to open full size.

Step 3: Add WAHA Trigger

Add WAHA Trigger node.

Click to open full size.

Step 4: Add Send a text message action

Add Send a text message WAHA Action and connect it to message WAHA Trigger output:

Click to open full size.

Step 5: Activate the workflow

Click Save and Activate the workflow:

Click to open full size.

Step 6: Start a new session

Open the WAHA Trigger and expand Webhook URLs => Production URL

Click to open full size.

Go to http://localhost:3000/dashboard/ (waha/waha) and Start New session with the URL you got from the WAHA Trigger:

Click to open full size.

Scan QR and wait till session in WORKING state:

Click to open full size.

Step 7: Send a message

Now you can send any message to your WhatsApp account, and it’ll respond with “Hi there” message!

Workflow Templates

👉 Check out https://waha-n8n-workflows.devlike.pro for workflow templates!

Click to open full size.

Troubleshooting

If you’re experiencing any issues or have a feature request, please check the below resources: WAHA:

n8n:

If that doesn’t help - kindly open an issue in the devlikeapro/n8n-nodes-waha GitHub repository, we’re happy to help you out!