Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@green-api/n8n-nodes-green-api

Package Overview
Dependencies
Maintainers
4
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

@green-api/n8n-nodes-green-api

n8n community node for Green-API WhatsApp automation - send messages, manage contacts, and handle webhooks

latest
Source
npmnpm
Version
0.1.0
Version published
Weekly downloads
0
Maintainers
4
Weekly downloads
 
Created
Source

n8n-nodes-green-api

npm version npm downloads License: MIT

n8n community node for Green-API WhatsApp automation - Send messages, manage contacts, handle webhooks, and automate WhatsApp Business workflows directly in n8n.

Green-API provides a powerful REST API for WhatsApp Business automation. This node brings that power to n8n, the fair-code licensed workflow automation platform.

📑 Table of Contents

🚀 Installation

For n8n v0.187.0 or above:

  • Go to SettingsCommunity Nodes
  • Select Install
  • Enter n8n-nodes-green-api
  • Agree to the risks of using community nodes
  • Select Install

After installation, search for "Green-API" in the nodes panel.

Option 2: Manual Installation

npm install n8n-nodes-green-api

📋 Prerequisites

You need a Green-API account to use this node.

Getting Your API Credentials

  • Sign up at Green-API Console
  • Create an instance in the console
  • Scan QR code with WhatsApp mobile app to authorize
  • Copy credentials:
    • Instance ID (e.g., 1234567890)
    • API Token Instance (long string)

✨ Features

  • Send Messages: Text, files, locations, contacts
  • Receive Webhooks: Incoming message notifications with filtering
  • Message History: Retrieve chat logs and message history
  • Contact Management: List contacts, verify WhatsApp numbers
  • Auto Webhook Setup: Automatically configures Green-API webhooks
  • Advanced Filtering: Filter by event type, sender, message type
  • Secure Authentication: Password-protected API credentials
  • TypeScript: Full type safety and IntelliSense support

📤 Operations

Message Resource

OperationDescription
Send TextSend text messages with link preview and quoting
Send File by URLSend files (images, videos, docs) from URL
Send File by UploadUpload and send files from your system
Send LocationShare GPS coordinates with optional name
Send ContactSend contact cards with phone and name

Journal Resource

OperationDescription
Get Chat HistoryRetrieve message history for specific chat
Get Last IncomingGet recent incoming messages
Get Last OutgoingGet recent outgoing messages

Contact Resource

OperationDescription
Get ContactsRetrieve your contact list
Check WhatsAppVerify if phone number is on WhatsApp

Green-API Trigger

Webhook listener that automatically receives notifications:

  • ✅ Filter by event type (incoming/outgoing messages, device info, state)
  • ✅ Filter by sender chat ID
  • ✅ Filter by message type (text, image, video, document, audio, location, contact)
  • ✅ Auto-configures webhook settings in Green-API
  • ✅ Auto-cleanup on node deletion

💡 Usage Examples

Example 1: Send Welcome Message

Green-API Node:
├── Resource: Message
├── Operation: Send Text
├── Chat ID: 1234567890@c.us
└── Message: "Welcome to our service!"

Example 2: Auto-Reply Bot

[Trigger] Green-API Trigger
   ├── Event Type: Incoming Message
   └── Filter: Text messages only
            ↓
[Action] Green-API Node
   ├── Resource: Message
   ├── Operation: Send Text
   ├── Chat ID: {{$json.senderData.chatId}}
   └── Message: "Thanks for your message! We'll respond soon."

Example 3: Send Document

Green-API Node:
├── Resource: Message
├── Operation: Send File by URL
├── Chat ID: 1234567890@c.us
├── File URL: https://example.com/invoice.pdf
├── File Name: invoice.pdf
└── Caption: "Here's your invoice for March 2025"

Example 4: Broadcast to Multiple Contacts

[Start] HTTP Request or Database
   └── Get list of phone numbers
            ↓
[Loop] Loop Over Items
   └── For each contact
            ↓
[Action] Green-API Node
   ├── Resource: Message
   ├── Operation: Send Text
   ├── Chat ID: {{$json.phone}}@c.us
   └── Message: "Important update: ..."

Example 5: Verify Phone Numbers

Green-API Node:
├── Resource: Contact
├── Operation: Check WhatsApp
└── Phone Number: 1234567890
   → Returns: {"existsWhatsapp": true}

📱 Chat ID Format

WhatsApp uses specific formats for chat IDs:

TypeFormatExample
Individual[phone]@c.us1234567890@c.us
GroupReceived from Green-API120363XXXXX@g.us

Note: For individual chats, use full international number without + symbol.

🔐 Credentials Setup

  • In n8n, go to CredentialsNew
  • Search for Green-API
  • Enter credentials:
    • Instance ID: Your Green-API instance identifier
    • API Token: Your API token from console
  • Click Create

Credentials are automatically validated using Green-API status check.

🔗 Resources

🐛 Support

🛠️ Development

Setup Development Environment

# Clone repository
git clone https://github.com/rajeshwws/GreenApiN8N.git
cd GreenApiN8N

# Install dependencies
npm install

# Build the node
npm run build

# Link for local development
npm link

Test Locally

# In n8n installation directory
npm link n8n-nodes-green-api

# Start n8n
n8n start

# Test at: http://localhost:5678

Build Commands

npm run build        # Compile TypeScript
npm run dev          # Watch mode
npm run lint         # Check code quality
npm run format       # Format code

🤝 Contributing

Contributions are welcome! Please:

  • Fork the repository
  • Create a feature branch (git checkout -b feature/amazing-feature)
  • Commit your changes (git commit -m 'Add amazing feature')
  • Push to branch (git push origin feature/amazing-feature)
  • Open a Pull Request

📝 License

MIT © Rajesh

🔄 Version History

0.1.0 (Initial Release)

  • ✅ Message operations (text, files, location, contact)
  • ✅ Journal operations (chat history, incoming/outgoing)
  • ✅ Contact operations (list contacts, verify numbers)
  • ✅ Webhook trigger with advanced filtering
  • ✅ Auto webhook configuration
  • ✅ TypeScript support
  • ✅ Full documentation

Made with ❤️ for the n8n community

If this node helps you, please ⭐ star the repo on GitHub!

Keywords

n8n-community-node-package

FAQs

Package last updated on 10 Oct 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts