If you’re asking whether **credentials can be used AS variables** (meaning accessing credential values like you would access variables), the answer is:
## Credentials vs Variables - Key Differences
**Custom Variables** (`$vars`):
- [Available on Enterprise and Pro Cloud plans]( Custom variables | n8n Docs )
- Accessed using `$vars.`
- Read-only, shared across all workflows
- Used for non-sensitive configuration data
**Credentials**:
- Used for authentication to external services
- **Cannot be accessed like variables** in Code nodes or expressions for security reasons
- Values are encrypted and not directly accessible as `$vars` would be
## What You CAN Do
1. **[Use expressions within credential fields]( Create and edit | n8n Docs )** - You can reference workflow data when setting up credentials
2. **[Use external secrets]( External secrets | n8n Docs )** - Reference secrets from external vaults using `{{ $secrets.. }}`
## What You CANNOT Do
- Access credential values programmatically like `$vars` or `$credentials` in Code nodes
- Use credentials as general-purpose variables
- [Dynamically change credentials within a workflow]( How can we change credentials dynamically in a single node ) based on runtime conditions
The separation is intentional for security - credentials are encrypted and handled differently than regular variables. If you need to store non-sensitive configuration data that can be accessed like variables, use Custom Variables instead.