Jump to content


Listener help

sms listener alert

  • Please log in to reply
3 replies to this topic

#1 billwatson



  • Members
  • PipPip
  • 14 posts

Posted 18 October 2015 - 02:30 AM

Hi All,


I'm having some trouble getting an sms listener to send a text to my Australian number.

lets say it's 0430941769.   Any chance you could pass your peepers over this to see if it's correct?

I'm not getting anything through.  My 'if' expression is good as I have tested it out on an email listener and it works fine.  Thanks so much for your time.


Here's my then expression:


    import com.carriots.sdk.utils.Sms;
    def sms = new Sms();
    sms.message="Coldroom temperature below 4 degrees";



#2 snehal.jabade



  • Members
  • Pip
  • 5 posts

Posted 09 March 2016 - 10:41 AM

Does anyone know how to create listener which sends an email using REST API?

#3 sdeancos


    Master of Puppets

  • Members
  • PipPipPip
  • 108 posts
  • LocationMadrid, Spain.

Posted 10 March 2016 - 01:50 PM


You can use the API Rest for to create a Listener, you can learn more in https://www.carriots...ules_management

I hope this help you.

#4 Yoleon


    Sugar Master

  • Members
  • PipPipPip
  • 57 posts

Posted 15 March 2016 - 12:59 PM



You can use this sample code to create a listener to send an email:


Host: https://api.carriots.com/listeners/
Content-Type: application/json
Carriots.apiKey: Your API KEY

    "name": "Listener_RESTAPI",
    "description": "REST API Listener",
    "event": "data_received",
    "enabled": true,
    "entity": {
        "entity_type": "Device",
        "id": "defaultDevice@Customer.Customer"
    "if_expression": "true",
    "then_expression": "import com.carriots.sdk.utils.Email;\ndef email = new Email ();\nemail.to= your email;\nemail.subject= \"RFID reader\";\nemail.message=\"RFID reader. Card read: \"+context.data.tag;\nemail.send();"


I hope this help you.


Carriots Staff

Also tagged with one or more of these keywords: sms, listener, alert

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users