Autoforwarding SMS to an email address is very possible using our Forward to URL Activity an email creation service! In this example we're going to use a 3rd party app called Zapier which is free for low-traffic implementations and works well for a proof of concept.
How this works is that the Forward to URL Activity can, for specific or all incoming SMS, push the contents of the SMS our to a remote server. Zapier then provides this server 'endpoint' and can be configured easily to wrap these contents into an email and deliver it.
A. Create a Webhook/Email Zap
https://zapier.com/app/editor is the place where you set up the email.
- The Trigger app should be Webhook, Trigger is Catch Hook.
- The Action app is Email, the Action is Send Outbound Email.
- Zapier will then generate a custom webhook URL such as https://zapier.com/hooks/catch/abcabc you'll need this later.
- You can filer triggers but it's easier to skip this step and Continue to Step 5.
- Step 5 is where you build the email, for this you'll need to go back to Frontline and use the webhook URL from 3. above.
- Click on the Insert Fields button in the To input
- Copy the URL to your clipboard
- Return to Frontline keeping this Zapier tab open
B. Create the Forward to URL Activity
- Name your Activity and define whether or not your want to filter with keywords or push all SMS see https://frontlinecloud.zendesk.com/entries/78296989-Connecting-to-another-web-service-creating-a-Forward-to-URL-Activity for more help
- The Target URL should be in your clipboard from Step A3 above, it'll look something like https://zapier.com/hooks/catch/abcabc
- HTTP Method should be set as POST
- Each Parameter will now be set up to construct the email, you'll need at least 3 with other optional ones:
You may need to refer to our Magic Wand help article whilst populating these fields. Use the Magic Wand drop-down tool to populate the inputs. - Subject: Set this to something that is going to be useful e.g. 'SMS from frontline ${trigger.sourceNumber}'
- Body: You can simply enter the entire SMS here 'Message Text' or skip the Keyword if that is being used to define the email or route the SMS 'Message Text without Keyword'
- From: Can be set to the name or the number that sent the SMS 'Sender Name': ${trigger.contact.nameOrMobile} or if you require always the number and not the contact name then 'Sender Number'
- (optional if you are going to just send all the SMS emails to the same one email) To: set this if the SMS contents will define target. For example if the first 'word' in the SMS will be the target email then select 'Keyword' form the magic wand: ${trigger.getWord(1)}.
- (optional) cc, bcc, reply-to
- Save your Activity and trigger it once by sending in an SMS to your workspace. Be sure to ensure Keywords are correctly set in the SMS so that your Activity triggers and pushes the API Request to Zapier. Ensure this happened by viewing the Activity dashboard and checking the SMS appears in the Events log.
This is to establish a connection to Zapier and ensure Zapier knows what to expect from Frontline and how to construct the email...
C. Configure the parts of the email in Zapier
- Return to your Zapier configuration window or tab, you should now be on Step 5 'Match up Webhook Hook to Email Outbound Email'
- Click on the Insert Fields button in the To input and click through the form and Zapier will confirm it received the API Request from B5 above, Click 'All Done':
- Now you can start to enter the dynamic 'Magic Wand' parameters that you configured in B above. You should see a 'Field' for each of the keys you defined in the example below you'll see Body, To, From and Subject are options. If these are not there repeat Step B5 and work through the Insert Fields pop up above at Step C2 again.
- Simply match up the boxes as you have planned ensuring you select the variables with Zapier's selector. You can also add extra text here directly remembering that it will not be dynamic based on the SMS but the same for each. For example you might want to add your admin email address as a cc or bcc so that they have a copy.
- Continue to Step 6 where Zapier will give you some test options. Select 'Test Webhook Trigger' and 'Test Zap with this Sample'. If it succeeds, then check your Inbox and verify that the email received is correct.
- Name and Turn On your Zap and you're done!
With the Zap turned on, and the Frontline Activity turned on, all SMS that trigger the Activity in Frontline will in turn Trigger the Zap and create the email!
Happy Frontline Zapping!
0 Comments