Twilio Samples - Status Trigger

<< Click to Display Table of Contents >>

Navigation:  Examples > Twilio Samples >

Twilio Samples - Status Trigger

Service Status
Account: Twilio SMS Receive From +447481347170
Message Source: Twilio
Checked Every:    On Demand

Trigger: Service Status

From Address:
*
Subject Contains:
status

Extracted Fields

From Look For: "FROM" Then Look For: ":" Extract Until: Until End Of Line
Body Look For: "BODY" Then Look For: ":" Extract Until: Until End Of Line
ToCountry Look For: "TOCOUNTRY" Then Look For: ":" Extract Until: Until End Of Line
Status Look For: "SMSSTATUS" Then Look For: ":" Extract Until: Until End Of Line
FromCountry Look For: "FROMCOUNTRY" Then Look For: ":" Extract Until: Until End Of Line
ToNumber Look For: "TO" Then Look For: ":" Extract Until: Until End Of Line

Actions

Send Popup Message %AccountName% Status Request Started
Set Variable Name =
Update A Database %PSLCentral%
Lookup From A Database SELECT * FROM [PSLCentralTemp].[dbo].[ThinkAutomationSMSDemoRegistrations] WHERE FromNumber = '%From%'
If  %Name% Is Blank  Then 
Twilio Send SMS Message  To %From% "Sorry we do not recogise your number. Please use the Register command to register your details." (Assign Status To %Status%)
End Processing
End If
Twilio Send SMS Message  To %From% "Hello %Name% Service Status (Demo): WhosOn = Good ThinkAutomation = Good" (Assign Status To %Status%)
Send Popup Message %AccountName% Status Request Completed
End Of Actions

Sample Incoming Message

Subject: Status

FROM: +447798646913
BODY: Status

TOCOUNTRY: GB
SMSMESSAGESID: SM6f3b05e100b2abc4174234f9ed52732b
NUMMEDIA: 0
SMSSID: SM6f3b05e100b2abc4174234f9ed52732b
SMSSTATUS: received
FROMCOUNTRY: GB
TO: +447481347170
NUMSEGMENTS: 1
MESSAGESID: SM6f3b05e100b2abc4174234f9ed52732b
ACCOUNTSID: ACf4a09fc9048473636db653aa6b2ba439
HTTP_USER_AGENT: TwilioProxy/1.1
HTTP_X_TWILIO_SIGNATURE: i1gdbiScjBXHQw+hOTkf2Z5FNcw=
 
ThinkAutomation © Parker Software 2016