Twilio
The Twilio Tool facilitates communication with Twilio API by providing features that allow you to send or fetch WhatsApp or SMS messages.
Please note that the Twilio Tool is designed as a supplementary tool for an existing chatbot and does not actively listen for new messages. For effective operation, the app requires explicit type of Whatsapp or SMS within your instructions.
Setup
Get Twilio Access Token
Follow this guide to grab your account ID and auth token: https://www.twilio.com/docs/iam/api/authtoken (opens in a new tab)
Authorization
npi auth twilio --account {account_sid} --token {your_auth_token} --from {phone_number_send_from}
Usage
npi app twilio "send hi to whatsapp number: +1650xxxxxxx"
Supported Features
Direct Messaging
- Description: Engage in one-on-one conversations by sending direct messages to a user.
- In-Context Parameters1:
- User Phone number.
- Message body (Inferred).
Examples
-
Send a Greeting Message to a User
npi app twilio "send hi to whatsapp number: +1650xxxxxxx"
-
Ask for User Confirmation and Await Their Reply
npi app twilio "Send a direct message to +1650xxxxxxx asking them to confirm next Monday's meeting, and wait for their reply."
Footnotes
Footnotes
-
In-Context Parameters refer to the special information that you may specify in the instructions. Parameters marked as Inferred could be deduced from the context without needing explicit mention. ↩