@openfn/language-rapidpro
TypeScript icon, indicating that this package has built-in type declarations

1.1.5 • Public • Published

language-rapidpro

An OpenFn adaptor for building integration jobs for use with the RapidPro API.

Documentation

View the docs site for full technical documentation.

Usage

Configuration

View all the required and optional properties for state.configuration in the official configuration-schema definition.

sample job expression using operation

sendBroadcast({
  "text": "Hello friends.",
  "urns": [],
  "contacts": [],
  "groups", [],
});

Key helper functions

sendBroadcast(...) to send broadcast message to multiple contacts

sendBroadcast({
  text: 'Hello world',
  urns: ['twitter:sirmixalot'],
  contacts: ['a052b00c-15b3-48e6-9771-edbaa277a353'],
});

startFlow(...) to trigger an automation flow in RapidPro

startFlow({
  flow: 'f5901b62-ba76-4003-9c62-72fdacc1b7b7',
  restart_participants: false,
  contacts: ['a052b00c-15b3-48e6-9771-edbaa277a353'],
});

upsertContact(...) to update/insert a Contact (and check if exists using external identifiers)

upsertContact({
  name: 'Mamadou',
  language: 'ENG',
  urns: ['tel:+250788123123'],
});

addContact(...) to insert a Contact

addContact({
  name: 'Mamadou',
  language: 'ENG',
  urns: ['tel:+250788123123'],
});

Development

Clone the adaptors monorepo. Follow the Getting Started guide inside to get set up.

Run tests using pnpm run test or pnpm run test:watch

Build the project using pnpm build.

To just build the docs run pnpm build docs

Readme

Keywords

none

Package Sidebar

Install

npm i @openfn/language-rapidpro

Weekly Downloads

4

Version

1.1.5

License

LGPLv3

Unpacked Size

79.7 kB

Total Files

10

Last publish

Collaborators

  • mtuchi
  • elias-ba
  • stuartc-openfn
  • taylordowns2000