Email Alert Quickstart Guide

Generate code to trigger email alerts with Temboo

I'm programming with
Select a Language
Arduino
Texas Instruments
Samsung
C#
Java
JavaScript
Node.js
PHP
Processing
Python
REST API
Ruby
iOS
Android
Arduino Yún
+ Yún Shield
Other Arduinos
Send email alerts from microcontrollers and applications to let you know when something happens. Stay on top of environmental monitors, equipment operation, or anything else you want to keep an eye on with code generated by Temboo.

Get Set Up

  1. If you don't already have it, install the latest version of the Arduino IDE. You should also make sure that you have the newest version of the Temboo Library by checking the Arduino Library Manager.
  2. Sign in to your Temboo account. If you don't already have one, you can register for free.
  3. Set up your Yún’s Internet connection. Arduino has a helpful guide if you need assistance.
  4. You'll need a Gmail account, which you can create here.
  5. Login to Google's Developer Console, and create a new Project if you haven't done so already.
  6. Under the API Manager section, select Library and make sure you've enabled API Access for the Google Sheets API.
  7. Select Credentials in the API Manager section, and create a new Client ID specifying Web application for the Application Type.
  8. When configuring the Consent Screen, make sure you fill out the Email Address and Product Name fields.
  9. Save the Consent Screen details and specify the callback URL below as the Authorized Redirect URI. Make sure to replace ACCOUNT_NAME with your Temboo account name.

    https://ACCOUNT_NAME.temboolive.com/callback/google
    
  10. Go to the Google > OAuth > InitializeOAuth Choreo page, and fill in the Client ID from the app you registered at Google and at least one of the following Scopes:

    https://www.googleapis.com/auth/gmail.modify
    https://www.googleapis.com/auth/gmail.send
    https://www.googleapis.com/auth/gmail.compose
    https://mail.google.com/
    
    Google OAuth Inputs
  11. Then click Generate Code to run the Choreo from our site. The InitializeOAuth choreo will return an authorization URL and a callback ID, which is required for the FinalizeOAuth step.

    Google OAuth Outputs
  12. Open a new web browser, navigate to the authorization URL returned by the InitializeOAuth Choreo, and click Allow to grant the app access to your Google account.

    Google OAuth Accept
  13. Go to the Google > OAuth > FinalizeOAuth Choreo page, and specify the callback ID returned earlier by the InitializeOAuth Choreo. Then click Generate Code to run the Choreo from our site. This process will return a Refresh Token which can be used to authorize your application with Google. Save it for use later.
  14. Generate Your Code

  15. Go to the Google > Gmailv2 > Messages > SendMessage Choreo in our Library.
  16. Select from the drop down menu.

  17. Select either Yún or an Arduino board paired with the Yún shield as your device configuration.
  18. Let's set up the sensor that will trigger email alerts. We provide unit converted data for specific sensor models, such as Celsius and Fahrenheit for temperature sensors. We also support unconverted data which is reported as raw values for analog data and high/low for digital.

    For this tutorial we're going to read temperature data from a Texas Instruments LMT84P. Our unit conversion formula assumes that your temperature sensor is connected to your 's 5V pin for its voltage in, and set up as specified in the sensor's data sheet.

    Using the virtual pin board on the Choreo page, select pin to set up your sensor. Select the category 'Temperature', then choose the Texas Instruments LMT84LP.

  19. Name your sensor and select your preferred temperature unit for sensor data conversion—we'll use Fahrenheit.
  20. Deselect the Graph Safe Bounds option. We aren't creating sensor graphs in this tutorial, so we won't need it. Check out our Data Vizualization Quickstart if you want to learn how to create live online sensor graphs for monitoring data.

  21. We want the to send an email if the temperature value is higher than 50ºF, so click the operator drop down menu and choose the greater than sign, and change the number to 50. We can also set how many times we want our email to send in the event that the condition is met—this helps prevent sending too many alert messages.

  22. Fill in the Client ID and Client Secret you got from the Google Developer Console. Supply the Refresh Token you got from the OAuth process, then hit the Save Profile button to save a Profile for your Gmail account. Now you can reuse your Gmailv2 authorization details on any of our Gmailv2 Choreos and it will also make your code simpler and more secure.

  23. Next, fill in the To and From email addresses, and the Subject and MessageBody of the message.
  24. Click Generate Code to test your inputs from the Temboo site. If you sent the email to yourself, you’ll find a new email waiting in your inbox!
  25. If you'd like, you can dynamically insert the value of your sensor reading into one of your inputs with the blue sensor button located inside the input field.

    Dynamically inserting a sensor value into a Choreo input
  26. Try it Out

  27. Scroll down to find the code box on the Choreo page. Copy the code, and paste it into a new sketch in the IDE.
  28. In order to run this sketch, it needs to be configured with an appropriate TembooAccount.h header file containing your Temboo account information. Header files for certain boards will also include the device’s internet connection details.

    To create the header file, make a new tab in the IDE, and name it TembooAccount.h.

  29. Beneath the code box you previously copied from the Choreo page, you’ll find a header file. Copy the contents of the header into the TembooAccount.h tab in your IDE.
  30. The final step before running any sketch is to confirm that you've selected the appropriate board and serial port in the Arduino IDE. Go to the Tools > Board menu and select the board you're working with. Then go to Tools > Serial Port and select the port your board is connected to.
  31. Save and upload the sketch to your Arduino and replicate the sensor trigger condition to send the email.
  32. If you sent the email to yourself, go check your inbox and you’ll find a new message from your waiting for you once your sensor trigger condition is met.
  33. Need help?

    We're always happy to help. Just email us at support@temboo.com, and we'll answer your questions.

    What's Next?

    Begin the
    Quickstart

    Begin
    Graph incoming data from a sensor

    Begin
  1. If you don't already have it, install the latest version of the Arduino IDE. You should also make sure that you have the newest version of the Temboo Library by checking the Arduino Library Manager.
  2. Sign in to your Temboo account. If you don't already have one, you can register for free.
  3. You'll need a Gmail account, which you can create here.
  4. Login to Google's Developer Console, and create a new Project if you haven't done so already.
  5. Under the API Manager section, select Library and make sure you've enabled API Access for the Google Sheets API.
  6. Select Credentials in the API Manager section, and create a new Client ID specifying Web application for the Application Type.
  7. When configuring the Consent Screen, make sure you fill out the Email Address and Product Name fields.
  8. Save the Consent Screen details and specify the callback URL below as the Authorized Redirect URI. Make sure to replace ACCOUNT_NAME with your Temboo account name.

    https://ACCOUNT_NAME.temboolive.com/callback/google
    
  9. Go to the Google > OAuth > InitializeOAuth Choreo page, and fill in the Client ID from the app you registered at Google and at least one of the following Scopes:

    https://www.googleapis.com/auth/gmail.modify
    https://www.googleapis.com/auth/gmail.send
    https://www.googleapis.com/auth/gmail.compose
    https://mail.google.com/
    
    Google OAuth Inputs
  10. Then click Generate Code to run the Choreo from our site. The InitializeOAuth choreo will return an authorization URL and a callback ID, which is required for the FinalizeOAuth step.

    Google OAuth Outputs
  11. Open a new web browser, navigate to the authorization URL returned by the InitializeOAuth Choreo, and click Allow to grant the app access to your Google account.

    Google OAuth Accept
  12. Go to the Google > OAuth > FinalizeOAuth Choreo page, and specify the callback ID returned earlier by the InitializeOAuth Choreo. Then click Generate Code to run the Choreo from our site. This process will return a Refresh Token which can be used to authorize your application with Google. Save it for use later.
  13. Generate Your Code

  14. Go to the Google > Gmailv2 > Messages > SendMessage Choreo in our Library.
  15. Select from the drop down menu.

  16. Select your board and add details about its internet connection.
  17. Let’s set up the sensor that will trigger email alerts. Using the virtual pin board on the Choreo page, select pin to set up your sensor. Select the category 'Temperature', and name your sensor.

  18. With your sensor in place, you'll see an option to set a condition based on your sensor value. We'll select the sensor we just set up. We want the text message to get sent if the sensor value is higher than 50, so we'll click the operator drop down menu and choose the greater than sign, and change the number 0 to 50. We can also set how many times we want our text message to send in the event that the condition is met—this helps prevent sending too many alert messages.

  19. Fill in the Client ID and Client Secret you got from the Google Developer Console. Supply the Refresh Token you got from the OAuth process, then hit the Save Profile button to save a Profile for your Gmail account. Now you can reuse your Gmailv2 authorization details on any of our Gmailv2 Choreos and it will also make your code simpler and more secure.

  20. Next, fill in the To and From email addresses, and the Subject and MessageBody of the message.
  21. Click Generate Code to test your inputs from the Temboo site. If you sent the email to yourself, you’ll find a new email waiting in your inbox!
  22. If you'd like, you can dynamically insert the value of your sensor reading into one of your inputs with the blue sensor button located inside the input field.

    Dynamically inserting a sensor value into a Choreo input
  23. Try it Out

  24. Scroll down to find the code box on the Choreo page. Copy the code, and paste it into a new sketch in the IDE.
  25. In order to run this sketch, it needs to be configured with an appropriate TembooAccount.h header file containing your Temboo account information. Header files for certain boards will also include the device’s internet connection details.

    To create the header file, make a new tab in the IDE, and name it TembooAccount.h.

  26. Beneath the code box you previously copied from the Choreo page, you’ll find a header file. Copy the contents of the header into the TembooAccount.h tab in your IDE.
  27. The final step before running any sketch is to confirm that you've selected the appropriate board and serial port in the Arduino IDE. Go to the Tools > Board menu and select the board you're working with. Then go to Tools > Serial Port and select the port your board is connected to.
  28. Save and upload the sketch to your Arduino and replicate the sensor trigger condition to send the email.
  29. If you sent the email to yourself, go check your inbox and you’ll find a new message from your waiting for you once your sensor trigger condition is met.
  30. Need help?

    We're always happy to help. Just email us at support@temboo.com, and we'll answer your questions.

    What's Next?

    Begin the
    Quickstart

    Begin
    Graph incoming data from a sensor

    Begin
  1. Sign in to your Temboo account. If you don't already have one, you can register for free.
  2. If this is your first time using Temboo, you'll need to set up your ARTIK board to find the Temboo libraries. To do so, you'll need to create the file temboo.conf in /etc/ld.so.conf.d. Inside of temboo.conf, you'll want to copy the line below and paste it into the file:

    /opt/iothub/artik/temboo/temboo_artik_library/lib
    
  3. After saving temboo.conf, run ldconfig from the command line to add the Temboo library directory to the system library search path.
  4. You’ll also need to get the IP address of your ARTIK board using ifconfig. The example below shows the results when the ARTIK board is connected to the internet through an ethernet cable. The IP address you'll want to use is listed next to inet.

    [root@localhost ~]$ ifconfig
    eth0: flags=4163  mtu 1500
            inet 10.11.6.200  netmask 255.255.255.0  broadcast 10.11.6.255
    
  5. You'll need a Gmail account, which you can create here.
  6. Login to Google's Developer Console, and create a new Project if you haven't done so already.
  7. Under the API Manager section, select Library and make sure you've enabled API Access for the Google Sheets API.
  8. Select Credentials in the API Manager section, and create a new Client ID specifying Web application for the Application Type.
  9. When configuring the Consent Screen, make sure you fill out the Email Address and Product Name fields.
  10. Save the Consent Screen details and specify the callback URL below as the Authorized Redirect URI. Make sure to replace ACCOUNT_NAME with your Temboo account name.

    https://ACCOUNT_NAME.temboolive.com/callback/google
    
  11. Go to the Google > OAuth > InitializeOAuth Choreo page, and fill in the Client ID from the app you registered at Google and at least one of the following Scopes:

    https://www.googleapis.com/auth/gmail.modify
    https://www.googleapis.com/auth/gmail.send
    https://www.googleapis.com/auth/gmail.compose
    https://mail.google.com/
    
    Google OAuth Inputs
  12. Then click Generate Code to run the Choreo from our site. The InitializeOAuth choreo will return an authorization URL and a callback ID, which is required for the FinalizeOAuth step.

    Google OAuth Outputs
  13. Open a new web browser, navigate to the authorization URL returned by the InitializeOAuth Choreo, and click Allow to grant the app access to your Google account.

    Google OAuth Accept
  14. Go to the Google > OAuth > FinalizeOAuth Choreo page, and specify the callback ID returned earlier by the InitializeOAuth Choreo. Then click Generate Code to run the Choreo from our site. This process will return a Refresh Token which can be used to authorize your application with Google. Save it for use later.
  15. Generate Your Code

  16. Go to the Google > Gmailv2 > Messages > SendMessage Choreo in our Library.
  17. Select from the drop down menu.

  18. Let’s set up the sensor that will trigger email alerts. Using the virtual pin board on the Choreo page, select pin to set up your sensor. Select the category 'Temperature', and name your sensor.

  19. With your sensor in place, you'll see an option to set a condition based on your sensor value. We'll select the sensor we just set up. We want the text message to get sent if the sensor value is higher than 50, so we'll click the operator drop down menu and choose the greater than sign, and change the number 0 to 50. We can also set how many times we want our text message to send in the event that the condition is met—this helps prevent sending too many alert messages.

  20. Fill in the Client ID and Client Secret you got from the Google Developer Console. Supply the Refresh Token you got from the OAuth process, then hit the Save Profile button to save a Profile for your Gmail account. Now you can reuse your Gmailv2 authorization details on any of our Gmailv2 Choreos and it will also make your code simpler and more secure.

  21. Next, fill in the To and From email addresses, and the Subject and MessageBody of the message.
  22. Click Generate Code to test your inputs from the Temboo site. If you sent the email to yourself, you’ll find a new email waiting in your inbox!
  23. If you'd like, you can dynamically insert the value of your sensor reading into one of your inputs with the blue sensor button located inside the input field.

    Dynamically inserting a sensor value into a Choreo input
  24. Download the generated code to your computer by clicking Download source code to the right of the code.

    Getting generated ARTIK code
  25. Try it Out

  26. Copy the downloaded zip file to your ARTIK board using scp. From your computer, go to the directory where the zip file is located and type the command below. Make sure you use the IP address for your board you found using ifconfig.

    [root@localhost ~]$ scp .zip root@xxx.xxx.xxx.xxx:/home
    
  27. From the ARTIK command line (either through a serial terminal or ssh session), change your current directory to /home. Next, unzip the generated code you just copied over. You can unzip the file by using the command below:

    [root@localhost ~]$ unzip .zip
    
  28. Now go to the directory and compile and run your code using the commands below. Run the first command to compile your code. After compiling has finished and no errors have been reported, run your program using the second command. After running the program, you should see the response from in your console.

    [root@localhost ~]$ gcc -L/opt/iothub/artik/temboo/temboo_artik_library/lib -ltemboo -I/opt/iothub/artik/temboo/temboo_artik_library/include s.c -o 
    [root@localhost ~]$ ./
    

    Note: If you get an error about cdefs.h not being found, this could mean your ARTIK board was not shipped with glibc-headers. This can be solved by reinstalling glibc-headers using the command below. After reinstalling glibc-headers, run the two commands above to compile and run your code.

    [root@localhost ~]$ yum reinstall glibc-headers
    
  29. If you sent the email to yourself, go check your inbox and you’ll find a new message from your waiting for you once your sensor trigger condition is met.
  30. Need help?

    We're always happy to help. Just email us at support@temboo.com, and we'll answer your questions.

    What's Next?

    Begin the
    Quickstart

    Begin
    Graph incoming data from a sensor

    Begin
  1. Download and install the latest version of the Energia IDE if you don't already have it.
  2. Sign in to your Temboo account. If you don't already have one, you can register for free.
  3. You'll need a Gmail account, which you can create here.
  4. Login to Google's Developer Console, and create a new Project if you haven't done so already.
  5. Under the API Manager section, select Library and make sure you've enabled API Access for the Google Sheets API.
  6. Select Credentials in the API Manager section, and create a new Client ID specifying Web application for the Application Type.
  7. When configuring the Consent Screen, make sure you fill out the Email Address and Product Name fields.
  8. Save the Consent Screen details and specify the callback URL below as the Authorized Redirect URI. Make sure to replace ACCOUNT_NAME with your Temboo account name.

    https://ACCOUNT_NAME.temboolive.com/callback/google
    
  9. Go to the Google > OAuth > InitializeOAuth Choreo page, and fill in the Client ID from the app you registered at Google and at least one of the following Scopes:

    https://www.googleapis.com/auth/gmail.modify
    https://www.googleapis.com/auth/gmail.send
    https://www.googleapis.com/auth/gmail.compose
    https://mail.google.com/
    
    Google OAuth Inputs
  10. Then click Generate Code to run the Choreo from our site. The InitializeOAuth choreo will return an authorization URL and a callback ID, which is required for the FinalizeOAuth step.

    Google OAuth Outputs
  11. Open a new web browser, navigate to the authorization URL returned by the InitializeOAuth Choreo, and click Allow to grant the app access to your Google account.

    Google OAuth Accept
  12. Go to the Google > OAuth > FinalizeOAuth Choreo page, and specify the callback ID returned earlier by the InitializeOAuth Choreo. Then click Generate Code to run the Choreo from our site. This process will return a Refresh Token which can be used to authorize your application with Google. Save it for use later.
  13. Generate Your Code

  14. Go to the Google > Gmailv2 > Messages > SendMessage Choreo in our Library.
  15. Select from the drop down menu.

  16. Select your board and add details about its internet connection.
  17. Let’s set up the sensor that will trigger email alerts. Using the virtual pin board on the Choreo page, select pin to set up your sensor. Select the category 'Temperature', and name your sensor.

  18. With your sensor in place, you'll see an option to set a condition based on your sensor value. We'll select the sensor we just set up. We want the text message to get sent if the sensor value is higher than 50, so we'll click the operator drop down menu and choose the greater than sign, and change the number 0 to 50. We can also set how many times we want our text message to send in the event that the condition is met—this helps prevent sending too many alert messages.

  19. Fill in the Client ID and Client Secret you got from the Google Developer Console. Supply the Refresh Token you got from the OAuth process, then hit the Save Profile button to save a Profile for your Gmail account. Now you can reuse your Gmailv2 authorization details on any of our Gmailv2 Choreos and it will also make your code simpler and more secure.

  20. Next, fill in the To and From email addresses, and the Subject and MessageBody of the message.
  21. Click Generate Code to test your inputs from the Temboo site. If you sent the email to yourself, you’ll find a new email waiting in your inbox!
  22. If you'd like, you can dynamically insert the value of your sensor reading into one of your inputs with the blue sensor button located inside the input field.

    Dynamically inserting a sensor value into a Choreo input
  23. Try it Out

  24. Scroll down to find the code box on the Choreo page. Copy the code, and paste it into a new sketch in the IDE.
  25. In order to run this sketch, it needs to be configured with an appropriate TembooAccount.h header file containing your Temboo account information. Header files for certain boards will also include the device’s internet connection details.

    To create the header file, make a new tab in the IDE, and name it TembooAccount.h.

  26. Beneath the code box you previously copied from the Choreo page, you’ll find a header file. Copy the contents of the header into the TembooAccount.h tab in your IDE.
  27. The final step before running any sketch is to confirm that you've selected the appropriate board and serial port in Energia. Go to the Tools > Board menu and select the LaunchPad you're working with. Then go to Tools > Serial Port and select the port your board is connected to.

    selecting your board in Energia
  28. With both files in place you are ready to upload the sketch to the LaunchPad. After running the sketch, open the Serial Monitor and you'll see the response from .
  29. If you sent the email to yourself, go check your inbox and you’ll find a new message from your waiting for you once your sensor trigger condition is met.
  30. Need help?

    We're always happy to help. Just email us at support@temboo.com, and we'll answer your questions.

    What's Next?

    Begin the
    Quickstart

    Begin
    Graph incoming data from a sensor

    Begin
  1. You'll need a free Texas Instruments account to use their online IDE, CCS Cloud. You can sign up here.
  2. If you haven't already done so, prepare your board for making secure connections by following our Setting up CC3220 for SSL tutorial.
  3. Sign in to your Temboo account. If you don't already have one, you can register for free.
  4. You'll need a Gmail account, which you can create here.
  5. Login to Google's Developer Console, and create a new Project if you haven't done so already.
  6. Under the API Manager section, select Library and make sure you've enabled API Access for the Google Sheets API.
  7. Select Credentials in the API Manager section, and create a new Client ID specifying Web application for the Application Type.
  8. When configuring the Consent Screen, make sure you fill out the Email Address and Product Name fields.
  9. Save the Consent Screen details and specify the callback URL below as the Authorized Redirect URI. Make sure to replace ACCOUNT_NAME with your Temboo account name.

    https://ACCOUNT_NAME.temboolive.com/callback/google
    
  10. Go to the Google > OAuth > InitializeOAuth Choreo page, and fill in the Client ID from the app you registered at Google and at least one of the following Scopes:

    https://www.googleapis.com/auth/gmail.modify
    https://www.googleapis.com/auth/gmail.send
    https://www.googleapis.com/auth/gmail.compose
    https://mail.google.com/
    
    Google OAuth Inputs
  11. Then click Generate Code to run the Choreo from our site. The InitializeOAuth choreo will return an authorization URL and a callback ID, which is required for the FinalizeOAuth step.

    Google OAuth Outputs
  12. Open a new web browser, navigate to the authorization URL returned by the InitializeOAuth Choreo, and click Allow to grant the app access to your Google account.

    Google OAuth Accept
  13. Go to the Google > OAuth > FinalizeOAuth Choreo page, and specify the callback ID returned earlier by the InitializeOAuth Choreo. Then click Generate Code to run the Choreo from our site. This process will return a Refresh Token which can be used to authorize your application with Google. Save it for use later.
  14. Generate Your Code

  15. Go to the Google > Gmailv2 > Messages > SendMessage Choreo in our Library.
  16. Select from the drop down menu.

  17. Select your board and add details about its internet connection.
  18. Let's set up the sensor that will trigger email alerts. We provide unit converted data for specific sensor models, such as Celsius and Fahrenheit for temperature sensors. We also support unconverted data which is reported as raw values for analog data and high/low for digital.

    For this tutorial we're going to read temperature data from a Texas Instruments LMT84P. Our unit conversion formula assumes that your temperature sensor is connected to your 's 5V pin for its voltage in, and set up as specified in the sensor's data sheet.

    Using the virtual pin board on the Choreo page, select pin to set up your sensor. Select the category 'Temperature', then choose the Texas Instruments LMT84LP.

  19. Name your sensor and select your preferred temperature unit for sensor data conversion—we'll use Fahrenheit.
  20. Deselect the Graph Safe Bounds option. We aren't creating sensor graphs in this tutorial, so we won't need it. Check out our Data Vizualization Quickstart if you want to learn how to create live online sensor graphs for monitoring data.

  21. We want the to send an email if the temperature value is higher than 50ºF, so click the operator drop down menu and choose the greater than sign, and change the number to 50. We can also set how many times we want our email to send in the event that the condition is met—this helps prevent sending too many alert messages.

  22. Fill in the Client ID and Client Secret you got from the Google Developer Console. Supply the Refresh Token you got from the OAuth process, then hit the Save Profile button to save a Profile for your Gmail account. Now you can reuse your Gmailv2 authorization details on any of our Gmailv2 Choreos and it will also make your code simpler and more secure.

  23. Next, fill in the To and From email addresses, and the Subject and MessageBody of the message.
  24. Click Generate Code to test your inputs from the Temboo site. If you sent the email to yourself, you’ll find a new email waiting in your inbox!
  25. If you'd like, you can dynamically insert the value of your sensor reading into one of your inputs with the blue sensor button located inside the input field.

    Dynamically inserting a sensor value into a Choreo input
  26. Try it Out

  27. Scroll down to the code box of the Choreo page. Click Send to CCS Cloud to the right of your generated code. Name your application and click Send. Click the link that appears to visit the CCS Cloud IDE in your browser.

    Sending your code to CCS Cloud
  28. Plug your CC3220 board into your computer via USB. Select its USB connection in CCS Cloud via the Target > Connect COM port... menu.
  29. Run the code on your CC3220 from CCS Cloud. After running the code, open the Serial Monitor and you'll see the response from the Choreo.

    Running your code on CCS Cloud

  30. If you sent the email to yourself, go check your inbox and you’ll find a new message from your waiting for you once your sensor trigger condition is met.
  31. Need help?

    We're always happy to help. Just email us at support@temboo.com, and we'll answer your questions.

    What's Next?

    Begin the
    Quickstart

    Begin
    Graph incoming data from a sensor

    Begin
  1. For this tutorial you will need Android 1.6 (or later) and an Android code editor. We've used Android Studio 0.4.6 for this tutorial, but they will work equally well in whatever IDE you are using.
  2. Sign in to your Temboo account. If you don't already have one, you can register for free.
  3. Create a new project in Android Studio.
    1. In the New Project dialog, name the application "Temboo Test" (or whatever you like), uncheck Create custom launcher icon, and click Next.
    2. Select Blank Activity, click Next.
    3. Leave the Activity Name and other settings as-is and click Finish.
  4. Download and extract the Temboo Android SDK.
  5. Add the Temboo SDK to your project:
    1. Find the core SDK .jar file (e.g. temboo-android-sdk-core-2.19.0.jar) in the Temboo SDK folder you just downloaded and extracted.
    2. Right-click and copy the .jar file, return to Android Studio, and right-click/paste the .jar into the libs folder of your project
    3. Right-click on the .jar and select Add as Library. Click OK on the dialog that's displayed.

    You've now added the core Temboo SDK to your project. Repeat the above steps to add the application bundle (e.g. -2.19.0.jar) from the Temboo SDK folder you just extracted, which will allow us to use APIs.

    Prepare your Android application

    We'll now make some adjustments to the default application that Android Studio has generated for us.

  6. Open the Android manifest located at app/src/main/res/AndroidManifest.xml. In order to access the internet, you will need to add <uses-permission android:name="android.permission.INTERNET"/> below the <application> tag.
  7. The default layout of the application included a TextView that we'll make use of, but before we can do so we need to give it an identifier. Locate and double-click on the fileapp > src > main > res > layout > activity_main.xml. This file describes the layout of our MainActivity class.
  8. Click on the "Hello World" text in the device emulator to select the TextView.
  9. In the Properties panel on the bottom-right of the editor, find the id property. Click to the right of it and enter @+id/response
  10. Next, locate the text property and delete the default "Hello World" value (we'll fill this in programmatically later).
  11. You'll need a Gmail account, which you can create here.
  12. Login to Google's Developer Console, and create a new Project if you haven't done so already.
  13. Under the API Manager section, select Library and make sure you've enabled API Access for the Google Sheets API.
  14. Select Credentials in the API Manager section, and create a new Client ID specifying Web application for the Application Type.
  15. When configuring the Consent Screen, make sure you fill out the Email Address and Product Name fields.
  16. Save the Consent Screen details and specify the callback URL below as the Authorized Redirect URI. Make sure to replace ACCOUNT_NAME with your Temboo account name.

    https://ACCOUNT_NAME.temboolive.com/callback/google
    
  17. Go to the Google > OAuth > InitializeOAuth Choreo page, and fill in the Client ID from the app you registered at Google and at least one of the following Scopes:

    https://www.googleapis.com/auth/gmail.modify
    https://www.googleapis.com/auth/gmail.send
    https://www.googleapis.com/auth/gmail.compose
    https://mail.google.com/
    
    Google OAuth Inputs
  18. Then click Generate Code to run the Choreo from our site. The InitializeOAuth choreo will return an authorization URL and a callback ID, which is required for the FinalizeOAuth step.

    Google OAuth Outputs
  19. Open a new web browser, navigate to the authorization URL returned by the InitializeOAuth Choreo, and click Allow to grant the app access to your Google account.

    Google OAuth Accept
  20. Go to the Google > OAuth > FinalizeOAuth Choreo page, and specify the callback ID returned earlier by the InitializeOAuth Choreo. Then click Generate Code to run the Choreo from our site. This process will return a Refresh Token which can be used to authorize your application with Google. Save it for use later.
  21. Generate Your Code

  22. Go to the Google > Gmailv2 > Messages > SendMessage Choreo in our Library.
  23. Select from the drop down menu.

  24. Fill in the Client ID and Client Secret you got from the Google Developer Console. Supply the Refresh Token you got from the OAuth process, then hit the Save Profile button to save a Profile for your Gmail account. Now you can reuse your Gmailv2 authorization details on any of our Gmailv2 Choreos and it will also make your code simpler and more secure.

  25. Next, fill in the To and From email addresses, and the Subject and MessageBody of the message.
  26. Click Generate Code to test your inputs from the Temboo site. If you sent the email to yourself, you’ll find a new email waiting in your inbox!
  27. Prepare Your Code

  28. Because network operations block the main thread execution, we'll need to make our calls to Temboo using AsyncTask. Create a new class that extends AsyncTask called "GmailTask" (or whatever you like), adding the @Override implementations for doInBackground and onProcessComplete.
  29. Add a constructor that takes a TextView as an argument. This will reference the TextView we set up earlier.
  30. Now that our AsyncTask is set up, copy the generated code snippet from the Temboo website and paste it into the doInBackground method of your AsyncTask class. We'll also add the required imports to create a SendMessage Choreo, SendMessageInputSet, and SendMessageResultSet:

    import com.temboo.Library.Google.Gmailv2.Messages.SendMessage;
    import com.temboo.Library.Google.Gmailv2.Messages.SendMessageInputSet;
    import com.temboo.Library.Google.Gmailv2.Messages.SendMessageResultSet;
    import com.temboo.core.TembooSession;
    
  31. Print the Results

    Each Choreo in the Android SDK returns a ResultSet subclass that contains get methods tailored specifically to the outputs of that Choreo. Using the ResultSet, you can retrieve the raw data (typically XML or JSON) returned by a third-party API or relevant fields that we've parsed out of the response for you.

    To update the UI with the API response returned by the Choreo, do the following:

  32. Add the following code at the bottom of the try block of the doInBackground method in your class:

    return gmailV2_sendMessage.get_Response();
  33. The return value we've just added is passed by Android as an argument to the onPostExecute method. We'll update the UI there:

        protected void onPostExecute(String result) {
            try {
                // Update the UI
                textView.setText(result);
            } catch(Exception e) {
                // if an exception occurred, show an error message
                Log.e(this.getClass().toString(), e.getMessage());
            }
        }
    
  34. Try it Out

  35. In order to see your new task in action, you will need to invoke it from the MainActivity class created with your project. The simplest way to do this is to add a call to it in the onCreate method.
  36. Deploy and run the application. After a few moments, the application will send the email and you'll see a response from Gmail in the UI.
  37. If you sent the email to yourself, go check your inbox and you’ll find a new message from your application waiting for you!
  38. Need help?

    We're always happy to help. Just email us at support@temboo.com, and we'll answer your questions.

    What's Next?

    Try out some of our other tutorials.
  1. For this tutorial, you will need the .NET 4.5 framework and Microsoft Visual Studio 2013 (or later) installed.
  2. Sign in to your Temboo account. If you don't already have one, you can register for free.
  3. In Visual Studio, create a new C# Console Application project. For this example, name it TembooTest. The new project should automatically include a C# class file called Program.cs containing a Main method.
  4. Download the Temboo C# SDK and extract the ZIP file into the directory where you keep your Visual Studio projects.
  5. In Visual Studio, right-click the References folder under TembooTest and select Add Reference. In the dialogue box that appears, click Browse and select TembooSDK.dll located in the bin folder within the extracted Temboo SDK directory. Click OK.
  6. You'll need a Gmail account, which you can create here.
  7. Login to Google's Developer Console, and create a new Project if you haven't done so already.
  8. Under the API Manager section, select Library and make sure you've enabled API Access for the Google Sheets API.
  9. Select Credentials in the API Manager section, and create a new Client ID specifying Web application for the Application Type.
  10. When configuring the Consent Screen, make sure you fill out the Email Address and Product Name fields.
  11. Save the Consent Screen details and specify the callback URL below as the Authorized Redirect URI. Make sure to replace ACCOUNT_NAME with your Temboo account name.

    https://ACCOUNT_NAME.temboolive.com/callback/google
    
  12. Go to the Google > OAuth > InitializeOAuth Choreo page, and fill in the Client ID from the app you registered at Google and at least one of the following Scopes:

    https://www.googleapis.com/auth/gmail.modify
    https://www.googleapis.com/auth/gmail.send
    https://www.googleapis.com/auth/gmail.compose
    https://mail.google.com/
    
    Google OAuth Inputs
  13. Then click Generate Code to run the Choreo from our site. The InitializeOAuth choreo will return an authorization URL and a callback ID, which is required for the FinalizeOAuth step.

    Google OAuth Outputs
  14. Open a new web browser, navigate to the authorization URL returned by the InitializeOAuth Choreo, and click Allow to grant the app access to your Google account.

    Google OAuth Accept
  15. Go to the Google > OAuth > FinalizeOAuth Choreo page, and specify the callback ID returned earlier by the InitializeOAuth Choreo. Then click Generate Code to run the Choreo from our site. This process will return a Refresh Token which can be used to authorize your application with Google. Save it for use later.
  16. Generate Your Code

  17. Go to the Google > Gmailv2 > Messages > SendMessage Choreo in our Library.
  18. Select from the drop down menu.

  19. Fill in the Client ID and Client Secret you got from the Google Developer Console. Supply the Refresh Token you got from the OAuth process, then hit the Save Profile button to save a Profile for your Gmail account. Now you can reuse your Gmailv2 authorization details on any of our Gmailv2 Choreos and it will also make your code simpler and more secure.

  20. Next, fill in the To and From email addresses, and the Subject and MessageBody of the message.
  21. Click Generate Code to test your inputs from the Temboo site. If you sent the email to yourself, you’ll find a new email waiting in your inbox!
  22. Try it Out

  23. To send an email from your C# code, copy the generated code from your browser directly into your C# class and run your code.
  24. If you sent the email to yourself, go check your inbox and you’ll find a new message from your application waiting for you!
  25. Need help?

    We're always happy to help. Just email us at support@temboo.com, and we'll answer your questions.

    What's Next?

    Try out some of our other tutorials.
  1. For this tutorial, you will need the iOS 7 SDK and Xcode 6.
  2. Sign in to your Temboo account. If you don't already have one, you can register for free.
  3. For simplicity's sake, we'll create a command line tool that will print its results to the Xcode console. For an example of using Temboo with a UI-based application (as you would on an iPhone or iPad) check out our Facebook OAuth example.
  4. Create a new Xcode project: OS X > Application > Command Line Tool.
  5. Name it TembooTest, select Objective-C as the Language, and click Next (the other fields are optional and may be left blank) to save your new project.
  6. Download and extract the Temboo iOS SDK, noting where it's been saved.
  7. Click on the folder that contains your project's code (it should be called TembooTest and contain a file called main.m), then select Add Files to TembooTest from the File menu. Browse to where you saved the Temboo SDK, locate and click on the core folder inside the SDK src folder. Make sure that Copy items if needed is unchecked and Create groups is selected, and then click Add.
  8. Repeat the above steps to add the TMB.h and TMB.m files located in the SDk's src/library folder.
  9. You'll need a Gmail account, which you can create here.
  10. Login to Google's Developer Console, and create a new Project if you haven't done so already.
  11. Under the API Manager section, select Library and make sure you've enabled API Access for the Google Sheets API.
  12. Select Credentials in the API Manager section, and create a new Client ID specifying Web application for the Application Type.
  13. When configuring the Consent Screen, make sure you fill out the Email Address and Product Name fields.
  14. Save the Consent Screen details and specify the callback URL below as the Authorized Redirect URI. Make sure to replace ACCOUNT_NAME with your Temboo account name.

    https://ACCOUNT_NAME.temboolive.com/callback/google
    
  15. Go to the Google > OAuth > InitializeOAuth Choreo page, and fill in the Client ID from the app you registered at Google and at least one of the following Scopes:

    https://www.googleapis.com/auth/gmail.modify
    https://www.googleapis.com/auth/gmail.send
    https://www.googleapis.com/auth/gmail.compose
    https://mail.google.com/
    
    Google OAuth Inputs
  16. Then click Generate Code to run the Choreo from our site. The InitializeOAuth choreo will return an authorization URL and a callback ID, which is required for the FinalizeOAuth step.

    Google OAuth Outputs
  17. Open a new web browser, navigate to the authorization URL returned by the InitializeOAuth Choreo, and click Allow to grant the app access to your Google account.

    Google OAuth Accept
  18. Go to the Google > OAuth > FinalizeOAuth Choreo page, and specify the callback ID returned earlier by the InitializeOAuth Choreo. Then click Generate Code to run the Choreo from our site. This process will return a Refresh Token which can be used to authorize your application with Google. Save it for use later.
  19. Generate Your Code

  20. Go to the Google > Gmailv2 > Messages > SendMessage Choreo in our Library.
  21. Select from the drop down menu.

  22. Fill in the Client ID and Client Secret you got from the Google Developer Console. Supply the Refresh Token you got from the OAuth process, then hit the Save Profile button to save a Profile for your Gmail account. Now you can reuse your Gmailv2 authorization details on any of our Gmailv2 Choreos and it will also make your code simpler and more secure.

  23. Next, fill in the To and From email addresses, and the Subject and MessageBody of the message.
  24. Click Generate Code to test your inputs from the Temboo site. If you sent the email to yourself, you’ll find a new email waiting in your inbox!
  25. Try it Out

  26. Copy the generated iOS code from your browser and paste it into your project's main.m file between the Foundation.h import statement and the main method. Make sure that you're using the Profile you created earlier and that you're sending the email to the address you want to send it to.
  27. Finally, make sure to update your main method to run the Choreo, and then run your code.
  28. If you sent the email to yourself, go check your inbox and you’ll find a new message from your application waiting for you!
  29. Need help?

    We're always happy to help. Just email us at support@temboo.com, and we'll answer your questions.

    What's Next?

    Try out some of our other tutorials.
  1. For this tutorial you will need Java 1.6 (or later) and a Java code editor. We've used Eclipse for these tutorials, but they will work equally well in whatever IDE you are using.
  2. Sign in to your Temboo account. If you don't already have one, you can register for free.
  3. Create a new Java project in Eclipse and add a folder called /libs.
  4. Download the Temboo Java SDK.
  5. Copy the downloaded JAR into the /libs folder. Refresh the project, then right-click the JAR file and select: Build Path > Add to Build Path.
  6. Add a new Java class containing a main method to your project. You can call it whatever you like.
  7. You'll need a Gmail account, which you can create here.
  8. Login to Google's Developer Console, and create a new Project if you haven't done so already.
  9. Under the API Manager section, select Library and make sure you've enabled API Access for the Google Sheets API.
  10. Select Credentials in the API Manager section, and create a new Client ID specifying Web application for the Application Type.
  11. When configuring the Consent Screen, make sure you fill out the Email Address and Product Name fields.
  12. Save the Consent Screen details and specify the callback URL below as the Authorized Redirect URI. Make sure to replace ACCOUNT_NAME with your Temboo account name.

    https://ACCOUNT_NAME.temboolive.com/callback/google
    
  13. Go to the Google > OAuth > InitializeOAuth Choreo page, and fill in the Client ID from the app you registered at Google and at least one of the following Scopes:

    https://www.googleapis.com/auth/gmail.modify
    https://www.googleapis.com/auth/gmail.send
    https://www.googleapis.com/auth/gmail.compose
    https://mail.google.com/
    
    Google OAuth Inputs
  14. Then click Generate Code to run the Choreo from our site. The InitializeOAuth choreo will return an authorization URL and a callback ID, which is required for the FinalizeOAuth step.

    Google OAuth Outputs
  15. Open a new web browser, navigate to the authorization URL returned by the InitializeOAuth Choreo, and click Allow to grant the app access to your Google account.

    Google OAuth Accept
  16. Go to the Google > OAuth > FinalizeOAuth Choreo page, and specify the callback ID returned earlier by the InitializeOAuth Choreo. Then click Generate Code to run the Choreo from our site. This process will return a Refresh Token which can be used to authorize your application with Google. Save it for use later.
  17. Generate Your Code

  18. Go to the Google > Gmailv2 > Messages > SendMessage Choreo in our Library.
  19. Select from the drop down menu.

  20. Fill in the Client ID and Client Secret you got from the Google Developer Console. Supply the Refresh Token you got from the OAuth process, then hit the Save Profile button to save a Profile for your Gmail account. Now you can reuse your Gmailv2 authorization details on any of our Gmailv2 Choreos and it will also make your code simpler and more secure.

  21. Next, fill in the To and From email addresses, and the Subject and MessageBody of the message.
  22. Click Generate Code to test your inputs from the Temboo site. If you sent the email to yourself, you’ll find a new email waiting in your inbox!
  23. Try it Out

  24. Copy the generated code from your browser directly into the main method of your Java class and organize your imports. Now run your code.
  25. If you sent the email to yourself, go check your inbox and you’ll find a new message from your application waiting for you!
  26. Need help?

    We're always happy to help. Just email us at support@temboo.com, and we'll answer your questions.

    What's Next?

    Try out some of our other tutorials.
  1. When using the Temboo JavaScript SDK, you’ll need a proxy in a server-side language and a web application server. A proxy communicates with a server, since JavaScript only runs on the client side. In this tutorial we'll be using PHP, but you can use any of these server-side languages with web application server.
  2. Sign in to your Temboo account. If you don't already have one, you can register for free.
  3. Create a new .html file and save it as temboo-example.html into a folder where you'll save the rest of your project files.
  4. Create a new .php file and save it as proxy-server.php into the same project folder as your temboo-example.html file.
  5. Download the latest Temboo JavaScript SDK and unzip the file.
  6. Change the name of the resulting folder to js-sdk and move it into the same folder as your temboo-example.html file.
  7. Download the latest Temboo PHP SDK and unzip the file.
  8. Change the name of the resulting folder to php-sdk and move it into the same folder as your temboo-example.html file. Your project folder should look similar to the screenshot below:

  9. You'll need a Gmail account, which you can create here.
  10. Login to Google's Developer Console, and create a new Project if you haven't done so already.
  11. Under the API Manager section, select Library and make sure you've enabled API Access for the Google Sheets API.
  12. Select Credentials in the API Manager section, and create a new Client ID specifying Web application for the Application Type.
  13. When configuring the Consent Screen, make sure you fill out the Email Address and Product Name fields.
  14. Save the Consent Screen details and specify the callback URL below as the Authorized Redirect URI. Make sure to replace ACCOUNT_NAME with your Temboo account name.

    https://ACCOUNT_NAME.temboolive.com/callback/google
    
  15. Go to the Google > OAuth > InitializeOAuth Choreo page, and fill in the Client ID from the app you registered at Google and at least one of the following Scopes:

    https://www.googleapis.com/auth/gmail.modify
    https://www.googleapis.com/auth/gmail.send
    https://www.googleapis.com/auth/gmail.compose
    https://mail.google.com/
    
    Google OAuth Inputs
  16. Then click Generate Code to run the Choreo from our site. The InitializeOAuth choreo will return an authorization URL and a callback ID, which is required for the FinalizeOAuth step.

    Google OAuth Outputs
  17. Open a new web browser, navigate to the authorization URL returned by the InitializeOAuth Choreo, and click Allow to grant the app access to your Google account.

    Google OAuth Accept
  18. Go to the Google > OAuth > FinalizeOAuth Choreo page, and specify the callback ID returned earlier by the InitializeOAuth Choreo. Then click Generate Code to run the Choreo from our site. This process will return a Refresh Token which can be used to authorize your application with Google. Save it for use later.
  19. Generate Your Code

  20. Go to the Google > Gmailv2 > Messages > SendMessage Choreo in our Library.
  21. Select from the drop down menu.

  22. Fill in the Client ID and Client Secret you got from the Google Developer Console. Supply the Refresh Token you got from the OAuth process, then hit the Save Profile button to save a Profile for your Gmail account. Now you can reuse your Gmailv2 authorization details on any of our Gmailv2 Choreos and it will also make your code simpler and more secure.

  23. Next, fill in the To and From email addresses, and the Subject and MessageBody of the message.
  24. Click Generate Code to test your inputs from the Temboo site. If you sent the email to yourself, you’ll find a new email waiting in your inbox!
  25. Try it Out

  26. Scroll down to find the Code section of the Choreo page. Copy and paste the code snippet into your index.html file.
  27. In the same file, make sure that your script source points to the correct location of the temboo.js SDK file.

    <!-- Adjust to point at the copy of the Temboo JavaScript SDK on your server -->
    <script src="js-sdk/js/temboo.js">< /script>
    
  28. In the same file, we'll also want to confirm that the location of our proxy is correctly specified. Our server is proxy-server.php.

    // Instantiate the client proxy with the URI of your server proxy
    var temboo = new TembooProxy('proxy-server.php');
    
  29. You'll notice another code snippet box below the Code section on the Choreo page called Proxy Code. Use the dropdown menu to select PHP, then copy and paste the code snippet into your proxy-server.php file.
  30. In the proxy-server.php file, make sure that the require_once line points to the correct location of the PHP SDK file in the php-sdk folder that you downloaded earlier.

    require_once('php-sdk/src/temboo.php');
    
  31. Now let's add a few more lines so that we can see when an email has been sent without looking in the developer console. In your index.html file, locate the console.log print statement in the showResult success callback function and replace them with document.write statements.

    // Success callback
    var showResult = function(outputs, outputFilters) {
        // Display outputs
        if(outputFilters) {
            // Display named output filters
            for(var name in outputFilters) {
                console.log(name + ':');
                for(var item in outputs[name]) {
                    document.write('    ' + outputs[name][item]);
                }
            }
        } else {
            // Display raw outputs
            for(var name in outputs) {
                document.write(name + ': ' + outputs[name]);
            }
        }
    };
    
  32. Run your PHP server.
  33. If you sent the email to yourself, go check your inbox and you’ll find a new message from your application waiting for you!
  34. Need help?

    We're always happy to help. Just email us at support@temboo.com, and we'll answer your questions.

    What's Next?

    Try out some of our other tutorials.
  1. Install Node.js v0.8.0 (or later) on your system if you don't already have it.
  2. Sign in to your Temboo account. If you don't already have one, you can register for free.
  3. Create a new .js file wherever you would like to build this Node.js sample project. In this example, we'll call the file tembootest.js, though you can call it whatever you like.
  4. Download the Temboo Node.js SDK and extract it.
  5. The SDK is in a directory called node_modules in accordance with the convention established by the Node Package Manager. Move the node_modules folder to the same directory as your new .js project file.
  6. You'll need a Gmail account, which you can create here.
  7. Login to Google's Developer Console, and create a new Project if you haven't done so already.
  8. Under the API Manager section, select Library and make sure you've enabled API Access for the Google Sheets API.
  9. Select Credentials in the API Manager section, and create a new Client ID specifying Web application for the Application Type.
  10. When configuring the Consent Screen, make sure you fill out the Email Address and Product Name fields.
  11. Save the Consent Screen details and specify the callback URL below as the Authorized Redirect URI. Make sure to replace ACCOUNT_NAME with your Temboo account name.

    https://ACCOUNT_NAME.temboolive.com/callback/google
    
  12. Go to the Google > OAuth > InitializeOAuth Choreo page, and fill in the Client ID from the app you registered at Google and at least one of the following Scopes:

    https://www.googleapis.com/auth/gmail.modify
    https://www.googleapis.com/auth/gmail.send
    https://www.googleapis.com/auth/gmail.compose
    https://mail.google.com/
    
    Google OAuth Inputs
  13. Then click Generate Code to run the Choreo from our site. The InitializeOAuth choreo will return an authorization URL and a callback ID, which is required for the FinalizeOAuth step.

    Google OAuth Outputs
  14. Open a new web browser, navigate to the authorization URL returned by the InitializeOAuth Choreo, and click Allow to grant the app access to your Google account.

    Google OAuth Accept
  15. Go to the Google > OAuth > FinalizeOAuth Choreo page, and specify the callback ID returned earlier by the InitializeOAuth Choreo. Then click Generate Code to run the Choreo from our site. This process will return a Refresh Token which can be used to authorize your application with Google. Save it for use later.
  16. Generate Your Code

  17. Go to the Google > Gmailv2 > Messages > SendMessage Choreo in our Library.
  18. Select from the drop down menu.

  19. Fill in the Client ID and Client Secret you got from the Google Developer Console. Supply the Refresh Token you got from the OAuth process, then hit the Save Profile button to save a Profile for your Gmail account. Now you can reuse your Gmailv2 authorization details on any of our Gmailv2 Choreos and it will also make your code simpler and more secure.

  20. Next, fill in the To and From email addresses, and the Subject and MessageBody of the message.
  21. Click Generate Code to test your inputs from the Temboo site. If you sent the email to yourself, you’ll find a new email waiting in your inbox!
  22. Try it Out

  23. To send an email from your Node.js code, make sure that you've got the correct require statements, then copy the generated code from your browser directly into your Node.js class and run it there.
  24. If you sent the email to yourself, go check your inbox and you’ll find a new message from your application waiting for you!
  25. Need help?

    We're always happy to help. Just email us at support@temboo.com, and we'll answer your questions.

    What's Next?

    Try out some of our other tutorials.
  1. Be sure that you have PHP 5 (or later) and a PHP code editor. We've used Sublime Text for our tutorials but they will work equally well in whatever IDE you are using.
  2. Sign in to your Temboo account. If you don't already have one, you can register for free.
  3. Create a new PHP file in your preferred editor.
  4. Download the Temboo PHP SDK.
  5. Unzip the downloaded SDK and move the resulting php-sdk folder into the same parent folder as your new, blank PHP file.

  6. Add the Temboo PHP SDK to your script:

    require 'php-sdk/src/temboo.php';
  7. You'll need a Gmail account, which you can create here.
  8. Login to Google's Developer Console, and create a new Project if you haven't done so already.
  9. Under the API Manager section, select Library and make sure you've enabled API Access for the Google Sheets API.
  10. Select Credentials in the API Manager section, and create a new Client ID specifying Web application for the Application Type.
  11. When configuring the Consent Screen, make sure you fill out the Email Address and Product Name fields.
  12. Save the Consent Screen details and specify the callback URL below as the Authorized Redirect URI. Make sure to replace ACCOUNT_NAME with your Temboo account name.

    https://ACCOUNT_NAME.temboolive.com/callback/google
    
  13. Go to the Google > OAuth > InitializeOAuth Choreo page, and fill in the Client ID from the app you registered at Google and at least one of the following Scopes:

    https://www.googleapis.com/auth/gmail.modify
    https://www.googleapis.com/auth/gmail.send
    https://www.googleapis.com/auth/gmail.compose
    https://mail.google.com/
    
    Google OAuth Inputs
  14. Then click Generate Code to run the Choreo from our site. The InitializeOAuth choreo will return an authorization URL and a callback ID, which is required for the FinalizeOAuth step.

    Google OAuth Outputs
  15. Open a new web browser, navigate to the authorization URL returned by the InitializeOAuth Choreo, and click Allow to grant the app access to your Google account.

    Google OAuth Accept
  16. Go to the Google > OAuth > FinalizeOAuth Choreo page, and specify the callback ID returned earlier by the InitializeOAuth Choreo. Then click Generate Code to run the Choreo from our site. This process will return a Refresh Token which can be used to authorize your application with Google. Save it for use later.
  17. Generate Your Code

  18. Go to the Google > Gmailv2 > Messages > SendMessage Choreo in our Library.
  19. Select from the drop down menu.

  20. Fill in the Client ID and Client Secret you got from the Google Developer Console. Supply the Refresh Token you got from the OAuth process, then hit the Save Profile button to save a Profile for your Gmail account. Now you can reuse your Gmailv2 authorization details on any of our Gmailv2 Choreos and it will also make your code simpler and more secure.

  21. Next, fill in the To and From email addresses, and the Subject and MessageBody of the message.
  22. Click Generate Code to test your inputs from the Temboo site. If you sent the email to yourself, you’ll find a new email waiting in your inbox!
  23. Try it Out

  24. To send an email from your PHP code, copy the generated Code from your browser directly into your PHP script. Uncomment the line that declares the Temboo_Session object, and run your code.
  25. If you sent the email to yourself, go check your inbox and you’ll find a new message from your application waiting for you!
  26. Need help?

    We're always happy to help. Just email us at support@temboo.com, and we'll answer your questions.

    What's Next?

    Try out some of our other tutorials.
  1. If you don't already have it, download and install the latest version of Processing.
  2. Sign in to your Temboo account. If you don't already have one, you can register for free.
  3. Download the Temboo Library for Processing. Unzip the file and put the temboo folder into your Documents/Processing/libraries/ folder (or My Documents/Processing/libraries/ on a PC). If Processing is currently open, restart it so that it will recognize the Temboo library that you just added.
  4. You'll need a Gmail account, which you can create here.
  5. Login to Google's Developer Console, and create a new Project if you haven't done so already.
  6. Under the API Manager section, select Library and make sure you've enabled API Access for the Google Sheets API.
  7. Select Credentials in the API Manager section, and create a new Client ID specifying Web application for the Application Type.
  8. When configuring the Consent Screen, make sure you fill out the Email Address and Product Name fields.
  9. Save the Consent Screen details and specify the callback URL below as the Authorized Redirect URI. Make sure to replace ACCOUNT_NAME with your Temboo account name.

    https://ACCOUNT_NAME.temboolive.com/callback/google
    
  10. Go to the Google > OAuth > InitializeOAuth Choreo page, and fill in the Client ID from the app you registered at Google and at least one of the following Scopes:

    https://www.googleapis.com/auth/gmail.modify
    https://www.googleapis.com/auth/gmail.send
    https://www.googleapis.com/auth/gmail.compose
    https://mail.google.com/
    
    Google OAuth Inputs
  11. Then click Generate Code to run the Choreo from our site. The InitializeOAuth choreo will return an authorization URL and a callback ID, which is required for the FinalizeOAuth step.

    Google OAuth Outputs
  12. Open a new web browser, navigate to the authorization URL returned by the InitializeOAuth Choreo, and click Allow to grant the app access to your Google account.

    Google OAuth Accept
  13. Go to the Google > OAuth > FinalizeOAuth Choreo page, and specify the callback ID returned earlier by the InitializeOAuth Choreo. Then click Generate Code to run the Choreo from our site. This process will return a Refresh Token which can be used to authorize your application with Google. Save it for use later.
  14. Generate Your Code

  15. Go to the Google > Gmailv2 > Messages > SendMessage Choreo in our Library.
  16. Select from the drop down menu.

  17. Fill in the Client ID and Client Secret you got from the Google Developer Console. Supply the Refresh Token you got from the OAuth process, then hit the Save Profile button to save a Profile for your Gmail account. Now you can reuse your Gmailv2 authorization details on any of our Gmailv2 Choreos and it will also make your code simpler and more secure.

  18. Next, fill in the To and From email addresses, and the Subject and MessageBody of the message.
  19. Click Generate Code to test your inputs from the Temboo site. If you sent the email to yourself, you’ll find a new email waiting in your inbox!
  20. Try it out

  21. To try out the code yourself, find the code box on the Choreo page and copy and paste the code into your Processing sketch, then run it there.
  22. If you sent the email to yourself, go check your inbox and you’ll find a new message from your application waiting for you!
  23. Need help?

    We're always happy to help. Just email us at support@temboo.com, and we'll answer your questions.

    What's Next?

    Try out some of our other tutorials.
  1. Make sure that Python 2.6 (or later) is installed on your system.
  2. Sign in to your Temboo account. If you don't already have one, you can register for free.
  3. Create a new .py file the directory where you'd like to build this Python sample project. In this example, we'll call the file TembooTest.py, though you can call it whatever you like.
  4. Download the Temboo Python SDK and extract the ZIP file to the same directory as your new .py file.
  5. You'll need a Gmail account, which you can create here.
  6. Login to Google's Developer Console, and create a new Project if you haven't done so already.
  7. Under the API Manager section, select Library and make sure you've enabled API Access for the Google Sheets API.
  8. Select Credentials in the API Manager section, and create a new Client ID specifying Web application for the Application Type.
  9. When configuring the Consent Screen, make sure you fill out the Email Address and Product Name fields.
  10. Save the Consent Screen details and specify the callback URL below as the Authorized Redirect URI. Make sure to replace ACCOUNT_NAME with your Temboo account name.

    https://ACCOUNT_NAME.temboolive.com/callback/google
    
  11. Go to the Google > OAuth > InitializeOAuth Choreo page, and fill in the Client ID from the app you registered at Google and at least one of the following Scopes:

    https://www.googleapis.com/auth/gmail.modify
    https://www.googleapis.com/auth/gmail.send
    https://www.googleapis.com/auth/gmail.compose
    https://mail.google.com/
    
    Google OAuth Inputs
  12. Then click Generate Code to run the Choreo from our site. The InitializeOAuth choreo will return an authorization URL and a callback ID, which is required for the FinalizeOAuth step.

    Google OAuth Outputs
  13. Open a new web browser, navigate to the authorization URL returned by the InitializeOAuth Choreo, and click Allow to grant the app access to your Google account.

    Google OAuth Accept
  14. Go to the Google > OAuth > FinalizeOAuth Choreo page, and specify the callback ID returned earlier by the InitializeOAuth Choreo. Then click Generate Code to run the Choreo from our site. This process will return a Refresh Token which can be used to authorize your application with Google. Save it for use later.
  15. Generate Your Code

  16. Go to the Google > Gmailv2 > Messages > SendMessage Choreo in our Library.
  17. Select from the drop down menu.

  18. Fill in the Client ID and Client Secret you got from the Google Developer Console. Supply the Refresh Token you got from the OAuth process, then hit the Save Profile button to save a Profile for your Gmail account. Now you can reuse your Gmailv2 authorization details on any of our Gmailv2 Choreos and it will also make your code simpler and more secure.

  19. Next, fill in the To and From email addresses, and the Subject and MessageBody of the message.
  20. Click Generate Code to test your inputs from the Temboo site. If you sent the email to yourself, you’ll find a new email waiting in your inbox!
  21. Try it Out

  22. Copy the generated code from your browser directly into your new .py file.
  23. Now you're ready to run the script. Here's the command you need to run if you're executing this from the command line. Otherwise just run it from your IDE.

    python TembooTest.py
    
  24. If you sent the email to yourself, go check your inbox and you’ll find a new message from your application waiting for you!
  25. Need help?

    We're always happy to help. Just email us at support@temboo.com, and we'll answer your questions.

    What's Next?

    Try out some of our other tutorials.
  1. To follow this tutorial, you will need Ruby 1.9 (or later) and a Ruby code editor installed on your system.
  2. Sign in to your Temboo account. If you don't already have one, you can register for free.
  3. Create a new Ruby project somewhere in your filesystem.
  4. Add a new Ruby script to your project. You can call it whatever you like.
  5. Download the Temboo Ruby SDK.
  6. In a terminal window, navigate to the location of your downloaded SDK. Type gem install temboo-ruby-sdk-x.gem, where x is the version number. You will now be able to access Temboo's Ruby SDK in your code.
  7. You'll need a Gmail account, which you can create here.
  8. Login to Google's Developer Console, and create a new Project if you haven't done so already.
  9. Under the API Manager section, select Library and make sure you've enabled API Access for the Google Sheets API.
  10. Select Credentials in the API Manager section, and create a new Client ID specifying Web application for the Application Type.
  11. When configuring the Consent Screen, make sure you fill out the Email Address and Product Name fields.
  12. Save the Consent Screen details and specify the callback URL below as the Authorized Redirect URI. Make sure to replace ACCOUNT_NAME with your Temboo account name.

    https://ACCOUNT_NAME.temboolive.com/callback/google
    
  13. Go to the Google > OAuth > InitializeOAuth Choreo page, and fill in the Client ID from the app you registered at Google and at least one of the following Scopes:

    https://www.googleapis.com/auth/gmail.modify
    https://www.googleapis.com/auth/gmail.send
    https://www.googleapis.com/auth/gmail.compose
    https://mail.google.com/
    
    Google OAuth Inputs
  14. Then click Generate Code to run the Choreo from our site. The InitializeOAuth choreo will return an authorization URL and a callback ID, which is required for the FinalizeOAuth step.

    Google OAuth Outputs
  15. Open a new web browser, navigate to the authorization URL returned by the InitializeOAuth Choreo, and click Allow to grant the app access to your Google account.

    Google OAuth Accept
  16. Go to the Google > OAuth > FinalizeOAuth Choreo page, and specify the callback ID returned earlier by the InitializeOAuth Choreo. Then click Generate Code to run the Choreo from our site. This process will return a Refresh Token which can be used to authorize your application with Google. Save it for use later.
  17. Generate Your Code

  18. Go to the Google > Gmailv2 > Messages > SendMessage Choreo in our Library.
  19. Select from the drop down menu.

  20. Fill in the Client ID and Client Secret you got from the Google Developer Console. Supply the Refresh Token you got from the OAuth process, then hit the Save Profile button to save a Profile for your Gmail account. Now you can reuse your Gmailv2 authorization details on any of our Gmailv2 Choreos and it will also make your code simpler and more secure.

  21. Next, fill in the To and From email addresses, and the Subject and MessageBody of the message.
  22. Click Generate Code to test your inputs from the Temboo site. If you sent the email to yourself, you’ll find a new email waiting in your inbox!
  23. Try it Out

  24. Copy the generated code from your browser directly into your Ruby class.
  25. Put your imports in place at the top of the file. They should look like the sample below.

    require "temboo"
    require "Library/Google"
    
  26. Run your script to send the email.
  27. If you sent the email to yourself, go check your inbox and you’ll find a new message from your application waiting for you!
  28. Need help?

    We're always happy to help. Just email us at support@temboo.com, and we'll answer your questions.

    What's Next?

    Try out some of our other tutorials.
  1. To follow this tutorial, you will need to have cURL installed on your system.
  2. Sign in to your Temboo account. If you don't already have one, you can register for free.
  3. You'll need a Gmail account, which you can create here.
  4. Login to Google's Developer Console, and create a new Project if you haven't done so already.
  5. Under the API Manager section, select Library and make sure you've enabled API Access for the Google Sheets API.
  6. Select Credentials in the API Manager section, and create a new Client ID specifying Web application for the Application Type.
  7. When configuring the Consent Screen, make sure you fill out the Email Address and Product Name fields.
  8. Save the Consent Screen details and specify the callback URL below as the Authorized Redirect URI. Make sure to replace ACCOUNT_NAME with your Temboo account name.

    https://ACCOUNT_NAME.temboolive.com/callback/google
    
  9. Go to the Google > OAuth > InitializeOAuth Choreo page, and fill in the Client ID from the app you registered at Google and at least one of the following Scopes:

    https://www.googleapis.com/auth/gmail.modify
    https://www.googleapis.com/auth/gmail.send
    https://www.googleapis.com/auth/gmail.compose
    https://mail.google.com/
    
    Google OAuth Inputs
  10. Then click Generate Code to run the Choreo from our site. The InitializeOAuth choreo will return an authorization URL and a callback ID, which is required for the FinalizeOAuth step.

    Google OAuth Outputs
  11. Open a new web browser, navigate to the authorization URL returned by the InitializeOAuth Choreo, and click Allow to grant the app access to your Google account.

    Google OAuth Accept
  12. Go to the Google > OAuth > FinalizeOAuth Choreo page, and specify the callback ID returned earlier by the InitializeOAuth Choreo. Then click Generate Code to run the Choreo from our site. This process will return a Refresh Token which can be used to authorize your application with Google. Save it for use later.
  13. Generate Your Code

  14. Go to the Google > Gmailv2 > Messages > SendMessage Choreo in our Library.
  15. Select from the drop down menu.

  16. Fill in the Client ID and Client Secret you got from the Google Developer Console. Supply the Refresh Token you got from the OAuth process, then hit the Save Profile button to save a Profile for your Gmail account. Now you can reuse your Gmailv2 authorization details on any of our Gmailv2 Choreos and it will also make your code simpler and more secure.

  17. Next, fill in the To and From email addresses, and the Subject and MessageBody of the message.
  18. Click Generate Code to test your inputs from the Temboo site. If you sent the email to yourself, you’ll find a new email waiting in your inbox!
  19. Try it Out

  20. Scroll down to find the code section of the Choreo page and copy the auto-generated cURL command.
  21. Paste the cURL command into your Terminal window and run it.
  22. If you sent the email to yourself, go check your inbox and you’ll find a new message sent from your command line waiting for you.
  23. Need help?

    We're always happy to help. Just email us at support@temboo.com, and we'll answer your questions.

    What's Next?

    Try out some of our other tutorials.