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

Auth JWT actions

preview

We're still working on this feature, but we'd love for you to try it out!

This feature is currently provided as part of a preview program pursuant to our pre-release policies.

This page provides a comprehensive reference for authentication actions available in the workflow automation actions catalog. These actions enable you to create and manage JSON Web Tokens (JWT) for secure authentication in your workflows.

Run a script

Execute a python script and returns the response to a workflow.

Input Field

Optionality

Type

Description

Example

script

Required

String

Any data transformation script

script: print("Hello, World!")

runtime

Required

Enum

Run time version of script

PYTHON_3_13

parameters

Optional

List

list of parameters to be used in script

parameters: ["--a", "10", "--b", "5"]

Output Field

Datatype

Examples

success

Boolean

true/false

payload

Object

"sessionId": "7fa97f26-3791-492e-a39b-53793163dfb9"

errorMessage

String

parsing error at line 9"

Example

name: script-workflow
steps:
- name: runScript
type: action
action: script.run
version: 1
inputs:
script: |
import json
import argparse
p = argparse.ArgumentParser()
p.add_argument("--a", type=int, required=True)
p.add_argument("--b", type=int, required=True)
args = p.parse_args()
# Data transformation: output original, squared, and sum
result = {
"original": {"a": args.a, "b": args.b},
"transformed": {"a_squared": args.a ** 2, "b_squared": args.b ** 2},
"sum": args.a + args.b
}
print(json.dumps(result))
parameters: ["--a", "10", "--b", "5"]
runtime: PYTHON_3_13
- name: logOutput
type: action
action: newrelic.ingest.sendLogs
version: 1
inputs:
logs:
- message: "Hello from script testing : ${{ .steps.runScript.outputs.payload }}"

What script.run can do

Supported python version

  • PYTHON_3_13 runtime with full language features

Allowed imports

"python-dateutil",
"simplejson",
"re",
"math",
"decimal",
"json",
"datetime",
"collections",
"itertools",
"functools",
"operator",
"string",
"argparse"

Data handling

  • Parse and transform JSON data structures
  • Process complex strings and perform text manipulation
  • Format output as tables, markdown, or structured data

Parameter Ppssing

  • Pass simple values via command-line arguments with argparse

What script.run cannot do

Restricted imports

  • base64 - Not allowed for security reasons
  • sys - Not allowed for security reasons
  • os - System operations restricted
  • Most third-party libraries not included in Python 3.13 stdlib

Parameter limitations

  • Cannot pass complex JSON as command-line parameters (causes Unsafe script argument error)
  • Cannot pass strings with special characters via parameters

Network/External access

  • No network calls or external API access
  • No file system access outside script execution
Copyright © 2025 New Relic Inc.

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