
HOME ASSISTANT n8n INTEGRATION: AUTOMATE HOME ASSISTANT WITH N8N
HOME ASSISTANT N8N INTEGRATION: AUTOMATE HOME ASSISTANT WITH N8N
Need help automating Homeassistant with n8n?
Our team will get back to you in minutes.
Why automate Homeassistant with n8n?
The Home Assistant n8n integration gives you access to 13 distinct actions covering configuration checks, entity management, event creation, service calls, state manipulation, log retrieval, and even camera operations. This means you can extend your smart home capabilities far beyond what Home Assistant alone can do.
Significant time savings stand out as the primary benefit. Instead of manually checking logs, triggering services, or monitoring entity states, you can build automated workflows that handle these tasks 24/7. Imagine automatically sending a Slack notification when your security camera detects motion, or logging all error events to a Google Sheet for weekly review—all without lifting a finger.
Seamless integration is where n8n truly shines. By connecting Home Assistant to over 400 applications in n8n's ecosystem, you unlock possibilities like: syncing smart home events with your CRM like HubSpot, triggering marketing automations based on occupancy sensors, backing up configuration states to cloud storage, or creating tickets in your helpdesk when error logs spike. The combination of Home Assistant's local intelligence with n8n's workflow orchestration creates a powerful automation engine for both home and business use cases.
How to connect Homeassistant to n8n?
! 2 stepsHow to connect Homeassistant to n8n?
- 01
HomeAssistant - Config Get
This action retrieves the current configuration of your Home Assistant instance, including details like location, unit system, time zone, and installed components. It's useful for documentation, monitoring, and conditional workflow logic.
Key parameters: Credential to connect with (required), Resource (set to "Config"), and Operation (set to "Get" to retrieve the current configuration).
Use cases: Document your Home Assistant setup automatically, build conditional logic based on configuration settings (e.g., different workflows for metric vs. imperial units), or monitor for configuration changes over time by comparing snapshots.
- 02
Get Screenshot
This action captures a screenshot from a camera entity in Home Assistant, making it available as binary data in your n8n workflow. It's perfect for security monitoring, visual logging, or integrating camera feeds with other systems.
Key parameters: Credential to connect with (required), Resource (set to "Camera Proxy"), Operation (set to "Get Screenshot"), Camera Entity Name or ID (text input specifying which camera to capture from, e.g.,
camera.front_door), and Put Output File in Field (text field, default: "data", naming the binary field where the screenshot will be stored).Use cases: Send camera snapshots via email or Telegram or WhatsApp when motion is detected, log visual records to cloud storage (Dropbox, Google Drive) on a schedule, or create visual alerts that include camera captures when security events occur.
TIP💡 TIP: Store your Long-Lived Access Token securely and consider creating a dedicated Home Assistant user specifically for n8n integrations. This way, you can easily revoke access without affecting other integrations, and you'll have clearer audit logs of which actions were triggered by your automations. For more guidance on securing your workflow credentials, check our n8n troubleshooting guide.- 01
Need help automating Homeassistant with n8n?
Our team will get back to you in minutes.
Homeassistant actions available in n8n
01 Action 01HomeAssistant Template Create
This action allows you to create dynamic templates directly in Home Assistant through your n8n workflow. Templates in Home Assistant are powerful tools for computing values, formatting text, or creating conditional logic based on entity states—and now you can generate them programmatically.
Key parameters: Credential to connect with (required dropdown for authentication), Resource (set to "Template"), Operation (set to "Create"), and Template (text input for your Jinja2 template code).
Use cases: Generate personalized notification messages that include current sensor values, create computed values combining multiple entity states for use in downstream workflow nodes, or format dates, times, or numbers according to specific requirements before sending to external services.

02 Action 02HomeAssistant - Get Many States
This action retrieves multiple entity states from your Home Assistant instance in a single request. It's invaluable when you need a snapshot of your entire smart home status or want to monitor several devices simultaneously within your workflow.
Key parameters: Credential to connect with (required), Resource (set to "State"), Operation (set to "Get Many"), Return All toggle switch, and Limit (numerical input, default: 50) to control the number of states returned.
Use cases: Create a daily report of all sensor readings sent via email, monitor all security-related entities (doors, windows, motion sensors) and trigger alerts if any are in unexpected states, or build a dashboard data feed that collects temperature, humidity, and energy consumption from multiple rooms.

03 Action 03Home Assistant - Entity Get
This action fetches detailed information about a specific entity in your Home Assistant setup. Use it when you need precise data about a single device, sensor, or any other entity for conditional logic or data processing in your workflow.
Key parameters: Credential to connect with (required), Resource (Entity), Operation (set to "Get"), and Entity Name or ID (text input for the unique identifier like
sensor.outdoor_temperatureorlight.living_room).Use cases: Check if a specific door is locked before sending a "goodnight" message, retrieve the current state of a thermostat to include in automated reports, or fetch battery levels of specific sensors for low-battery notification workflows.

04 Action 04Create or Update State
This action allows you to programmatically set or modify the state of any entity in Home Assistant. It's particularly powerful for creating virtual sensors, updating helper entities, or maintaining state information that originates from external systems.
Key parameters: Credential to connect with (required), Resource (set to "State"), Operation (set to "Create or Update"), Entity Name or ID (required text input), State (text field for the state value), and State Attributes (optional key-value pairs for additional properties).
Use cases: Update a virtual sensor with data fetched from an external API (weather, stock prices, etc.), set occupancy states based on calendar events from Google Calendar or Outlook, or create input helpers that reflect the status of external systems integrated via n8n.

05 Action 05Get Many Service
This action retrieves a list of available services in your Home Assistant instance. Services are the actions you can call to control devices—like turning lights on, adjusting thermostats, or triggering scripts. This action helps you discover what's available programmatically.
Key parameters: Credential to connect with (required), Resource (set to "Service"), Operation (set to "Get Many"), Return All toggle, and Limit (numerical input, default: 50) to constrain the number of services returned.
Use cases: Build a dynamic documentation of all available services in your Home Assistant setup, create a service discovery workflow that identifies new integrations and their capabilities, or generate a reference list of services for use in conditional workflow logic.

06 Action 06Home Assistant - Service Call
This is arguably the most powerful action in the integration. It allows you to call any service in Home Assistant, enabling you to control devices, trigger automations, run scripts, and much more—all from within your n8n workflow.
Key parameters: Credential to connect with (required), Resource (set to "Service"), Operation (set to "Call"), Domain Name or ID (text input for service domain like
light,switch,script), Service Name or ID (dropdown for specific service), and Service Attributes (optional key-value pairs for parameters likeentity_id,brightness,color_temp).Use cases: Turn on lights when a calendar event starts (meeting room preparation), trigger a Home Assistant script when receiving a webhook from an external service, adjust thermostat settings based on weather forecast data fetched from an API, or send TTS announcements through speakers when specific conditions are met in your workflow.

07 Action 07HomeAssistant - Get Logbook Entries
This action retrieves entries from Home Assistant's logbook, giving you a chronological record of events and state changes. It's essential for auditing, troubleshooting, and creating historical reports about your smart home activity.
Key parameters: Credential to connect with (required), Resource (set to "Log"), Operation (set to "Get Logbook Entries"), and Additional Fields (optional section for filters like date ranges or specific entities).
Use cases: Generate daily or weekly activity reports sent via email, monitor specific entities for unexpected state changes and log them to external systems, or create audit trails for security-sensitive devices like locks and alarms.

08 Action 08Get Error Logs
This action specifically retrieves error logs from your Home Assistant instance. It's crucial for monitoring system health, catching integration issues early, and maintaining a reliable smart home setup.
Key parameters: Credential to connect with (required), Resource (set to "Log"), and Operation (set to "Get Error Logs" to fetch only error-level log entries).
Use cases: Set up automated alerts when error logs exceed a certain threshold, send daily error summaries to a monitoring channel in Slack or Discord, or create tickets in your issue tracker when specific error patterns are detected.

09 Action 09Get Many Events
This action retrieves multiple event types available in your Home Assistant instance. Events are the backbone of Home Assistant's automation system—they represent everything from button presses to state changes.
Key parameters: Credential to connect with (required), Resource (set to "Event"), Operation (set to "Get Many"), Return All toggle to fetch all events when enabled, and Limit (numerical input, default: 50) to restrict results when Return All is disabled.
Use cases: Document all available event types in your Home Assistant setup, build conditional workflows that react differently based on event availability, or create monitoring systems that track which event types are firing most frequently.

10 Action 10HomeAssistant - Event Create
This action allows you to fire custom events in Home Assistant from your n8n workflow. Custom events can trigger Home Assistant automations, making this a powerful bridge between external systems and your smart home logic.
Key parameters: Credential to connect with (required), Resource (set to "Event"), Operation (set to "Create"), Event Type (text input for event type name like
n8n_workflow_completedorexternal_doorbell_pressed), and Event Attributes (optional key-value pairs for context data like timestamps, source identifiers, or relevant information).Use cases: Trigger Home Assistant automations when an email is received (via n8n Gmail trigger), fire events when external sensors or APIs detect specific conditions, or create a unified event system that bridges multiple platforms through Home Assistant.

Build your first workflow with our team
Drop your email and we'll send you the catalog of automations you can ship today.
- Free n8n & Make scenarios to import
- Step-by-step setup docs
- Live cohort + community support
Frequently asked questions
Is the Home Assistant n8n integration free?
Yes, the Home Assistant integration is included in n8n's core functionality at no additional cost. You can use it with n8n's self-hosted version (completely free and open-source) or with n8n Cloud's free tier, which includes 5 active workflows. The integration itself requires only a Home Assistant instance with a Long-Lived Access Token—no premium subscriptions or paid add-ons are needed on either side. This makes it one of the most cost-effective ways to extend your smart home automation capabilities.Can I trigger n8n workflows from Home Assistant events?
While the current Home Assistant integration in n8n focuses on actions (outbound operations), you can absolutely trigger n8n workflows from Home Assistant using webhooks. In n8n, create a workflow with a Webhook trigger node, copy the webhook URL, and in Home Assistant, use the rest_command integration or an automation with the shell_command to call that URL when specific events occur. Alternatively, you can use the n8n Webhook trigger combined with Home Assistant's automation to POST data whenever conditions are met, effectively creating a bi-directional integration.How long does it take to set up the Home Assistant n8n integration?
Most users complete the initial setup in under 5 minutes. Generating a Long-Lived Access Token in Home Assistant takes about 30 seconds, and adding the credentials in n8n is equally quick. The main consideration is ensuring network connectivity—if your n8n instance is cloud-hosted, your Home Assistant needs to be accessible via a public URL (through Nabu Casa, a reverse proxy, or similar). For fully local setups with self-hosted n8n, the connection is immediate. Building your first working workflow typically takes another 10-15 minutes depending on complexity. If you need expert assistance, our n8n agency can help you design and implement advanced automations.


