Workiva Scripting provides a flexible, secure environment for running Python code on the Workiva platform. This article covers some of the more common scenarios you may encounter while building your script.
Workiva Scripting is included with Customize Workiva. To use Scripting, your workspace must have Customize Workiva/Scripting enabled, and users will need the appropriate Scripting role(s) and file permissions.
For issues not covered here, check out our other Workiva Scripting articles or visit the Workiva APIs and Workiva Scripting communities.
Admin and permission issues
Execute Script action does not appear in Automations
The Execute Script action is available only to users with an appropriate Scripting role. Contact your Workspace Admin to assign the required role. If the role is already assigned and the action is still unavailable, contact Workiva Support.
Workiva Scripting connector not available in Chains
This indicates that the Workiva Scripting connector has not been enabled for your workspace. If you believe it should be enabled and it isn't, contact your Workiva account team.
No scripting roles are visible to the Workspace Administrator
This indicates that the scripting feature has not been enabled for your workspace. If you believe it should be enabled and it isn't, contact your Workiva account team.
Workiva Scripting connector and command issues (chains)
Command execution starts but script execution does not
Verify that the scripting feature has been enabled for your workspace. If you believe it should be enabled and it isn't, contact your Workiva account team.
If you've confirmed that scripting is enabled, then the integration user for the Workiva Scripting connector may not have the necessary role assigned. Contact your Workspace Admin to assign an appropriate Scripting role. You should also verify that the integration user has permission to access the script fired by the command.
Command execution is still in progress but script execution stops unexpectedly
If the chain command remains in progress after the script stops, check the following:
-
Check whether the run was cancelled:
Run history is available in the Scripting Editor’s Properties panel and through
GET /scripts/{scriptId}/runsorGET /scripts/{scriptId}/runs/{runId}. API requests require thescript:readscope and must includeX-Version: 2026-01-01.For instructions on creating or updating an API grant, see Workiva API Setup.
-
Check whether the script exceeded a resource limit:
Memory, CPU, disk, and run-time usage are reported automatically in the script run logs and in the script run data returned by the API.
For more information, see Handling resource limits in Workiva Scripting and Workiva Scripting limits.
-
Check whether the script reached its maximum run time:
If it did, reduce the amount of work performed during one run or divide the work into smaller operations. See Workiva Scripting limits.
-
Check for functions that explicitly stop the Python process:
Verify that the script does not call:
quit() exit() sys.exit() os._exit()quit(),exit(), andsys.exit()raiseSystemExit.os._exit()stops the process immediately without running normal cleanup handlers.
For more information about Scripting API operations, see the Scripting API guide.
Command and script execution out of sync
This occurs when the command completes and the script run keeps going, or vice versa.
If the command completes before the script execution, please make sure that the command timeout is greater than the script execution time (see Workiva Scripting Limits to learn about the max script execution time).
If the script execution completes mere seconds before the command, this may be an expected delay caused by the Scripting system processing information after the script execution is completed. The Command will only report completion once the whole process is finished.
Scripting editor
Import a library does not work
Workiva Scripting supports Python's standard library out-of-the-box, as well as components available from the Python Package Index (see Supported Workiva Scripting libraries and dependencies for more information). PyPI components that require additional installations may not be supported.
Please make sure that the library you are trying to import is part of the Python's standard library or the Python Package Index. If it is a component of the latter, make sure that no additional installations are required.