Credentials
A credential stores the secret of an external service once, encrypted. Nodes pick it by id and the orchestrator resolves it on the server when the node runs, so secrets never appear in a workflow, an expression or Git.
Workflows call external services: an HTTP API, a mailbox, a database, a storage account. Each of those needs a secret. In Sommatic AI you store that secret once, as a credential of your organization, and nodes refer to it by id. The secret is resolved on the server at the moment the node runs. Your workflow definition, its exports and your Git repository only ever contain the id.
Credential types
| Type | Typical use |
|---|---|
api-key | A single key or token. Also the type of the read token of a Git repository connection. |
basic-auth | User name and password. |
oauth2 | OAuth 2.0 tokens. |
service-account | A cloud service account. |
certificate | A certificate and its key. |
connection-string | A database or storage connection string. |
object | A structured secret, for example a set of custom headers. |
custom | Anything else. |
A credential also records a provider (for example HTTP / REST, Microsoft Outlook, PostgreSQL, MongoDB, GitHub), a
name, a description and tags.
Create a credential
Open Credentials
In the portal, go to Platform infrastructure → Credentials and create a credential.
Choose the type and provider
Pick the type that matches what the service expects, and the provider.
Enter the secret
The secret is encrypted when you save it. From then on, Sommatic AI only shows a masked preview, such as the first and last characters of a key or the user name of a basic-auth pair.
Credentials can also be managed through the API; see the Credentials API reference.
Reading a credential returns its metadata and masked_preview, never the secret.
Use a credential in a node
Nodes that talk to external services have a credential field, usually connection_id, shown in the studio as a
connection picker. The picker lists only the credential types the node accepts. For example,
io.http accepts api-key, basic-auth, oauth2 and object.
{
"operator_slug": "io.http",
"config": {
"connection_id": "pi-credential-xxxxxxxxxxxxxxx",
"method": "POST",
"url": "https://api.example.com/tickets",
"body": { "subject": "{{ $json.body.subject }}" }
}
}When the node runs, the orchestrator resolves the credential on the server and uses the secret for that call. The workflow definition, its versions and its exports keep only the id.
Other nodes with a connection picker include the Outlook connectors
(connectors.microsoft.outlook.mail), the database integrations
(integrations.mongodb.operation,
integrations.postgresql.query) and the I/O nodes such as
io.smtp and io.ftp.
Rules
- Never put a secret in a node’s configuration, a header, a URL or an expression. Use the node’s credential field.
- Never put a secret in Git. In a repository, the credential id is an environment variable
(
"connection_id": "@@env.CRM_CREDENTIAL_ID@@"), because each installation has its own credentials. See Environments and tokens. - One credential per purpose. Separate credentials per service and per environment make rotation and revocation simple and keep the audit readable.
- Least privilege. Give each credential only the scopes its workflows need. A Git repository connection only needs read access.