Integrating IFTTT with Google Assistant and Adafruit IO

IFTTT allows quick and easy integrations with a lot of different services. Now we will start creating our IFTTT applet which will be connected to Google Assistant and Adafruit IO. IFTTT acts as a bridge between Google Assistant (our Voice Assistant) and Adafruit IO.

Click on the Create button on the IFTTT welcome screen. This will take you to the new applet creation screen. Here, we have to define the functionality of this applet in an "If This, Then That" format. Where the "If This" part acts as the trigger for the applet and the "Then That" part defines the action taken when the trigger is invoked. Click on the Add button next to the If This to create the trigger for this applet.

Since we are using Google Assistant as our Voice Assistant, we will have to configure it to act as the trigger. Use the search box at the top to search for Assistant, then click on the Google Assistant box that appears. A prompt will ask you to log in to your Google account and provide the relevant permissions.

If you have multiple Google accounts logged in on your phone, select the one which is used by Google Assistant. You can check it by opening Google Assistant and clicking on your display picture on the top right.

Google Assistant supports different types of Voice commands that can be used in different use cases. Here, we will use the Say a simple phrase option. This allows us to set a custom phrase that will trigger the IFTTT applet to take the relevant action.

Here, we have used Google Assistant as our voice assistant, if you prefer using Alexa as your voice assistant, just search for Alexa instead of Google Assistant and use the Say a specific phraseoption.

A new page will now open where we can specify the custom commands that will trigger the IFTTT applet to take action. You can specify up to 3 different variants of the command which will trigger the applet. Fill in your commands and specify what Assistant will say in response to the command. You can also set Assistant to reply in different languages. After the configuration is complete, click on Continue.

A new page will give you a review of the trigger: click on Complete and the trigger for the applet is now set. Now, in the applet screen we move on to define the action that IFTTT will take on trigger. Click on the Add button next to "Then That".

A new screen will open where we can select the action service. Search for Adafruit and click on the Adafruit box. A prompt will ask you to log in to your Adafruit account. Once logged in, provide the relevant permissions. We can now select the action to take with the Adafruit service. Choose Send data to Adafruit IO.

Now we need to specify the feed where we want to send the data. Select the assistant-lamp feed that we created earlier from the dropdown list. Now we need to specify the data to be sent, type 1 in the box. and click on Continue. Review the action that we just created and click on Finish. Now you will see an overview of the applet with the trigger and the action, click on continue and set a name for the applet.

We have now created our first applet, which listens for a command in Google Assistant and then sends a command to Adafruit IO.

Now create another applet in the same way which listens for a command to switch off the lamp and sends a 0 as the data to the assistant-lamp feed on Adafruit IO on the trigger.

Finally, you should have two applets, one for switching the lamp on and another for switching it off.

We have now completed the IFTTT set up and integrations with the Google Assistant and Adafruit IO.

Last updated