Cloud App channel - Sample Templates

Samples Templates:

  1. Slack
  2. Delight
  3. Lob
  4. Zendesk
  5. Zapier
  6. Salesforce
  7. Google Analytics
  8. Adroll
  9. Whatsapp
  10. Facebook Messanger
  11. Segment.com
  12. Airship

 

1. Slack

The slack sample template allows messaging to a slack channel or user. A slack app is required to use this template. The receiving slack workspace must download this app and authorize incoming webhooks. Slack provides a unique url for each channel/user to send a message to. Copy and paste that url into the “API Endpoint” field in the template editor. Slack does not require authentication headers, so leave the auth fields blank.

Screen_Shot_2018-08-03_at_11.37.10_AM.png

For more information about the Slack API, visit: https://api.slack.com/incoming-webhooks.

 

2. Delight

The delighted template allows sending surveys to users. A Delighted account is required to use this template. To use the delighted template, only the “Auth Header Value” needs to be provided. All the other fields are already set. Copy the api_key (which can be found on the delighted website once you are logged in) and add a “:” to the end of it. Encode the API key along with the “:” using a Base64 encoder. Add this after “Basic ” in the “Auth Header Value” field. For example, if your API key is “7tb6ZeX2FDFQKxZARoMNB1haXGjo3IID”, then you need to encode “7tb6ZeX2FDFQKxZARoMNB1haXGjo3IID:” in a base64 encoder. This gives you “N3RiNlplWDJGREZRS3haQVJvTU5CMWhhWEdqbzNJSUQ6”. Put this in the “Auth Header Value” field, which will be “Basic N3RiNlplWDJGREZRS3haQVJvTU5CMWhhWEdqbzNJSUQ6”. The default way to send the template is by email, so you may want to open Advanced Settings and set the “Unique Sent Identifier” to email. You can also change the delighted channel by editing it in the source tab.


Screen_Shot_2018-08-03_at_11.38.55_AM.png

 

For more information about the Delighted API, visit: https://delighted.com/docs/api/sending-to-people

 

3. Lob

The lob template allows sending postcards to users. A Lob account is required to use this template. To use the lob template, only the “Auth Header Value” needs to be provided. It is similar to the delighted template. Copy the api_key (which can be found on the lob website once you are logged in) and add a “:” to the end of it. Encode the api key along with the “:” using a Base64 encoder. Add this after “Basic ” in the “Auth Header Value” field. For example, if your API key is “7tb6ZeX2FDFQKxZARoMNB1haXGjo3IID”, then you need to encode “7tb6ZeX2FDFQKxZARoMNB1haXGjo3IID:” in a base64 encoder. This gives you “N3RiNlplWDJGREZRS3haQVJvTU5CMWhhWEdqbzNJSUQ6”. Put this in the “Auth Header Value” field, which will be “Basic N3RiNlplWDJGREZRS3haQVJvTU5CMWhhWEdqbzNJSUQ6”.

 

Screen_Shot_2018-08-03_at_11.43.27_AM.png

 

For more information about the Lob API, visit: https://lob.com/docs/node#postcards_create

 

4. Zendesk

The Zendesk template allows creating a new customer support ticket. A Zendesk account is required to use this template. To use this template, only the “API Endpoint” and “Auth Header Value” need to be provided. For the “API Endpoint” field input your Zendesk subdomain as indicated. For example, if your zendesk subdomain is “mycompany”, then the “API Endpoint” will be “https://mycompany.zendesk.com/api/v2/tickets”.

 

For the “Auth Header Value” your zendesk email and password are required. You need to put the email, then a “:”, then the password, and base64 encode this. You need to add this to the end of “Basic ”. For example, if the email is “abc@example.com”, and the password is “Xyz123”, then “abc@example.com:Xyz123” needs to be encoded, which gives “YWJjQGV4YW1wbGUuY29tOlh5ejEyMw==”. So the final header will be

“Basic YWJjQGV4YW1wbGUuY29tOlh5ejEyMw==”.


Screen_Shot_2018-08-03_at_11.44.50_AM.png

 

5. Zapier

The Zapier template allows sending content to zapier, which connects apps and automates workflows. A Zapier account is required to use this template. Zapier provides a unique url for each channel/user to send a message to. Copy and paste that url into the “API Endpoint” field in the template editor. Zapier does not require authentication headers, so leave the auth fields blank.


Screen_Shot_2018-08-03_at_11.55.01_AM.png

For more information about the Zapier integrations, visit

https://zapier.com/help/webhooks/#how-get-started-webhooks-zapier

 

6. Salesforce

The Salesforce template allows creating a lead in Salesforce. A Salesforce account is required to use this template. To use this template, only the “API Endpoint” and “Auth Header Value” need to be provided.

 

A connected app must be created in Salesforce to use the template. Access the “Developer Console” in Salesforce. Go to “File”->”Open Resource”. If API access is enabled, another window should pop open. If it is disabled, you will see an error message. Contact your account manager to enable API access if it is disabled.

 

Navigate to “Setup Home”, and create a new “Connected App”, which can be found under “Apps -> Platform Tools”. Check “Enable OAuth Settings” and select “Full Access” for the connected app you created. Now you should have access to the consumer key and consumer secret,  which will be required to get the access token and instance url.

 

Disable the IP restrictions, by clicking the “Manage” button for the app and then the “Edit” button. Set “IP Relaxation” to “Relax IP restrictions”.

 

Finally, get the security token by navigating to your personal settings -> “Reset My Security Token”, and then clicking the “Reset Security Token” button, which should email you the security token.

 

To get the access token and instance url, make the following curl request after filling in the replacing the angular bracket pairs with the respective fields:

 

Curl -XPOST https://login.salesforce.com/services/oauth2/token \

-d “grant_type=password&client_id=<CONSUMER_KEY>&client_secret=<CONSUMER_SECRET>&username=<EMAIL>&password=<PASSWORD><SECURITY_TOKEN>” \

-H “X-PrettyPrint: 1”

 

Note that the email and password are those for your Salesforce account. You should receive a response which contains the access token and the instance url.  This is required to create a Salesforce template.

 

Replace “<INSTANCE_URL>” in the “API Endpoint” with the instance url provided by Salesforce. For example, if the instance url is “https://abc.salesforce.com”, the “API Endpoint” will be “https://abc.salesforce.com/services/data/v37.0/sobjects/Lead/Email/?_HttpMethod=PATCH”. Replace “<ACCESS_TOKEN>” in the “Auth Header Value” with the access token provided by Salesforce. For example, if the access token is “00D50000006GhkL5K3”, then the “Auth Header Value” will be “Bearer 00D50000006GhkL5K3”.


Screen_Shot_2018-08-03_at_11.46.42_AM.png

 

For more information about the Salesforce API visit

https://developer.salesforce.com/page/Salesforce_APIs


7. Google Analytics

The Google Analytics template allows updating data in Google Analytics. To use this template, only the “API Endpoint” needs to be provided. Replace “<TRACKING_ID>” with the tracking id provided by Google Analytics and “<CLIENT_ID>” by the Google Analytics account id. Replace the other fields contained within angular brackets with respective event details. Leave the content and auth fields blank.


Screen_Shot_2018-08-03_at_11.59.45_AM.png

For more information about the Google Analytics integrations, visit

https://developers.google.com/analytics/devguides/collection/protocol/v1/reference


8. AdRoll

The AdRoll template allows display advertising with journeys. An AdRoll account and an AdRoll developer account are required to use this template. To use this template, only the “API Endpoint” and “Auth Header Value” need to be provided. Using the developer account, you can create an app for AdRoll. The Client ID of the app acts as the API key. For the “API Endpoint” field input your AdRoll API key as indicated. For example, if your API key is “abc123xyz456”, then the “API Endpoint” will be “https://services.adroll.com/audience/v1/segments?apikey=abc123xyz456”. Note that the

 

For the “Auth Header Value” your AdRoll email and password are required. Note that these are your credentials for the main AdRoll account and not the developer account. You need to put the email, then a “:”, then the password, and base64 encode this. You need to add this to the end of “Basic ”. For example, if the email is “abc@example.com”, and the password is “Xyz123”, then “abc@example.com:Xyz123” needs to be encoded, which gives “YWJjQGV4YW1wbGUuY29tOlh5ejEyMw==”. So the final header will be

“Basic YWJjQGV4YW1wbGUuY29tOlh5ejEyMw==”.


Screen_Shot_2018-08-03_at_11.50.02_AM.png

For more information about the AdRoll API visit https://developers.adroll.com/docs/guides/create-audiences.html

 

9. Whatsapp

The Whatsapp template allows sending messages via Whatsapp Messenger. A Twilio account is required to use this template. To use this template, the “API Endpoint” and the “Auth Header Value” need to be provided. Follow the steps given in this link (https://www.twilio.com/docs/sms/whatsapp/quickstart/curl) to set up a Whatsapp sandbox on Twilio which can be used by the Whatsapp template.

 

Once the setup is complete on Twilio, you should have access to the Twilio account SID and the auth token. Fill in the Twilio account SID in the “Api Endpoint” field. For example, if the Twilio account SID is ACz759375464568t439w7854wds256adl2s, the “API Endpoint” will be “https://api.twilio.com/2010-04-01/Accounts/ACz759375464568t439w7854wds256adl2s/Messages.json”. If the auth token is “251d574h61437g831k85319u453qf5ga”, then “ACz759375464568t439w7854wds256adl2s:251d574h61437g831k85319u453qf5ga” needs to be base64 encoded, which gives “QUN6NzU5Mzc1NDY0NTY4dDQzOXc3ODU0d2RzMjU2YWRsMnM6MjUxZDU3NGg2MTQzN2c4MzFrODUzMTl1NDUzcWY1Z2E=”, so the “Auth Header Value” will be

“Basic QUN6NzU5Mzc1NDY0NTY4dDQzOXc3ODU0d2RzMjU2YWRsMnM6MjUxZDU3NGg2MTQzN2c4MzFrODUzMTl1NDUzcWY1Z2E=”

Screen_Shot_2018-08-03_at_12.20.19_PM.png

Since whatsapp uses phone number as an identifier, it is recommended to set the “Unique Sent Identifier” to “phone_number” under advanced settings.

 

10. Facebook Messenger

The Facebook Messenger template allows sending messages via Facebook Messenger. A Facebook developer account is required to use this template. To use this template, the “API Endpoint” needs to be provided. Follow the steps given in this link (https://developers.facebook.com/docs/messenger-platform/getting-started/app-setup) to set up a Facebook app.

 

Once the app is setup, you will have access to the page access token. Fill in the page access token in the “API Endpoint”. For example, if the page access token is “ACJA456ASDHJADJ456AFS7BA”, then the “API Endpoint” will be “https://graph.facebook.com/v2.6/me/messages?access_token=ACJA456ASDHJADJ456AFS7BA

Screen_Shot_2018-08-03_at_2.48.40_PM__1_.png

It is recommended to set the “Unique Sent Identifier” to the user attribute you use to identify the recipient. You can do this under advanced settings in the “Template Info” tab. For example, if you are using “phone_number” as the recipient attribute in the source tab, you should set the “Unique Sent Identifier” to “phone_number”.

 

For more information about the Facebook Messenger API visit https://developers.facebook.com/docs/messenger-platform/reference/send-api/#example_request

 

11. Segment.com

The Segment.com template allows you to record traits about a user in segment.com. A Segment account is required to use this template. To use this template, only the “Auth Header Value” needs to be provided. Obtain the Write Key from segment.com, add a “:”, and base64 encode it. Fill in the “Auth Header Value” field using the encoded write key. For example, if the write key is “abc123”, then “abc123:” needs to be base64 encoded which gives “YWJjMTIzOg==”, so the “Auth Header Value” will be “Basic YWJjMTIzOg==”.

 

Screen_Shot_2018-08-03_at_3.26.43_PM.png

 

For more information about the Segment API visit https://segment.com/docs/sources/server/http/

 

12. Airship 

The Airship template allows you to send push messages and provide in-app messaging on mobile and web platforms. An Airship account is required to use this template. To use this template, only the “Auth Header Value” needs to be set. The access token can be retrieved from the airship website (go.urbanairship.com), under “Settings” -> “APIs & Integrations” -> “Tokens”. For example, if the access token received from Airship is “XYZ17hfal8qfahGAFh38”, then the “Auth Header Value” field should be set to “Bearer XYZ17hfal8qfahGAFh38”.

mceclip0.png

To input the correct content to the template and get more information about the Airship API, visit https://docs.airship.com/api/ua/#operation/api/push/post

 

Was this article helpful?
0 out of 0 found this helpful