N8n.io integration

Hi there, and sorry for the strange question.
I use n8n and I like so much, so I wonder if I can make the Assistant in Home Assistant that can call the n8n workflow.

Actually we can make an Ollama local server and then set it on Ollama add-on service in Home Assistant,
in order to set it then in Assist.
So it’s possible to set n8n server in the Home Assistant Assist please ?

Thanks in advance
Denis

i have a question. So im trying to setup n8n and i got it working locally but i want to be able to access it remotely. i already have a cloud flare tunnel setup for my proxmox and homeasistant working but anytime i try to set the tunnel to go to the http://homeassistant.local:5678 it says bad gateway and won’t work

fixed* i had a dns problem with my proxmox server and was able to get n8n running on the proxmox server so the tunnel was able to work no problem with that setup. I still dont know how to fix it with this addon but i did find a workaround that fixed it. cool addon but sadly didn’t work for me

Hello @footswitch,
Would you please share configuration in nginx proxy manager to support and use gmail-api in n8n added on Home assistant? It will be thankful if you have shared the steps.
Just for you information, I am using Cloudflared in my home assistant.
I have tried to follow instruction of @Rbillon59 in his post (Jun 2024):


There is no change in OAuth Redirect URL of gmail API:

Thanks in advance.
Best regards

Change WEBHOOK_URL to something like https://n8n.digital-ai-home.de

Make it redirect to n8n web interface.

I don’t use nginx, so I can’t help you much.

I also use cloudflare, but it didn’t work for me

When trying to load the screen goes completely black

Could you tell me what I might be doing wrong?

If you have followed all the instructions, try using the hostname you gave to HA instead of using IP address.

I changed it to the name homeassistant but it stays the same, it loads the page title but everything is black.

For example, node red, if I try with the name homeassistant:1880, accesses normally.

but with the addon it works perfectly

Even though I can’t access n8n through the subdomain, the webhook has changed and is working. In other words, if I access it through the addon, it communicates externally, so it’s already excellent for me. Thank you.

Have you tried different devices/browsers/networks?

By default, cloudflare uses QUIC protocol.
You might consider changing it to http2.
Also, try changing edge ip version to 4.
Both in the addon settings.

All these changes may take some minutes to take effect.
So be patient because some domains may stop working for some minutes and it doesn’t have anything to do with the addon itself.

But of course, the first test is using different devices/browsers/networks to access subdomains externally.

After the 3.3.6 update, I have a connection problem. It tries to connect but never connects. I have tried restarting HomeAsistant or restarting the app but to no avail.

It looks like there’s a fix with 3.3.8 but it’s not currently available for the update.
Do you know when the update will be available in ha?
Thank you very much.

New to n8n, and I have the same exact issue.

If you are in 3.3.6 it looks “normal”

I had the same issue. I had the add-on repo of https://github.com/Rbillon59/home-assistant-addons, but switching to https://github.com/Rbillon59/hass-n8n now allows me to get versions later than 3.3.6. It seems the first one has a more staggered release schedule.

I was able to export my workflows and credentials across.
To migrate across create an Execute Command node in n8n. Execute
n8n export:credentials --decrypted --all --output=/backup/credentials.json

then execute
n8n export:workflow --all --output=/backup/workflows.json

This will create a backup of all your workflows and credentials to your Home Assitant backup folder.

Now make a list of any community nodes that you’ve installed. My favourite is @telepilotco/n8n-nodes-kv-storage which allows for storing and recalling values that get stored directly in n8n. Helpful for easily storing things such as refresh tokens or information that you’d like to reference in another workflow.

Now double-check your backups are in the backups folder and then uninstall n8n. Add the new repo and install the new n8n addon. Optionally remove the old repo.

Now re-install any community nodes. After that create a new workflow and execute the following commands.
n8n import:credentials --input=/backup/credentials.json

n8n import:workflow --input=/backup/workflows.json

You should now have everything back as before, minus workflow execution history. Lastly it’d be best to delete the credentials.json backup as its stored in plain text as we had to use the --decrypted flag to easily migrate across.

1 Like

The update to 3.3.8 yesterday (or the day before?) was all it needed. It works now.

Sounds amazing didn’t know about n8n before, but eager to test it now! Thanks!!

set n8n_path to ‘/’ in env_vars_list.

For example:

timezone: America/Sao_Paulo
env_vars_list:
  - "WEBHOOK_URL: https://webhook.yourdomain.br"
  - "N8N_EDITOR_BASE_URL: https://n8n.yourdomain.br"
  - "N8N_PATH: /"
cmd_line_args: ""

2 Likes

Just put - “N8N PATH: /”

Thank you very much, it works perfectly.

1 Like

Hello, I’m using N8N via the integration on my Home Assistant setup, which is accessible through my Nabu Casa subscription.

I’ve configured the EXTERNAL_URL environment variable as specified in the documentation.

I’ve also set up the credentials for Google Sheets and Google Calendar using the OAuth2 API. However, I have to redo the authentication process almost every 3 to 4 days—especially for Google Calendar.

I’m not sure why, but this causes my automation to fail since I often need to re-authenticate…

Do you know why this is happening? How can I fix this issue?

Could you share how you got Proxy Manager to work?

Here’s my current setup:

  1. DuckDNS with NGINX Proxy SSL
  2. Domain: mydomain.duckdns.org
  3. N8N running locally

I’m encountering issues with Google authentication because N8N is hosted locally on Home Assistant. Each time I try to set it up, I receive a 404 error. I suspect that the webhook callback is unable to reach N8N due to its local hosting.

To address this, I created a new subdomain, n8n.mydomain.duckdns.org, but I keep facing certificate failures.

Steps taken:

  1. Disable NGINX ProxySSL and DuckDNS
  2. Installed Proxy Manager
  3. I loose remote access to my Home Assistant instance with the duck dns domain. However I can still access it with my Nabucasa URL remotely.