- Set up IFTTT to write data to Google Sheets
- Write data from NodeMCU to Google Sheets using IFTTT
- NodeMCU (quantity: 1 no.)
- Breadboard (quantity: 1 no.)
- MicroUSB cable (quantity: 1 no.)
- IFTTT account
- Google account
- Arduino IDE on your computer
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.
On saving, it should give you a code which you can copy.
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.