Login

Log Data into Google Sheets using IFTTT and NodeMCU

Objectives

  • Set up IFTTT to write data to Google Sheets
  • Write data from NodeMCU to Google Sheets using IFTTT

Things

  1. NodeMCU (quantity: 1 no.)
  2. Breadboard (quantity: 1 no.)
  3. MicroUSB cable (quantity: 1 no.)
  4. IFTTT account
  5. Google account
  6. Arduino IDE on your computer

Let’s begin!

IFTTT stands for If This Then That. It allows you to write data to Google Sheets using simple HTTP commands from the NodeMCU.

Step 1: Go to ifttt.com. Login and click on New Applet.

Step 2: Click on “this”

Step 3: Search and click on Webhooks

 Step 4:Click on Receive a web request

Step 5: Set the event name as sheets

Step 6: Click on “that”

 Step 7: Search and select Google Sheets

 Step 8: Click on Add row to spreadsheet

Step 9:  Select a name. Remove Value 2 and Value 3 from Formatted Row. Change the Drive folder path if you wish.

Step 10: Click on Finish

Step 11: Your IFTTT has been set up

Coding using Easycoding

Navigate to Easycoding and construct the following code on TUNIOT.

Blocks of code using Easycoding (TUNIOT)

On saving, it should give you a code which you can copy.

Final Code

To copy the code, right click on view raw at the bottom of the code, click on open link in new tab and then copy the code.

Uploading the code

Step 1: Enter the final code in the Arduino IDE window.

  • When you click on New to open a new blank code in the Arduino IDE, you will get a new  window with two functions: void setup() and void loop()
  • You can either type commands as shown in the final code under void setup() and void loop() functions or
  • Delete the contents of this window. Then copy and paste the final code in the Arduino IDE window.

Step 2: Compile/ verify the code by clicking on the verify button.

  • Make sure the board is connected to your computer
  • Check if the correct board and port is selected.

Step 3: Upload the code by clicking on the upload button, which is right next to the verify button.

  • The Arduino IDE provides a progress bar when it’s uploading.
  • After it is done, you will see “Done uploading” on the bottom left of your IDE.
  • If you encounter any errors, you need to go back to the code and fix the errors.

We would love to see what you build out of these learnings!

Click here to submit your projects, share it with the world and stand a chance to be rewarded.

top

Knowledge and Content by Li2 Technologies | © 2021 NASSCOM Foundation | All rights reserved

X