Environment variables set manangement support

We may use n8n for multiple situations and some variables may diff among different situation. However we may change them together. For example:

There are 2 variable endpoint and token which may be used in many nodes. Endpoint may be ‘a’ in dev and ‘b’ in production. Token may be ‘a-token’ while endpoint is ‘a’ and to be ‘b-token’ while endpoint is ‘b’.

There is only credential variable we may specify beyond the workflow and use it in only specific field for now.

We may need more configurable variable beyond workflow and use it in more flexible fields such as any field expression.

There are 2 features needed to achieve it. First we may need more flexible variable usage support. Second env variables need to be managed by group. There should be no need to change nodes in workflow and just change the variables group name and the different values should be applied.

interface Variable {
  endpoint: string
  token: string
}

env name: dev/prod/…

{
  dev: {
    endpoint: 'a',
    token: 'a-token'
  }
  prod: {
    endpoint: 'b',
    token: 'b-token'
  }
}

I developed a community node for n8n, named n8n-nodes-globals, that potentially possesses the features you need. This enables the establishment of a group of fixed variables, usable throughout various workflows. Additionally, it permits the alternation between distinct value sets without impacting current nodes.

Usage example:

Please test this node and share your experiences or suggestions.

Github repo: GitHub - umanamente/n8n-nodes-globals: N8N community node that allows users to create global constants and use them in all their workflows