⚠️ MOVED TO OpenFn/adaptors! ⚠️
N.B.: New versions are available at: https://github.com/OpenFn/adaptors/tree/main/packages/Telerivet
==============
Language Pack for sending messages using the telerivet API.
{
"projectId": "telerivet_project_id",
"apiKey": "telerivetapikey"
}
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"))
))
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), ", )"
)
)
})
Clone the repo, run npm install
.
Run tests using npm run test
or npm run test:watch
Build the project using make
.