npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

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

Readme

n8n-nodes-rapidpro

npm version npm downloads License: MIT

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 (+250788xxxtel:+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)

  1. Open n8n
  2. Go to SettingsCommunity Nodes
  3. Click Install a community node
  4. Enter: n8n-nodes-rapidpro
  5. Click Install

Manual Installation

npm install n8n-nodes-rapidpro

Build from Source

git clone https://github.com/monfortbrian/n8n-nodes-rapidpro.git
cd n8n-nodes-rapidpro
npm install
npm run build
npm link

Credentials

  1. In n8n, go to CredentialsNew
  2. Search for RapidPro API
  3. Configure:
    • Server URL: Your RapidPro instance URL (e.g. https://rapidpro.io or self-hosted)
    • API Token: Found under Account Settings → API Token in RapidPro

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. Execute

Output: 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. Execute

Output: 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. Execute

The 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. Execute

Output: 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.json

Full 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


Contact

For questions, support, or contributions:


License

MIT License

Copyright (c) 2026 Monfort Brian N.


Support


Made with ❤️ for the global health community