> For the complete documentation index, see [llms.txt](https://docs.smartlight.hackedit.de/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.smartlight.hackedit.de/integrations/api/examples/ifttt-google-assistant.md).

# IFTTT & Google Assistant

{% hint style="danger" %}
You need an [IFTTT Account](https://ifttt.com/discover) to continue.
{% endhint %}

### 0. Open IFTTT and create a new action

Open: <https://ifttt.com/create>

### 1. Create Action Trigger

1. Choose "Google Assistant" as the Service
2. Choose "Say a phrase with a text ingredient"
3. Enter some phrases with a $ placeholders like: "*Turn the light $*" (figure 1) and choose your language.
4. Click "Create Trigger"

![figure 1](/files/-LWBvNSNkOZ8Oyk8GUV6)

### 2. Create Action

1. Choose "Webhooks" (figure 2) as your action service.
2. Fill in the webhook form
   1. URL: `http://localhost:5000/aj-smartlight/us-central1/api/units/setNL`
   2. Method: `POST`
   3. Content Type: `application/JSON`
   4. Body
      1. Open the Web-App, go to settings and create your personal access token. (figure 3)
      2. Body Content: `{ "userid": "YOUR USERID", "token": "YOUR ACCESS TOKEN", "lang": "de", "payload": "{{TextField}}" }`
3. Click "Create Action"

![figure 3](/files/-LWBxJ-D24z-AHRC0tGD)

![figure 2](/files/-LWBvwzXB6HkPO4knLXD)

### 3. Test it - "Hey Google, turn on the kitchen light"

That's it. Now enjoy using your voice to control your home.\
The API understands a lot of colors and all the named gradients you have saved. If you discover that the Assistant doesn't understand some words correctly, you can give your lamps and groups "tags" which will be handled like aliases.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.smartlight.hackedit.de/integrations/api/examples/ifttt-google-assistant.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
