An app that takes twilio tokens to send sms's and emails
1.9K
Sends an email or SMS message using Twilio.
An example workflow of using the container in a workflow on Direktiv.
id: send-approval
functions:
- id: send
image: vorteil/twilio:v2
description: "Sends a sms to provided number"
states:
- id: fire
type: action
action:
secrets: ["TWILIO_TOKEN", "TWILIO_SID", "TWILIO_PROVIDED_NUMBER"]
function: send
input:
typeof: "sms"
sid: jq(.secrets.TWILIO_SID)
token: jq(.secrets.TWILIO_TOKEN)
message: "A fun SMS message!"
from: jq(.secrets.TWILIO_PROVIDED_NUMBER)
to: jq("+" + (.number|tostring))
token, to, and from fields appropriately.input:
typeof: "email"
token: "TOKEN_STRING"
subject: "Subject Header of Email"
message: "Normal string message"
htmlMessage: "<html><body><h5>HI</h5></body></html"
from: "[email protected]"
to: "[email protected]"
message field and ensure that htmlMessage is unused. In the event that both message and htmlMessage are populated, the htmlMessage takes precedence.input:
typeof: "sms"
sid: "TWILIO_SID"
token: "TWILIO_TOKEN"
message: "RECIPIENT_NAME"
from: "TWILIO_FROM_NUM"
to: "RECIPIENT_NUM"
No output is returned upon success. In the case that an error is encountered, it will present in the following format:
{
"errorCode" : "com.request.error",
"errorMsg" : "Something went wrong"
}
Content type
Image
Digest
Size
2.3 MB
Last updated
about 5 years ago
docker pull vorteil/twilio