Splunk SOAR (f.k.a. Phantom)

Playbook run results in the "user parameter must be of type string" error

kevinh_splunk
Splunk Employee
Splunk Employee
This article describes a workaround when you run a playbook and see the "user parameter must be of type string" error, but the parameter is a string.
 

An example of this error is shown below:

TypeError: Error in phantom.prompt(): user parameter must be of type string

An example call that generates this error is shown below:

phantom.prompt(user="support", message="Verify incident details", respond_in_mins=30, name="prompt_1", callback=prompt_1_callback)

The issue can be caused by an import that changes what is considered a string, such as:

import unicode_literals

To resolve the issue, specify that the string values are strings using str(). For example:

phantom.prompt(user=str("support"), message=str("Verify incident details"), respond_in_mins=30, name=str("prompt_1"), callback=prompt_1_callback)
Labels (1)
Tags (2)
0 Karma
Get Updates on the Splunk Community!

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...