Control SwitchBot Devices with AI via Chat
What this workflow does:
This workflow lets you control your SwitchBot smart home devices using natural language chat. Tell the AI what you want to do (e.g. "turn off the living room light"), and it will look up your devices, generate the correct SwitchBot API command, and send it automatically.
Workflow steps:
- When chat message received — triggered by a user message in the n8n chat interface
- Set Credentials — stores your SwitchBot API token and secret
- Get Auth — generates a signed authentication header using HMAC-SHA256
- Get Device List — fetches all registered devices from the SwitchBot API
- Generate API Request with AI — the AI reads the device list and user request, then generates the correct API URL and body
- Send Device Command — sends the POST request to SwitchBot to execute the command
Requirements:
- SwitchBot account with API token and secret
- OpenRouter API credentials (or swap for any compatible LLM)