From 86c276ed1341231a6e079d921740b461a85fcb51 Mon Sep 17 00:00:00 2001 From: Linden Crandall Date: Thu, 6 Feb 2025 19:09:29 +0000 Subject: [PATCH] Add Twilio and SendGrid Trigger and Action Configs --- ...and-SendGrid-Trigger-and-Action-Configs.md | 72 +++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 Twilio-and-SendGrid-Trigger-and-Action-Configs.md diff --git a/Twilio-and-SendGrid-Trigger-and-Action-Configs.md b/Twilio-and-SendGrid-Trigger-and-Action-Configs.md new file mode 100644 index 0000000..32e410d --- /dev/null +++ b/Twilio-and-SendGrid-Trigger-and-Action-Configs.md @@ -0,0 +1,72 @@ +# 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: SMTP +- Action event: Send an email +- Choose connection: apikey +- 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 + +``` +- 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 \ No newline at end of file