@wsapichat/n8n-nodes-wsapi
v2.0.6
Published
A comprehensive n8n community node for WSAPI - the powerful WhatsApp API Gateway. Easily integrate WhatsApp messaging, contact management, group operations, and more into your n8n workflows.
Maintainers
Readme
n8n Nodes - WSAPI API Integration
A comprehensive n8n community node for WSAPI - the powerful WhatsApp API Gateway. Easily integrate WhatsApp messaging, contact management, group operations, and more into your n8n workflows.
Installation • Credentials • Operations • Examples • Development • License
Note on affiliation: This is a community-maintained package for use with n8n. It is not affiliated with, endorsed by, or sponsored by n8n GmbH, Meta Platforms, Inc., or WhatsApp LLC. The package name uses the required n8n-nodes-… prefix for discoverability, which is nominative fair use of the n8n trademark. Please follow n8n's brand guidelines and Sustainable Use License.
Installation
Community Nodes (Recommended)
- Go to Settings > Community Nodes in your n8n instance
- Click Install Community Node
- Enter:
@wsapichat/n8n-nodes-wsapi - Click Install
Manual Installation
# Install in your n8n root directory
npm install @wsapichat/n8n-nodes-wsapiPrerequisites
- n8n version 0.195.0 or later
- WSAPI Account: Sign up at wsapi.chat to get your API credentials
- WhatsApp Account: Connected to your WSAPI instance
Credentials
Before using the node, you'll need to set up your WSAPI credentials:
- In n8n, go to Credentials and create a new WSAPI API credential
- Enter your WSAPI details:
- API Key: Your WSAPI API key
- Instance ID: Your WhatsApp instance ID
- Base URL: The WSAPI service URL (defaults to
https://wsapi.chat) - Webhook Signing Secret: Secret used to verify HMAC-SHA256 signatures on incoming webhooks (configure in your WSAPI dashboard)
You can obtain these credentials from your WSAPI dashboard.
Operations
Messages
- Send Text - Send plain text messages with mentions and replies
- Send Link - Send rich link previews with thumbnails
- Send Image - Send images with captions and view-once options
- Send Video - Send videos with captions and view-once options
- Send Audio - Send audio files
- Send Voice - Send voice messages
- Send Document - Send PDF, Excel, and other document files
- Send Sticker - Send static and animated stickers
- Send Contact - Share contact information via vCard
- Send Location - Share GPS coordinates with place details
- Send Reaction - React to messages with emojis
- Edit Message - Edit previously sent text messages
- Pin Message - Pin messages in chats
- Mark as Read - Mark messages as read
- Star Message - Star/unstar messages
- Delete Message - Delete messages for everyone
- Delete for Me - Delete messages only for yourself
Chat Management
- Get All Chats - Get all active chats
- Get Chat - Get specific chat information
- Get Picture - Get chat profile picture
- Get Business Profile - Retrieve business profile details
- Delete Chat - Remove chat conversations
- Clear Chat - Clear chat message history
- Set Presence - Set typing, recording, or paused status
- Set Ephemeral - Configure disappearing messages (24h, 7d, 90d)
- Mute Chat - Mute notifications for specified duration
- Pin Chat - Pin important conversations
- Archive Chat - Archive old conversations
- Mark as Read - Mark entire chats as read
- Subscribe to Presence - Get real-time presence updates
- Request Messages - Request message history
Session Control
- Get QR Code Image - Generate QR code image for login
- Get QR Code String - Get QR code as string
- Get Pair Code - Generate pairing code for phone linking
- Get Status - Check connection and login status
- Flush History - Clear session history
- Logout - Disconnect from WhatsApp
Contact Management
- Get Many - Get all WhatsApp contacts
- Get Contact - Retrieve specific contact information
- Create or Update Contact - Add or update contacts
- Get Blocklist - Get list of blocked contacts
- Block Contact - Block a contact
- Unblock Contact - Unblock a contact
- Sync Contacts - Synchronize contacts
Group Management
- Get Many - Get all group chats
- Get Group - Retrieve group details and participants
- Create Group - Create new groups with participants
- Leave Group - Leave a group
- Get Participants - Get group participant list
- Update Participants - Add, remove, promote, or demote group members
- Set Description - Update group descriptions
- Set Name - Change group names
- Set Picture - Upload group profile pictures
- Set Announce Mode - Toggle announcement-only mode
- Set Join Approval - Toggle join approval requirement
- Set Locked Mode - Toggle locked mode
- Set Member Add Mode - Configure who can add members
- Get Invite Link - Generate group invitation links
- Reset Invite Link - Reset group invitation links
- Get Invite Info - Get details about invitation codes
- Get Invite Requests - List pending join requests
- Handle Join Requests - Approve or reject join requests
- Join with Invite - Join a group using an invite code
- Join with Link - Join a group using an invite link
Community Management
- Get Many - List all communities
- Get Community - Retrieve community details
- Create Community - Create a new community with participants
- Leave Community - Leave a community
- Set Name - Update community name
- Set Description - Update community description
- Set Picture - Upload community profile picture
- Set Locked Mode - Toggle locked mode
- Get Participants - Get community participant list
- Update Participants - Add or remove community members
- Get Invite Link - Generate community invitation link
- Reset Invite Link - Reset community invitation link
- Get Sub-Groups - List community sub-groups
- Create Sub-Group - Create a new sub-group in the community
- Link Group - Link an existing group to the community
- Unlink Group - Unlink a group from the community
Newsletter Management
- Get Many - List all newsletters
- Get Newsletter - Retrieve newsletter details
- Create Newsletter - Create a new newsletter
- Get by Invite Code - Get newsletter info from an invite code
- Set Subscription - Subscribe or unsubscribe from a newsletter
- Toggle Mute - Mute or unmute a newsletter
Status (Stories)
- Get Privacy - Get status privacy settings
- Post Text - Post a text status update
- Post Image - Post an image status update
- Post Video - Post a video status update
- Delete Status - Delete a status update
User Operations
- Get User Profile - Retrieve user profile by phone number
- Get My Profile - Get your own profile information
- Update My Profile - Update your profile information
- Check User - Check if a phone number is on WhatsApp
- Bulk Check Users - Check multiple phone numbers at once
- Get Privacy Settings - Retrieve privacy settings
- Set Privacy Setting - Update a privacy setting
- Set Presence - Set availability status
Call Management
- Reject Call - Automatically reject incoming calls
Media Operations
- Download Media - Download images, videos, audio, and documents from messages
Webhook Triggers
- WSAPI Trigger - Select any combination of event types to listen for: messages, chats, calls, contacts, groups, newsletters, sessions, and user presence
Examples
Send a Text Message
Resource: Message
Operation: Send Text
To: [email protected]
Text: Hello from n8n!Send an Image with Caption
Resource: Message
Operation: Send Image
To: [email protected]
Image URL: https://example.com/image.jpg
Caption: Check out this awesome image!Create a WhatsApp Group
Resource: Group
Operation: Create Group
Group Name: n8n Automation Team
Participants: 1234567890,9876543210,5555555555Post a Text Status Update
Resource: Status
Operation: Post Text
Text: Hello from n8n automation!Set Up Message Webhook Trigger
Trigger: WSAPI
Events: Message, Message Read
Auto-Download Media: enabled
Verify Webhook Signature: enabledWebhook Configuration
The WSAPI Trigger node supports advanced webhook features:
- Event Filtering: Choose any combination of event types from a single flat list
- Signature Verification: Verify incoming webhooks using HMAC-SHA256 signatures (requires a signing secret in credentials)
- Auto-Download Media: Automatically download media files from messages
- Event Parsing: Automatic parsing of webhook payloads
- Raw Event Data: Optionally include raw event data in output
AI Agent Integration
The WSAPI node has usableAsTool enabled, making it directly usable as a tool within n8n's AI Agent nodes. AI agents can leverage any WSAPI operation — send messages, manage groups, check users, and more — as part of their workflows.
Development
Prerequisites
- Node.js 20.19.0 or later
- npm 9 or later
Setup
git clone https://github.com/wsapi-chat/n8n-nodes-wsapi
cd n8n-nodes-wsapi
npm installBuilding
npm run buildTesting
npm testLinting & Formatting
npm run lint
npm run lint:fix
npm run format
npm run format:checkLocal Development
# Link the package locally
npm link
# In your n8n directory
npm link @wsapichat/n8n-nodes-wsapiSupport
- Documentation: WSAPI Docs
- WSAPI Support: WSAPI Support
Contributing and Conduct
Contributions are welcome. By participating, you agree to abide by our Code of Conduct.
Changelog
See CHANGELOG.md for version history and updates.
License
This project is licensed under the MIT License — see LICENSE for details.
Trademark notice: "n8n" is a trademark of n8n GmbH. "WhatsApp" is a trademark of WhatsApp LLC. Any use here is for identification and compatibility purposes only and does not imply endorsement or affiliation with n8n GmbH, Meta Platforms, Inc., or WhatsApp LLC.
