• /
  • EnglishEspañolFrançais日本語한국어Português
  • Log inStart now

New Relic secret actions

|View as Markdown

This page provides a reference for New Relic Secrets Management actions available in the workflow automation actions catalog. These actions let you list secrets and inspect their version history directly from a workflow definition.

Important

There is no action to retrieve a secret's value. Decrypting a secret through a workflow action would expose the value in the run's history and logs. To use a secret's value as an input to a workflow step, reference it directly using the ${{ :secrets:keyName }} syntax instead.

Prerequisites

Before using New Relic secret actions in workflow automation, ensure you have:

  • A New Relic account with appropriate permissions to read Secrets Management.
  • The scopeId (account ID or organization ID) and scopeType (ACCOUNT or ORGANIZATION) for the scope you want to query.

List secret versions

The action identifier is newrelic.secret.listVersions.

Lists all versions of a New Relic Secrets Management secret, including soft-deleted versions when requested.

The following table describes all available input fields for this action.

Input

Type

Description

Example

key

String

Required. The secret's key identifier.

"jira_auth_token"

scopeId

String

Required. The account ID or organization ID the secret belongs to, matching scopeType.

"11933347"

scopeType

String

Required. The scope type. Allowed values: ACCOUNT, ORGANIZATION.

"ACCOUNT"

namespace

String

Optional. The secret's namespace, if it was created within one. Omit if the secret has no namespace.

"my-namespace"

fetchDeleted

Boolean

Optional. If true, includes soft-deleted versions in the results. Default: false. This field always sends an explicit true or false — the underlying API rejects a null value.

false

selectors

List

Optional. JQ selectors to extract specific fields from the action output.

[{"name": "latestVersion", "expression": ".data.customerAdministration.secretVersions.latestVersion"}]

The following table describes all output fields returned by this action.

Output

Type

Example

success

Boolean

true when the step executed without error.

errorMessage

String

Populated only if the call fails at the HTTP/transport level. null on success.

data

Object

{
"data": {
"customerAdministration": {
"secretVersions": {
"id": "14b6b474-0abf-4045-bf94-16405d21b3a7",
"key": "jira_auth_token",
"namespace": null,
"latestVersion": 0,
"scope": { "id": "11933347", "type": "ACCOUNT" },
"secretVersions": [
{
"version": 0,
"isDeleted": false,
"createdAt": "2026-09-08T12:42:29.579879Z"
}
]
}
}
}
}

Workflow example

name: list_secret_versions
description: List all versions of a New Relic secret
steps:
- name: listSecretVersions
type: action
action: newrelic.secret.listVersions
version: 1
inputs:
key: "jira_auth_token"
scopeId: "11933347"
scopeType: "ACCOUNT"
fetchDeleted: true
selectors:
- name: latestVersion
expression: ".data.customerAdministration.secretVersions.latestVersion"
next: end

List secrets

The action identifier is newrelic.secret.list.

Lists New Relic Secrets Management secrets within an account or organization scope, with optional namespace and deleted-status filtering and cursor-based pagination. Results are sorted by creation time.

The following table describes all available input fields for this action.

Input

Type

Description

Example

scopeId

String

Required. The account ID or organization ID to search within, matching scopeType.

"11933347"

scopeType

String

Required. The scope type. Allowed values: ACCOUNT, ORGANIZATION.

"ACCOUNT"

namespace

String

Optional. Only return secrets in this namespace. Omit to return secrets across all namespaces.

"my-namespace"

deleted

Boolean

Optional. Filter by deleted status. true returns only soft-deleted secrets, false returns only active secrets. Omit to return both.

false

sortDirection

String

Optional. Sort order by creation time. Allowed values: ASC, DESC. Default: DESC (newest first).

"DESC"

cursor

String

Optional. Opaque pagination cursor from a previous call's nextCursor output. Omit to start from the first page.

"${{ .steps.listSecrets.outputs.nextCursor }}"

selectors

List

Optional. JQ selectors to extract specific fields from the action output.

[{"name": "totalCount", "expression": ".data.customerAdministration.secrets.totalCount"}]

The following table describes all output fields returned by this action.

Output

Type

Example

success

Boolean

true when the step executed without error.

errorMessage

String

Populated only if the call fails at the HTTP/transport level. null on success.

data

Object

{
"data": {
"customerAdministration": {
"secrets": {
"totalCount": 123,
"nextCursor": "AAAADCqUAbBD...",
"scope": { "id": "11933347", "type": "ACCOUNT" },
"secrets": [
{
"id": "14b6b474-0abf-4045-bf94-16405d21b3a7",
"key": "jira_auth_token",
"namespace": null,
"description": null,
"isDeleted": false,
"isShareable": false,
"latestVersion": 0,
"metadata": {
"createdAt": "2026-09-08T12:42:29.579879Z",
"updatedAt": "2026-09-08T12:42:29.579879Z"
},
"tags": null
}
]
}
}
}
}

nextCursor is present when more pages exist. Pass it as cursor in the next call to retrieve the following page.

Workflow example

name: list_newrelic_secrets
description: List active secrets in a New Relic account
steps:
- name: listSecrets
type: action
action: newrelic.secret.list
version: 1
inputs:
scopeId: "11933347"
scopeType: "ACCOUNT"
deleted: false
selectors:
- name: totalCount
expression: ".data.customerAdministration.secrets.totalCount"
- name: nextCursor
expression: ".data.customerAdministration.secrets.nextCursor"
next: end
Copyright © 2026 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.