Skip to content
This repository has been archived by the owner on Nov 17, 2022. It is now read-only.

OpenFn/language-telerivet

Repository files navigation

⚠️ MOVED TO OpenFn/adaptors! ⚠️

N.B.: New versions are available at: https://github.com/OpenFn/adaptors/tree/main/packages/Telerivet

Language Telerivet (Archived)

==============

Language Pack for sending messages using the telerivet API.

Documentation

Sample configuration

{
  "projectId": "telerivet_project_id",
  "apiKey": "telerivetapikey"
}

Send message

Current send expression:

send(fields(
  field("to_number", dataValue("recipient_number")),
  field("content", dataValue("recipient_text")),
  // Lots of optional parameters...
  field("message_type", "sms"),
  field("route_id", dataValue("some_route"))
))

sendBulk messages - WIP

Current sendBulk expression:

send(fields(
  field("content", dataValue("recipient_text")),
  field("to_numbers", [
        "+14155550123",
        "+14255550234",
        "+16505550345"
    ]
  // Lots of optional parameters...
  field("message_type", "sms"),
  field("route_id", dataValue("some_route"))
))

Note that "recipient_text" may be a concatenation like this:

field("content", function (state) {
          return (
            dataValue("salutation")(state).concat(
              ". ", dataValue("last_name")(state), ", )"
            )
          )
        })

Development

Clone the repo, run npm install.

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

Build the project using make.

About

No description, website, or topics provided.

Resources

License

GPL-3.0, LGPL-3.0 licenses found

Licenses found

GPL-3.0
LICENSE
LGPL-3.0
LICENSE.LESSER

Stars

Watchers

Forks

Packages

No packages published