Search This Blog

Tuesday 22 March 2016

IBM Bluemix NodeRed Demo using Twitter and Telstra SMS API

In this example I integrate Twitter Feed with Telstra SMS API to send an SMS based. It is based on the wrapper application which exposes the Telstra SMS API on Bluemix as per a previous Post.

http://theblasfrompas.blogspot.com.au/2015/08/integrating-telstra-public-sms-api-into.html

It is assumed you have NodeRed NodeJS application running on Bluemix and are at the Editor as shown below.



Steps

1. Drag a "Social -> Twitter" node onto the editor
2. Double click on the Node and ensure you add your twitter credentials and authorize twitter to work with NodeRed itself. Also use a FOR TAG you wish to receive as part of the feed from twitter, in this demo it is "#telstrasmaapi-pas"



3. Once done it will look as follows



4. Drag a "Function -> HTTP Request" onto the editor
5. Double click on the HTTP Request item and add details as shown below.

Method = POST
URL = http://pas-telstrasmsapi.mybluemix.net/telstrasms?to=0411151350&body=tweet sent about telstra SMS API
Name = Any name of your choice

Note: Ensure URL is changed to the mobile number you wish to use and a BODY you wish to send as part of the TEXT.


6. Connect the twitter node to the HTTP Request node as shown below.



7. Click the "Deploy" button
8. Now log into your Twitter account and send a Tweet using the TAG you identified above as shown below. You must use the TAG name you said your looking for in this case "#telstrasmaapi-pas"


9. It should then send an SMS to the identified mobile number you used (Australia Mobiles Only) as shown below.



More Information

For more information on NodeRed use the link below.

http://nodered.org/