Connect Twilio to Toolspoke
Send SMS, read message and call logs, and look up phone numbers. Toolspoke gives your agents 9 of its actions, and you decide which ones each project allows.
- Connection
- Provider REST API
- Authentication
- Account SID and auth token
- Actions exposed
- 9
- What a call bills
- Nothing
- Adapter
- Maintained by Toolspoke
- Category
- Communication
Connected in three steps
Install Twilio
Open the marketplace in your workspace, add Twilio to the project your agents work in, and it appears on the gateway immediately.
Connect the credential
Provide the credential Twilio asks for. Where to get it, and what it has to be able to reach, is the next section.
Give it to an agent
Describe the job in one sentence and the builder proposes the instructions, the toolkits it needs, a schedule and where it should answer, or start from a catalogue agent. It can use every Twilio action the project leaves on.
Where the agent answers
Slack
Ask it in a channel or a thread, and it replies in the thread it was asked in.
Email
Email it. Each write waits for a person's go-ahead unless that action is allowed in advance.
GitHub
Mention it on a pull request, and it answers there.
Schedule
A routine wakes it on a schedule, or when a new item matches.
Any agent in the project can use Twilio, and only the actions the project leaves on.
What Twilio asks for
Account SID and auth token. You provide it once, when you install the connector. Toolspoke encrypts it at rest and decrypts it only for the length of a single call, and the gateway attaches it to the outbound request itself, so it is never part of the arguments an agent sends.
- Account SIDRequired
- The 34-character Account SID starting with AC, from Console → Account Info. Every account-scoped path in this connector is built from it, which is why it is asked for separately from the token below.
- AC…
- Account SID and auth tokenRequired
- Paste the Account SID, a colon, then the auth token, both from Console → Account Info. Twilio reads HTTP Basic with the SID as the username and the auth token as the password, so this one field is what gets base64-encoded into the Authorization header. A subaccount works too: use that subaccount's own SID in both fields.
- AC…:your_auth_token
What an agent can do in Twilio
9 actions, each one declared by name in the connector. A workspace policy grants a person all of them, a hand-picked selection, everything on the read side, everything on the write side, or none.
8 read, none write, 1 destructive
Reads
8Fetches data and changes nothing.
list_messagesList messages sent and received on this account, newest first. Filter by the number at either end, or by the date sent. Twilio's date filters are inclusive on both sides.
get_messageRetrieve one message by SID, with its body, status, error code, direction, segment count and price.
list_callsList voice calls on this account, newest first. Filter by the number at either end, by call status, or by when the call started. Returns call metadata, who called whom, for how long, at what price, and never recording audio.
get_callRetrieve one call by SID: its status, direction, duration, price, and the numbers at both ends.
list_phone_numbersList the phone numbers this account owns, with their capabilities and the webhooks configured on each. Call it before send_sms to find a number you can legitimately send from.
get_account_balanceReturn the account's remaining Twilio balance and its currency. Takes no arguments, reads nobody's messages and costs nothing, which is why it is what an install tests itself with.
lookup_phone_numberLook up a phone number through the Lookup v2 API: whether it is valid, its country, and, when you ask for them, its line type, carrier, or the name it is registered to. Data packages beyond the free validation are billed per lookup, so ask only for the ones you need. This is the one action on a different host: Lookup lives at lookups.twilio.com, not api.twilio.com.
list_usage_recordsList usage and spend on this account, one record per billing category. Use it to answer what a month of messaging cost. Category is a Twilio usage category name such as sms, calls or lookups; leave it out for every category.
Destructive
1Deletes or permanently alters something. Worth granting on purpose.
send_smsSend an SMS or MMS from a Twilio number. This is classified destructive rather than write, and deliberately so: it delivers a message to a real handset, it cannot be recalled once sent, and Twilio bills per segment. A write grant can read every log in this connector and send nothing. Supply either from (a Twilio number you own, in E.164) or messaging_service_sid (a Messaging Service that picks the number for you). Twilio rejects the request if neither is present.
What it will not do
The gateway enforces each of these, so they can be stated flatly.
- It cannot call anything else
- The 9 actions above are the whole of it. A call to any other name is refused before it reaches Twilio rather than forwarded on, and connecting your account does not add to the list: it is fixed by the connector, not discovered at run time.
- It reaches no further than your credential
- Toolspoke holds no access to Twilio of its own. Every call carries the credential you stored and nothing besides, so whatever that credential cannot reach, this connector cannot reach either.
- It never hears from Twilio
- Nothing is pushed to it. There is no webhook, no subscription and no polling, so this connector cannot notice by itself that something changed in Twilio. An agent has to ask.
- It does not smooth over provider limits
- Toolspoke does not retry, queue or back off around Twilio's own rate limits. A call that Twilio refuses comes back to the agent as a failed call.
Before you connect it
What can an agent do in Twilio?
9 named actions: 8 that only read and 1 that delete or permanently alter something. They include send_sms, list_messages and get_message. Nothing outside that list is reachable: the connector declares each operation by name rather than proxying whatever an agent asks for.
What credentials does the Twilio connector need?
Account SID and auth token. The connector asks for account sid and account sid and auth token. Values are encrypted at rest and attached to the outbound request by the gateway, so they are never part of the arguments an agent sends and never reach the audit log.
How does an agent get to use Twilio?
Install Twilio in a project and every agent in that project can use the actions the project leaves on. Describe a job in one sentence and the builder proposes the instructions, the toolkits it needs, a schedule and where it should answer, or start from a catalogue agent. The agent answers when someone asks it in Slack, emails it or mentions it on a GitHub pull request, or when its routine wakes it.
What does the Twilio connector not do?
The 9 actions above are the whole of it. A call to any other name is refused before it reaches Twilio rather than forwarded on, and connecting your account does not add to the list: it is fixed by the connector, not discovered at run time. Toolspoke holds no access to Twilio of its own. Every call carries the credential you stored and nothing besides, so whatever that credential cannot reach, this connector cannot reach either. Nothing is pushed to it. There is no webhook, no subscription and no polling, so this connector cannot notice by itself that something changed in Twilio. An agent has to ask. Toolspoke does not retry, queue or back off around Twilio's own rate limits. A call that Twilio refuses comes back to the agent as a failed call.
Can I limit which actions an agent can call?
Yes, in two places. The project switches Twilio's actions on and off one at a time, for everyone in the project at once, and the screen groups them by read, write and destructive so turning off everything that deletes is one click. An individual agent key can then be narrowed further, to particular toolkits in a project and to particular actions in a toolkit. Whatever it was granted, a key never reaches a project its owner cannot.
What gets recorded when an agent calls Twilio?
Every attempt, with the agent that made it and the person that agent belongs to, the full request payload, the response payload, the status, the duration, and what the call cost in sandbox time and model tokens. Values whose key names a secret are masked out before the record is shown to anyone. An operation the connector marks as not retained never has its response body written at all, so the gateway keeps no second copy of what was read.