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.
Scripting setup and overview
How are scripts commonly used?
Workiva Scripting can automate many repeatable, time-consuming tasks that would otherwise be completed by hand. Some common use cases include zero-row suppression, report layouts, and the application of custom formatting to multiple documents.
More broadly, scripts can be adapted to your unique business needs — letting you tailor and scale workflows to the way your organization works, with governed execution you can rely on. The code is your own; what you do with it largely depends on your script developer, workspace setup, and the current number of manual processes in your business. And as more work becomes AI-assisted, Scripting gives that work a reliable, repeatable foundation to act on.
Are there any scripting limits?
Yes, Workiva enforces a number of limits for both Workiva Scripting and the scripting API.
Learn more about Workiva Scripting limits.
How do I trigger scripts from Chains?
This requires the Workiva Scripting connector.
See the articles below to learn more:
Is Workiva Scripting FedRAMP compliant?
Yes. Scripts execute on Workiva-managed, FedRAMP-compliant infrastructure, with the same platform permissions and governance controls as other Workiva content.
How can I guard access to scripts?
There are several ways you can protect your code from being accessed by unauthorized users:
- Create a dedicated workspace or organization for authorized users: Creating a workspace, or even an entire organization, of only authorized users is the most secure option. For example, partners can create a workspace for Workiva Scripting in your organization and have customers run scripts from their own org.
- Use roles: Workiva Scripting roles—Script Editor, Script Viewer, and Script Runner—are tiered so users can access only the scripts needed for their work. The Script Runner role allows users to run scripts without viewing the code.
- Use permissions: Scripting files can be restricted at the file level so that only specific users can edit or view your code.
Learn more about Workiva Scripting roles and permissions.
Is there a list of allowed IPs for scripting?
Yes, allowed IPs for the scripting program are included here.
Is there a script library available?
Yes. We've collected a number of sample scripts for your use. You can also build your own using the how-to articles in the Create and manage scripts section of the Support Center.
Using the scripting editor
How do I manage script versions?
At this time, Workiva stores only the latest version of a script.
You can create copies of your script files in Workiva and organize them in folders, but we recommend using a separate version control system — especially if you have an enterprise version control system, see Workiva Scripting: Development Process Best Practices.
How do I sync Workiva code with an enterprise version control system (e.g., GitHub)?
The Workiva Scripting API provides source-management endpoints for retrieving and updating script source files. Retrieving sources requires script:read; creating, updating, uploading, or synchronizing sources requires script:write. Workiva does not automatically synchronize scripts with external version-control systems such as GitHub, GitLab, or SVN.
For instructions on creating or updating an API grant, see Workiva API Setup.
How do I access credentials to Workiva and non-Workiva systems from a script?
There are two ways to access credentials to Workiva and non-Workiva systems:
- Send credentials as runtime inputs (preferred)
- Hardcode the credentials in the code
Why are the values of the script runtime inputs not displayed in the log output during execution?
This is a security precaution. Because input parameters can contain sensitive data, we remove them from user-facing logs.
How can I store temporary data during script executions?
Workiva scripts may use the Python Open function to read and write files temporarily in the /tmp folder. Other paths are restricted.
Every time a script is run, a container is spun up in Workiva's cloud infrastructure. That container has linux installed, and all the paths are restricted except /tmp (which is empty). Data can be written and read temporarily in that path. Once the run is over, the container gets trashed.
Can I define global variables to use across multiple scripts, à la Chains?
Not at this time. However, if your script runs as part of a Chains workflow, you can use Chains variables and pass their values to the script as runtime inputs.
Can I send files as parameters?
Binaries can be sent as parameters as long as they do not exceed 128KB and are encoded to text (i.e., binary to text encoding).
Can I access the organization ID, workspace ID, and region in my scripts?
Yes, the organization ID, workspace ID, and region (US, APAC, CA, EU) are available to your script through environment variables. For example, os.getenv("WORKIVA_ORGANIZATION_ID").
| Variable | Description |
|---|---|
| WORKIVA_ORGANIZATION_ID | The unique ID of the Workiva organization where the script is hosted. |
| WORKIVA_ACCOUNT_ID | The unique ID of the Workiva workspace where the script is hosted. |
| WORKIVA_CLUSTER_DOMAIN | The Workiva region (US, APAC, CA, or EU) of the production environment where the script is hosted. |
| WORKIVA_SCRIPTING_SCRIPT_ID | The unique ID of the Scripting script being run. |
| WORKIVA_SCRIPTING_RUN_ID | The unique ID of the current script run. |
| WORKIVA_SCRIPTING_MEMORY_LIMIT | The maximum amount of RAM available to the script during a single run. |
| WORKIVA_SCRIPTING_DISK_LIMIT | The maximum disk storage that the script can use in the /tmp directory during a single run. |
Can I use code from one Workiva script in another Workiva script?
You can't directly import or call one Workiva script from another. For a small piece of reusable code, you can copy and paste it into each script that needs it.
For code you reuse across many scripts, a better approach is to package it as a shared dependency. You can build a dependencies.zip bundle that includes your shared libraries — and even client code generated from the Workiva public API specification — then upload that same bundle to each script that needs it. This lets you maintain common code in one place and reuse it across scripts instead of copying it into each one.
For steps on building and uploading dependencies, see Supported scripting libraries and dependencies.
Using scripts from automations
Can I execute a script hosted in another workspace, organization, or region (APAC, CA, EU, or US)?
Workiva automations can execute only scripts located in the same workspace as the file. To execute a script in another workspace, organization, or region, use the Workiva Scripting connector or the Workiva Scripting API.
When using the Scripting API, create the API grant in the workspace that hosts the target script. The grant requires script:execute; if the integration retrieves the run status, logs, or output, it also requires script:read. For instructions on creating or updating an API grant, see Workiva API Setup.
Can I send runtime inputs/parameters on script execution?
At this time, the automations feature doesn't allow runtime inputs that are sent to the script when the script is executed.
What metadata is sent to a script execution from an automation? Is the workspace id sent?
When a script is executed from an automation, the following parameters are sent:
- DOCUMENT_ID: The ID of the document where the automation is run.
- INPUT_SHEET_ID: The WURL of the spreadsheet used to manage the automation's input parameters.
- INPUT_RESOURCE_ID: The WURL of the section in the "input" spreadsheet.
- INPUT_SPREADSHEET_ID: The ID of the "input" spreadsheet.
- INPUT_SPREADSHEET_SHEET_ID: The ID of the section in the "input" spreadsheet.
For more information, see the Workiva Support page Execute scripts with automations.
How do I access credentials to Workiva and non-Workiva systems from the script execution?
When a script is executed from an automation, the only option is to hardcode the credentials in the code itself.
Can the same script be executed simultaneously from two or more files?
Yes, a script can be executed simultaneously from either the same file or multiple files.
Using scripts from chains
Can I execute a script hosted in another workspace, organization, or region (APAC, Canada, EMEA, US)?
Yes, a script hosted in one workspace can be executed by a chain hosted in a different workspace, organization, or environment.
To do this, the Workiva Scripting connector used in the chain must be set up with an API grant created in the host workspace, and the scripting/IAM URLs used must correspond to the correct workspace.
See the following articles to learn more:
Can the same script be executed simultaneously from two nodes?
The same script can run simultaneously from multiple nodes in one chain or across multiple chains.
How do I use the output from a script in another chain node?
The Run Script command allows you to enter a sample payload for each output that produces JSON. This output can then be used in other nodes.
Can I pass a temporary file to a script from a chain?
You can set binaries as parameters as long as they do not exceed 128KB.
APIs and libraries
Which APIs and libraries are supported?
Workiva Scripting currently supports:
- Workiva Public APIs
- Non-Workiva APIs
- Python's Standard Library
- The Python Package Index (PyPI)
Workiva Scripting supports Python only at this time.
To learn more, see the Workiva Support page Supported Workiva Scripting libraries and dependencies.
Which version of Python is used in Workiva Scripting?
New scripts run on Python 3.13. Workiva Scripting still supports existing Python 3.9 scripts, but support for Python 3.9 ends in October 2027 — so you should migrate any Python 3.9 scripts to Python 3.13 as soon as possible.
To learn more, see the Workiva Support page Migrating scripts to Python 3.13 in Workiva.
Does Workiva provide API clients with popular languages like Python or Java?
We do not currently provide public SDKs for Python or Java.
However, we provide open API specifications for Workiva APIs so you can generate these libraries yourself. For example, you can obtain the Workiva Platform API's OAS file and generate a client library.
Are there scripting-specific APIs available?
Yes. The public Scripting API is available through the 2026-01-01 Workiva API version. Send X-Version: 2026-01-01 with every request.
See the Scripting API guide for supported operations, scopes, and requirements.
How do I create and view API grants for the Workiva Public APIs?
You'll need to obtain a client ID and secret by following the instructions here.
How do I authorize into the Workiva Public APIs using Python?
The following example obtains an access token and retrieves the scripts accessible to the API grant in its workspace. The API grant requires the script:read scope. For instructions on creating or updating an API grant, see Workiva API Setup.
import os
import requests
AUTH_URL = "https://api.app.wdesk.com/oauth2/token"
SCRIPTING_API_URL = "https://api.app.wdesk.com/scripts"
API_VERSION = "2026-01-01"
CLIENT_ID = os.environ["CLIENT_ID"]
CLIENT_SECRET = os.environ["CLIENT_SECRET"]
token_response = requests.post(
AUTH_URL,
headers={
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
"X-Version": API_VERSION,
},
data={
"client_id": CLIENT_ID,
"client_secret": CLIENT_SECRET,
"grant_type": "client_credentials",
},
timeout=30,
)
token_response.raise_for_status()
headers = {
"Authorization": f"Bearer {token_response.json()['access_token']}",
"X-Version": API_VERSION,
}
scripts_response = requests.get(
SCRIPTING_API_URL,
headers=headers,
timeout=30,
)
scripts_response.raise_for_status()
print(scripts_response.json())How do I update the format of cells using Python?
You can update cell formatting from a script by calling the Workiva Platform API's Update sheet content endpoint (POST /spreadsheets/{spreadsheetId}/sheets/{sheetId}/update).
- Use the
applyFormatsfield to apply formats such as bold, number and currency formatting, and shading, andapplyBordersto apply borders. - We recommend that you batch multiple format operations into a single request — each field accepts an array of operations, and the endpoint is rate-limited — rather than sending one request per range.
For more information, refer to the following Workiva Developer pages:
Can I read/write or upload non-Workiva files stored in Workiva?
Yes. Using Workiva's Files Management APIs, you can upload non-Workiva files — such as PDFs, images, or other arbitrary file types — into the platform as Supporting Documents, which preserve the original file as-is. To upload one, use the import file endpoint with kind set to SupportingDocument. Supporting Documents appear alongside your other Workiva files and can be listed, moved, copied, exported (downloaded), and trashed like any other file.
Learn more: Introduction to Files Management APIs
Can I programmatically create and manage automations?
At this time, there are no endpoints available to programmatically create or manage automations.