Page:
Twilio and SendGrid Trigger and Action Configs
Clone
2
Twilio and SendGrid Trigger and Action Configs
Linden Crandall edited this page 2025-02-08 02:56:20 +00:00
Twilio Trigger
- When someone sends an SMS message to the Twilio number, trigger the action
Trigger Configs:
- Choose an app: Twilio
- Trigger event: Receive an SMS
- Choose connection: enter Twilio SID and Auth Token
- Set up a trigger: Twilio number (should auto populate this field)
- Test Trigger: Select test and continue. This will create an API post request to Twilio, should return this kind of response:
To:"+xxxxxxxxxx"
Body:"Automatisch test"
From:"+xxxxxxxxxx"
SmsSid:"xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
NumMedia:"0"
SmsStatus:"received"
AccountSid:"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
ApiVersion:"2010-04-01"
NumSegments:"1"
SendGrid Action
- Send an email to Courtney Hurt or whoever when Twilio Trigger occurs
Action Configs:
Choose an app & event:
- SMTP
- Action event: Send an email
- Continue
Choose connection --> Add new connection
- Host
smtp.sendgrid.net
- Email/Username:
apikey
- password:
<SENDGRID API KEY>
- Use TLS?
Yes
- Port:
587
- From email:
kyle@sprinklersnorthwest.com
(Landry's sample email from SendGrid) - Submit
Set up action:
- From name: TWILIO SMS FORWARDING SERVICE
- From email: kyle@sprinklersnorthwest.com (Landry's sample email from SendGrid)
- Reply to: doesn't do anything, left blank and not required
- To: more recipeint emails separated by commas
- cc: more recipeint emails separated by commas
- bcc: more recipeint emails separated by commas
- Subject: CUSTOMER SMS ALERT
- Body: email message. e.g.:
Inbound SMS message sent from customer to Twilio number +12089441216:
From: +18313534073
Message: Automatisch test
Twilio SMS ID: xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
- Continue
Test action
- Select Test and continue. This will create an API post request to SendGrid, should return this kind of response:
accepted: [] 2 items
0:"lindencrandall123@gmail.com"
1:"linden@shilohcode.com"
envelope: {} 2 keys
to: [] 2 items
0:"lindencrandall123@gmail.com"
1:"linden@shilohcode.com"
from:"kyle@sprinklersnorthwest.com"
rejected: [] 0 items
response:"250 Ok: queued as Bct8HuysS5S5eIWJwzgf0w"
messageId:"<81868c82-42fc-ab90-79a0-07857e6885ba@sprinklersnorthwest.com>"
messageSize:540
messageTime:758
envelopeTime:661
- Select publish in the top right corner to activate this trigger and action. Then every time anyone sends an SMS message to the Twilio number, this notification system should trigger