create-credentials
Skill0 starsChanged 10 months agoMITView on GitHub
Create n8n credentials using type-safe factory methods. Supports Google, Postgres, MySQL, Slack, Telegram, OpenAI, GitHub, and more.
In this repository9 other files it gives its agents.
- monitor-executionsSkill
- n8n-deploymentSkill
- n8n-diagnosticsSkill
- n8n-patternsSkill
- n8n-securitySkill
- n8n-testingSkill
- test-workflowSkill
- workflow-helpersSkill
- workflow-templatesSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 5 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 146
All factory methods return:
- Distinctive: line 189
Test Credentials: Verify connection after creation
- Distinctive: line 191
Rotate Regularly: Update credentials periodically
- Distinctive: line 196
Never log credential values
- Distinctive: line 197
Use environment variables for sensitive data
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Create Credentials Skill
This skill provides type-safe credential creation for n8n integrations.
When to Use
- Setting up new n8n integrations
- Connecting to databases (Postgres, MySQL)
- Configuring messaging services (Slack, Telegram)
- Setting up AI services (OpenAI)
- Connecting to APIs (GitHub, Notion, Airtable)
Available Credential Factories
Database Credentials
PostgreSQL
await credentialFactory.createPostgres(
'My Postgres DB', // name
'db.example.com', // host
'myapp', // database
'admin', // user
'secret123', // password
5432, // port (default: 5432)
true // ssl (default: false)
)MySQL
await credentialFactory.createMySql(
'My MySQL DB', // name
'db.example.com', // host
'myapp', // database
'admin', // user
'secret123', // password
3306 // port (default: 3306)
)Messaging Credentials
Slack
await credentialFactory.createSlack(
'Slack Bot', // name
'xoxb-xxx-xxx' // Bot User OAuth Token
)Telegram
await credentialFactory.createTelegram(
'Telegram Bot', // name
'123456:ABC-xxx' // Bot token from @BotFather
)AI Credentials
OpenAI
await credentialFactory.createOpenAI(
'OpenAI API', // name
'sk-xxx' // API key
)Cloud Service Credentials
Google Service Account
await credentialFactory.createGoogleServiceAccount(
'Google Service', // name
'bot@project.iam.gserviceaccount.com', // email
'-----BEGIN PRIVATE KEY-----\n...' // PEM private key
)GitHub
await credentialFactory.createGitHub(
'GitHub Token', // name
'ghp_xxx' // Personal access token
)HTTP Authentication
Basic Auth
await credentialFactory.createHttpBasic(
'API Basic Auth', // name
'username', // username
'password' // password
)API Key Header
await credentialFactory.createApiKey(
'API Key', // name
'my-secret-key', // API key value
'X-API-Key' // Header name (default: 'X-API-Key')
)Other Services
Notion
await credentialFactory.createNotion(
'Notion Integration', // name
'secret_xxx' // Integration token
)Airtable
await credentialFactory.createAirtable(
'Airtable API', // name
'patXXX' // API key
)SMTP (Email)
await credentialFactory.createSmtp(
'SMTP Server', // name
'smtp.gmail.com', // host
587, // port
'user@gmail.com', // user
'app-password', // password
true // secure TLS (default: true)
)Result Format
All factory methods return:
interface CredentialResult {
success: boolean
credentialId?: string // ID for use in workflows
name?: string
type?: string
error?: string // Error message if failed
}Usage Example
// Create Slack credential
const slack = await credentialFactory.createSlack('My Slack', 'xoxb-token')
if (slack.success) {
console.log(`Created credential: ${slack.credentialId}`)
// Use in workflow nodes
} else {
console.error(`Failed: ${slack.error}`)
}Generic Credential Creation
For credential types not covered by factories:
await credentialFactory.create(
'Custom Credential',
'customApi',
{
apiKey: 'xxx',
baseUrl: 'https://api.example.com'
}
)Best Practices
- Use Descriptive Names: Include environment (dev/prod) in name
- Don't Hardcode Secrets: Pass secrets from environment variables
- Test Credentials: Verify connection after creation
- Minimal Permissions: Request only needed scopes
- Rotate Regularly: Update credentials periodically
Security Notes
- Credentials are encrypted in n8n
- Never log credential values
- Use environment variables for sensitive data
- Delete unused credentials
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

