Actions26
- Secret Actions
- Audit Actions
- Webhook Actions
- Principal Actions
- Org Actions
- Role Actions
- Server Actions
Secret → Set
AI-generatedSummary
Sets a named secret key in an org scope via POST /orgs/{org}/secrets. Requires org in credentials. Uses setKey and setValue parameters; optional setOnConflict determines 409 handling.
Inputs
- setKey (required) — The named key to store the secret under (org-scoped)
- setValue (required) — The secret value
- setOnConflict — What to do when the key already exists in the org
Output shape
success: API response JSON from POST /orgs/{org}/secrets, typically the created secret object; conflictIgnored: { conflict: true, key, message: 'Key already exists' } returned when setOnConflict is 'ignore' and key exists; error: n8n NodeApiError thrown if key exists and setOnConflict is 'error', or if no Organization ID in credentials
Returned data wrapped as { json: response } per node execution pattern.
Examples
Example 1: Create a new secret key-value pair in an org
setKey: 'my-api-token', setValue: 's3cr3t', setOnConflict: 'error' (default)
Example 2: Silently skip if key already exists
setKey: 'my-api-token', setValue: 'new-secret', setOnConflict: 'ignore'