ebonding-stream-to-twilio-sms-v2
Pipeline: ebonding-stream-to-twilio-sms-v2
| ## Read Incidents from Stream
@rn:read-stream
name = "snow-incidents" &
group = "group-twilio"
## For SMS/Text message we only need these 3 fields
--> @dm:selectcolumns
include = "number|short_description|priority"
## Construct the payload for the API call.
--> @dm:map
to = "To" &
func = "fixed" &
value = "+14087864089"
--> @dm:map
to = "From" &
func = "fixed" &
value = "+14088377040"
--> @dm:map
to = "Body" &
func = "evaluate" &
expr = 'number + " (" + priority + "): " + short_description'
--> @dm:selectcolumns
exclude = "number|short_description|priority"
## Store username and password in the vault and fetch it during bot execution
## Note: Twilio API post requires url-encoding
--> @restclient:write
url ='https://api.twilio.com/2010-04-01/Accounts/AC508bba58301a7861df4d3012c2d9908c/Messages.json' & secret_name="twilio_token" &
encoding = "urlencode"
## Update analytics
--> @rn:write-stats-to-stream
name = "ebonding-analytics" &
type = "Twilio-SMS"
|
Extensions used in this Pipeline
Artifacts used in this Pipeline
Artifact Type |
Artifact Name |
Access |
rda-network-stream |
snow-incidents |
read |
rda-network-stream |
ebonding-analytics |
write |
Bots used in this Pipeline
@rn:read-stream @dm:selectcolumns @dm:map @restclient:write @rn:write-stats-to-stream