Using temboo to send a variable SMS?

Hey Friends!

I’m using an HTU21D sensor with Temboo to send a text to my cell phone when the temperature/humidity go past a certain amount… My question for ya’ll pertains to what is contained in the “body” of the text that is sent to my cell phone. I would like to send something like “the temperature is out of bounds and XX (<<<< a variable) degrees”. I’m not sure how to add a numerical variable into my code here.

The line in particular that needs addressing is:

SendSMSChoreo.addInput(“Body”, “temp out of bounds”);



#include <Bridge.h>
#include <Temboo.h>
#include "TembooAccount.h" // contains Temboo account information, as described below
#include <Wire.h>
#include "SparkFunHTU21D.h"

int numRuns = 1;   // Execution count, so this doesn't run forever
int maxRuns = 10;   // Maximum number of times the Choreo should be executed

//Create instance of sensor
HTU21D myHumidity;

void setup() {
  // For debugging, wait until the serial console is connected

void loop() {
  float humd = myHumidity.readHumidity();
  float temp = myHumidity.readTemperature();
  if (humd >= 30) { 
  if (numRuns <= maxRuns) {
    Serial.println("Running SendSMS - Run #" + String(numRuns++));
    TembooChoreo SendSMSChoreo;

    // Invoke the Temboo client

    // Set Temboo account credentials
    // Set Choreo inputs
    SendSMSChoreo.addInput("AuthToken", "XXXXXX");
    SendSMSChoreo.addInput("Body", "temp out of bounds");
    SendSMSChoreo.addInput("To", "+XXXXXXXXXXX");
    SendSMSChoreo.addInput("AccountSID", "XXXXXXXX");
    SendSMSChoreo.addInput("From", "+11111111111");
    // Identify the Choreo to run
    // Run the Choreo; when results are available, print them to serial;
    while(SendSMSChoreo.available()) {
      char c =;

  delay(30000); // wait 30 seconds between SendSMS calls

Convert your 'variable' to a string, append it to the end of the constant text and pass that to the 'SendSMSChoreo.addInput' function?

Hi there, I work for Temboo.

dannable is right, you just need to convert the temperature variable to a string and append it to the text String. You should be able to do something like this:

String bodyValue = "the temperature is out of bounds and " + String(temp) + " degrees";
SendSMSChoreo.addInput("Body", bodyValue);

If you have any questions, feel free to contact us at - we're always happy to help.