Credential Setup Guide
Most templates require API credentials to connect to external services. Here’s how to set up the most common ones.
Google Services (Gmail, Sheets, Drive, Calendar)
- Go to Google Cloud Console
- Create a project and enable the relevant APIs
- Create OAuth 2.0 credentials
- In n8n: Settings > Credentials > Add Credential > Google OAuth2
- Paste your Client ID and Client Secret
OpenAI
- Go to platform.openai.com/api-keys
- Create a new API key
- In n8n: Settings > Credentials > Add Credential > OpenAI API
- Paste your API key
Slack
- Go to api.slack.com/apps and create a new app
- Add the required OAuth scopes for your workflow
- Install the app to your workspace
- In n8n: Settings > Credentials > Add Credential > Slack OAuth2
- Use the Bot Token from the app settings
Telegram
- Message @BotFather on Telegram
- Create a new bot with
/newbot - Copy the API token
- In n8n: Settings > Credentials > Add Credential > Telegram API
- Paste the token
Discord
- Go to discord.com/developers/applications
- Create a new application and add a bot
- Copy the bot token
- In n8n: Settings > Credentials > Add Credential > Discord API
- Paste the token and invite the bot to your server
Databases (PostgreSQL, MySQL, MongoDB)
In n8n, add the relevant database credential with:
- Host and port
- Database name
- Username and password
- SSL settings if required
General Tips
- Never commit credentials to version control
- Use n8n’s built-in credential storage
- For production workflows, use environment variables where possible
- Rotate API keys regularly