Neither for love nor money can I get environment variables to work (yes I’ve tried all kinds of N8N_BLOCK_ENV_ACCESS_IN_EDITOR type stuff).
“variables” is a paid feauture - ![]()
There used to be a generic credentials provider, but apparently this has been removed, so no joy there.
Fed up!
services:
n8n:
image: n8nio/n8n:latest
environment:
- AZURE_API_BASE_URL=https://my-azure-url.example.com
- N8N_ALLOW_ENV_VARIABLES=true
This how I would set env variables and not the $var(on paid plan), and I still can reference the $env variable from OS/Docker .
So , your url request would look like this :
{{ $env.AZURE_API_BASE_URL }}/some/path
Cheers!
yes I spent hours trying this approach, and ones like it. ChatGPT thought the reason it wouldn’t work is some security stuff relating to the us of MCP and that if I turned off MCP it would work, anyway - I can say in my case the approach you’re suggesting did not work.
thank you Kool_Baudrillard. I guess this shows I’m not the first to trip over this.
I’ll try Kool_Baudrillard’s solution at some point, but I was able to get past this with “Set” nodes for now - and ugly syntax like:
{{ $(‘Set Inputs’).item.json.azUrl }}