Engineers Garage

  • Electronic Projects & Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Audio Electronics
      • Battery Management
      • Brainwave
      • Electric Vehicles
      • EMI/EMC/RFI
      • Hardware Filters
      • IoT tutorials
      • Power Tutorials
      • Python
      • Sensors
      • USB
      • VHDL
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Product News
    • Business News
    • Company/Start-up News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • DigiKey Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Learn
    • eBooks/Tech Tips
    • Design Guides
    • Learning Center
    • Tech Toolboxes
    • Webinars & Digital Events
  • Resources
    • Digital Issues
    • EE Training Days
    • LEAP Awards
    • Podcasts
    • Webinars / Digital Events
    • White Papers
    • Engineering Diversity & Inclusion
    • DesignFast
  • Guest Post Guidelines
  • Advertise
  • Subscribe

How to send email alerts from Arduino/ESP8266/ESP32 through IFTTT

By Nikhil Agnihotri November 12, 2023

IFTTT plays a significant role in the Internet of Things (IoT) ecosystem. As IoT involves the interconnection of various devices and platforms, IFTTT provides a simple and user-friendly platform for devices to integrate together and automate embedded applications. IFTTT provides a cross-platform integration of among a multitude of platforms, brands, and standards, bridging the “things” together. It is a straightforward solution for setting up automation. It can be used for integrating IoT devices with web services, data logging, notifications and alerts, personalized interactions within IoT applications, or enhancing the functionality of IoT devices.

In this project, we will use the IFTTT platform to trigger email alerts or notifications from the ESP8266 or ESP32 board. Both are WiFi development boards, and both are easily installed within any WiFi-based IoT network.

What is IFTTT?
IFTTT stands for “If This Then That”. It is a web-based service that allows users to create custom, conditional automation between various online services, apps, and devices. Essentially, it lets you connect different online platforms in simple and complex ways by using what are called “Applets”.

How IFTTT works?
IFTTT functions with the help of applets. An IFTTT Applet is a predefined set of instructions or rules that automates actions between two or more services or devices using the IFTTT platform. An Applet has essentially two parts – Trigger and Action. A trigger is an event that initiates the Applet. It’s a condition or an occurrence within a service or device. For example, “If I post a new photo on Instagram” is a trigger. Action is a resulting task or event that the Applet automates in response to the trigger. Using the above example, “…then save that photo to my Dropbox account” is an action. Each Applet connects a specific “Trigger” from one service or device with an “Action” in another. In essence, it’s the realization of the “If This, Then That” statement for which IFTTT is named.

Setting up IFTTT for email notifications
In this project, we will use the IFTTT platform to send email notifications from the ESP8266 or ESP32 board to a valid email ID. First of all, we need to sign in and login to an account on the IFTTT platform. For this, open a browser and visit the IFTTT website.

Click on the Get Started button. Next, you can sign in IFTTT platform through Apple, Facebook, or Google account.

Login and navigate to the IFTTT home page. On the home page, click on the “Create” button to start creating an applet.

To create an applet, you first need to configure the Trigger part of the applet. Click on the “If This” button to start creating the trigger.

Next, search for webhooks among the services and click on the “Webhooks” button.

Next, select “Receive a web request”.

Next, click on the “Connect” button.

 

Next, name the event like “send_email_from_arduino” and click on the “Create trigger” button. This completes the trigger part of the applet.

Next, you need to create the Action part of the applet. So, click the “Then That” button.

Search for email among the services and select “Email”.

Next, select “Send me an email”.

Next, customize the email subject and body as you want. Click on the ‘Create Action” button.

Next, click on the “Continue” button.

Next, Click on the “Finish” button.

This completes the action part of the applet. Now, you need to access the key for the webhooks service. Open the applet and click on the trigger part of the applet.

Next, click on the “Documentation” button.

From the documentation, note down the key.

Both trigger and action parts of the applet are created, and we have the key for the webhooks service.

Circuit connections
We can trigger an email alert from ESP boards for any event on the microcontroller. Here, in this project, we trigger an email alert, when a push button is pressed on the ESP8266/ESP32. So, interface a push button with ESP8266/ESP32. Here, we have interfaced a pushbutton at pin 5 of ESP8266. Then, connect the ESP board with a computer through a Micro-USB cable. The circuit diagram for this is shown below.

Preparing ESP board
Next, we need to upload the sketch to the ESP board that connects the ESP8266/ESP32 with the IFTTT platform.

Arduino sketch

How it works
When the button interfaced to pin 5 of ESP8266 is pressed, an email notification is sent through the ESP board with the help of the IFTTT platform. The ESP board connects with the IFTTT platform through a local WiFi network.

The code
The sketch begins with importing the WiFi library for the ESP8266 board. Next variables are declared to store the SSID and network key of the WiFi network. Then, variables are declared to store the IFTTT server, key, and event name. The pin used to interface the push button is defined. An object of WiFiclient is initiated.

In the setup() function, WiFi is initialized and functions are called to connect the ESP board with the local WiFi network. The user-defined function somethingTriggered() is defined to detect an event at the ESP board. This could be anything. Here, we are pressing a push button to trigger an email notification. The user-defined function sendIFTTTEmail() drafts the email notification and sends to the registered email account through the IFTTT service. In the loop() function, the event is polled by calling the somethingTriggered() function, and if even has occurred like a button is pressed, the sendIFTTTEmail() function is called to send the email notification.

Result
On pressing the pushbutton interfaced at pin 5 of ESP8266, the following email is received.

 

You may also like:


  • Controlling IoT Devices through Emails over IMAP Protocol – IOT…

  • How to design an ESP32 WiFi manager using MicroPython

  • How to build a WhatsApp-notifying home security system

  • How to send SMS alerts from ESP32 without a GSM…

  • Getting started with ESP8266 and ESP32 on Arduino IDE

  • How to build a Node.js server to control Arduino from…

Filed Under: Arduino Projects, Electronic Projects, ESP8266
Tagged With: Arduino IFTTT, ESP IFTTT, ESP32 IFTTT, ESP8266 IFTTT, Sending Email from Arduino using IFTTT, Sending email from ESP using IFTTT
 

Next Article

← Previous Article
Next Article →

Questions related to this article?
👉Ask and discuss on EDAboard.com and Electro-Tech-Online.com forums.



Tell Us What You Think!! Cancel reply

You must be logged in to post a comment.

EE TECH TOOLBOX

“ee
Tech Toolbox: Internet of Things
Explore practical strategies for minimizing attack surfaces, managing memory efficiently, and securing firmware. Download now to ensure your IoT implementations remain secure, efficient, and future-ready.

EE Learning Center

EE Learning Center
“engineers
EXPAND YOUR KNOWLEDGE AND STAY CONNECTED
Get the latest info on technologies, tools and strategies for EE professionals.

HAVE A QUESTION?

Have a technical question about an article or other engineering questions? Check out our engineering forums EDABoard.com and Electro-Tech-Online.com where you can get those questions asked and answered by your peers!


RSS EDABOARD.com Discussions

  • Reducing "shoot-through" in offline Full Bridge SMPS?
  • High Side current sensing
  • How to simulate power electronics converter in PSpice?
  • Voltage mode pushpull is a nonsense SMPS?
  • Layout IRN reduction in Comparator

RSS Electro-Tech-Online.com Discussions

  • Back to the old BASIC days
  • Parts required for a personal project
  • PIC KIT 3 not able to program dsPIC
  • Failure of polypropylene motor-run capacitors
  • Siemens large industrial PLC parts

Featured – RPi Python Programming (27 Part)

  • RPi Python Programming 21: The SIM900A AT commands
  • RPi Python Programming 22: Calls & SMS using a SIM900A GSM-GPRS modem
  • RPi Python Programming 23: Interfacing a NEO-6MV2 GPS module with Raspberry Pi
  • RPi Python Programming 24: I2C explained
  • RPi Python Programming 25 – Synchronous serial communication in Raspberry Pi using I2C protocol
  • RPi Python Programming 26 – Interfacing ADXL345 accelerometer sensor with Raspberry Pi

Recent Articles

  • What is AWS IoT Core and when should you use it?
  • AC-DC power supply extends voltage range to 800 V DC
  • Infineon’s inductive sensor integrates coil system driver, signal conditioning circuits and DSP
  • Arm Cortex-M23 MCU delivers 87.5 µA/MHz active mode
  • STMicroelectronics releases automotive amplifiers with in-play open-load detection

EE ENGINEERING TRAINING DAYS

engineering

Submit a Guest Post

submit a guest post
Engineers Garage
  • Analog IC TIps
  • Connector Tips
  • Battery Power Tips
  • DesignFast
  • EDABoard Forums
  • EE World Online
  • Electro-Tech-Online Forums
  • EV Engineering
  • Microcontroller Tips
  • Power Electronic Tips
  • Sensor Tips
  • Test and Measurement Tips
  • 5G Technology World
  • Subscribe to our newsletter
  • About Us
  • Contact Us
  • Advertise

Copyright © 2025 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy

Search Engineers Garage

  • Electronic Projects & Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Audio Electronics
      • Battery Management
      • Brainwave
      • Electric Vehicles
      • EMI/EMC/RFI
      • Hardware Filters
      • IoT tutorials
      • Power Tutorials
      • Python
      • Sensors
      • USB
      • VHDL
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Product News
    • Business News
    • Company/Start-up News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • DigiKey Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Learn
    • eBooks/Tech Tips
    • Design Guides
    • Learning Center
    • Tech Toolboxes
    • Webinars & Digital Events
  • Resources
    • Digital Issues
    • EE Training Days
    • LEAP Awards
    • Podcasts
    • Webinars / Digital Events
    • White Papers
    • Engineering Diversity & Inclusion
    • DesignFast
  • Guest Post Guidelines
  • Advertise
  • Subscribe