n8n-nodes-rapidpro
v1.0.0
Published
Connect n8n to RapidPro - automate SMS, WhatsApp, and conversational flows for public health programs, NGOs, government agencies, and community outreach. Manage contacts, trigger flows, broadcast alerts, and integrate with OpenMRS, DHIS2, and any data sou
Maintainers
Readme
n8n-nodes-rapidpro
Community node for n8n providing full integration with RapidPro - the open-source messaging platform used by UNICEF, WHO, and Ministries of Health to run SMS, WhatsApp, and conversational flow campaigns at national scale.
Features
Contact Management
- Register and update contacts with custom fields, language, and group membership
- Look up contacts by UUID or phone number
- Paginated bulk retrieval with filters by group, phone, and date range
Group Management
- Create targeting groups dynamically from any n8n workflow
- List and filter existing groups for broadcast or flow targeting
Flow Automation
- Start conversational flows for individual contacts or entire groups
- Inject extra variables into flows - appointment dates, clinic names, district codes
- List all available flows for discovery and selection
Messaging
- Send direct SMS or WhatsApp messages to contacts, groups, or phone numbers
- Retrieve message history with filters by direction, contact, and date range
Broadcast
- Send one message to thousands of contacts or groups in a single operation
- List past broadcasts and delivery status
Developer-Friendly
- Automatic phone number normalization (
+250788xxx→tel:+250788xxx) - Cursor-based pagination handled automatically on all list operations
- Works as an AI Agent tool (
usableAsTool) - Built-in error handling with continue-on-fail support
Installation
Community Nodes (Recommended)
- Open n8n
- Go to Settings → Community Nodes
- Click Install a community node
- Enter:
n8n-nodes-rapidpro - Click Install
Manual Installation
npm install n8n-nodes-rapidproBuild from Source
git clone https://github.com/monfortbrian/n8n-nodes-rapidpro.git
cd n8n-nodes-rapidpro
npm install
npm run build
npm linkCredentials
- In n8n, go to Credentials → New
- Search for RapidPro API
- Configure:
- Server URL: Your RapidPro instance URL (e.g.
https://rapidpro.ioor self-hosted) - API Token: Found under Account Settings → API Token in RapidPro
- Server URL: Your RapidPro instance URL (e.g.
The credential test verifies connectivity by calling the /api/v2/org.json endpoint.
Hosted: Use https://rapidpro.io for the UNICEF-hosted version.
Self-hosted: Use your own server URL - e.g. https://rapidpro.yourdomain.org.
Usage
Supported Resources
| Resource | Description | Use Cases | | ------------- | ---------------------------------- | -------------------------------------------- | | Contact | Citizens, patients, health workers | Registration, profile updates, sync from EMR | | Group | Contact targeting groups | Segment by district, program, role | | Flow | Automated conversation sequences | Surveys, triage, reminders, advisories | | Message | Direct SMS or WhatsApp messages | One-off alerts, appointment reminders | | Broadcast | Mass messaging to groups | Outbreak alerts, campaign announcements |
Operations
| Resource | Operations | | ------------- | ------------------------------------- | | Contact | Create, Update, Get, Get Many, Delete | | Group | Create, Get Many | | Flow | Get Many, Start | | Message | Send, Get Many | | Broadcast | Create, Get Many |
Examples
Example 1: Register a New Health Worker
1. Add RapidPro node
2. Resource: Contact → Create
3. Phone Number: +250788123456
4. Name: Alice Uwimana
5. Language: kin
6. Custom Fields:
- district: Nyagatare
- role: community_health_worker
7. ExecuteOutput: Full contact object with UUID, URN, and all fields.
Example 2: Send an Appointment Reminder
1. Add RapidPro node
2. Resource: Message → Send
3. Message Text: Hello @contact.name, your ANC appointment is tomorrow at Kigali HC.
4. Send To: Phone Numbers (URNs)
5. Phone Numbers: tel:+250788123456
6. ExecuteOutput: Broadcast object with status and recipient count.
Example 3: Start a Maternal Health Flow
1. Add RapidPro node
2. Resource: Flow → Start
3. Flow UUID: <your-flow-uuid>
4. Start Contacts By: Group
5. Group UUID: <pregnant-mothers-group-uuid>
6. Extra Variables:
- week: 28
- clinic_name: Butaro Hospital
7. ExecuteThe flow receives @extra.week and @extra.clinic_name as context - no hardcoding needed.
Example 4: Disease Outbreak Broadcast (MoH)
1. Add RapidPro node
2. Resource: Broadcast → Create
3. Message: Cholera alert in your district. Activate response protocol immediately.
4. Target Type: Groups
5. Group UUIDs: <district-health-officers-uuid>
6. ExecuteOutput: Broadcast dispatched to all district health officers simultaneously.
Example 5: OpenMRS → RapidPro Maternal Reminder Pipeline
Combine with n8n-nodes-openmrs:
[Schedule: Daily 7AM]
→ [OpenMRS: Get ANC appointments for tomorrow]
→ [Code: Format patient list]
→ [Loop: For each patient]
→ [RapidPro: Send Message]
"Hello @contact.name, reminder: ANC visit tomorrow at @extra.clinic."Example 6: DHIS2 + RapidPro Outbreak Alert System
Combine with n8n-nodes-dhis2:
[Schedule: Every 6 hours]
→ [DHIS2: Query analytics - cholera cases by district]
→ [Code: Filter districts above threshold]
→ [RapidPro: Broadcast to Group "District Response Teams"]
"Case threshold exceeded in {district}. Begin surge response."
→ [DHIS2: Post event to IDSR tracker]Use Cases
Public Health & Ministries of Health
- National disease outbreak early warning systems
- Maternal and child health reminder programs
- Vaccine campaign mobilization and follow-up
- Community health worker coordination
NGOs & Global Health Programs
- Nutrition survey data collection via conversational flows
- Medicine stockout alerts to facility managers
- Treatment adherence reminders for HIV/TB programs
- Beneficiary registration and case management
Agriculture & Rural Development
- Weather and flood alerts to farming communities
- Market price advisories via SMS
- Extension worker reporting and field coordination
Local Government & Communities
- Citizen feedback and complaint intake via SMS
- School attendance and dropout alerts
- Emergency warnings for remote and off-grid areas
Compatibility
- n8n version: 1.0.0 or higher
- RapidPro version: Any (API v2)
- Node.js: 22.0.0 or higher
API Endpoints
This node uses the following RapidPro API v2 endpoints:
POST /api/v2/contacts.json
GET /api/v2/contacts.json
PATCH /api/v2/contacts.json
DELETE /api/v2/contacts.json
GET /api/v2/groups.json
POST /api/v2/groups.json
GET /api/v2/flows.json
POST /api/v2/flow_starts.json
GET /api/v2/messages.json
POST /api/v2/broadcasts.json
GET /api/v2/broadcasts.jsonFull API documentation: https://rapidpro.io/api/v2/
Roadmap
| Version | Feature | | ---------- | ---------------------------------------------------------------- | | v1.0.0 | Contacts, Groups, Flows, Messages, Broadcasts | | v1.2.0 | Trigger node - incoming message, flow completed, contact created | | v1.3.0 | Flow Runs resource - extract and route survey responses | | v2.0.0 | WhatsApp template messages, bulk contact import from CSV |
Resources
- RapidPro Documentation
- n8n Community Nodes
- n8n-nodes-openmrs - Clinical data integration
- n8n-nodes-dhis2 - Health information systems
Contact
For questions, support, or contributions:
- npm: https://www.npmjs.com/package/n8n-nodes-dhis2
- email: [email protected]
License
Copyright (c) 2026 Monfort Brian N.
Support
- Issues: GitHub Issues
- n8n Community: n8n Community Forum
Made with ❤️ for the global health community
