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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...