You will need:
- Access to the Service Credentials
- To create an activity in the Forge UI
Create a new IFTTT applet using the "SMS" service with the Tagged SMS trigger:
Complete the steps to connect the trigger with your mobile device then add a hashtag that the SMS service can identify your messages with. For example #RunDataConnectActivity.
Next, choose "Maker" for the action service:
Choose the "Make a web request
" action:
At this stage you will need to refer back to the IBM Data Connect service credentials in Bluemix. The web request URL should be constructed using the format https://<userId>:<password>@<url>
in order to authenticate with the IBM Data Connect API, with the userId
, password
and url
values being taken from the service credentials (not your Bluemix IBM ID).
The /activities
API to run an activity is as follows:
Configure the Maker Web Request to POST
to:
https://<userId>:<password>@<url>/activities/v1/{{MessageNoHashtag}}/activityRuns
We want to be able to specify the id of the activity to be run in our SMS message. Using the "ingredient" {{MessageNoHashtag}}
inserts the SMS message (with the Hashtag omitted, leaving just the activity ID) into the URL.
This POST API does not require a payload.
Create the action then click Finish to complete the applet.
Next, return to the Forge UI and navigate to your Activity. You can obtain the ID of the Activity from the browser URL:
You should now be able to send an SMS to the number provided by the SMS service. Make sure the message contains the Activity ID and the hashtag #RunDataConnectActivity.
If you return to the Forge UI you should see the Activity running.
This project is an example of how the IBM Data Connect public API can be integrated with IoT services. It is a sample application which demonstrates data load using the IBM Data Connect service. The program is made available under the Apache license, Version 2.0. The program interfaces with the IBM Data Connect service, which is made available under a separate IBM license.
Comments