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 are 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?
Absolutely. Security is our top priority at Workiva, and we've built an infrastructure that guarantees your code runs are both secure and performant. Your scripts execute on Workiva-managed, FedRAMP-compliant infrastructure — within the same trusted platform, permissions, and governance as the rest of your Workiva work.
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 that users have access only to the scripts necessary for their job. The Script Runner role, for instance, allows users to run scripts but not access any of 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 where users can retrieve the latest version of a script or update a script to a newer copy. Workiva does not currently offer automated synchronization between scripts files and your enterprise version control system (e.g. Gitlab, Github, SVN).
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 (external link) 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 org id, workspace id, and region in my scripts?
Yes, the organization id, workspace id, and region (US, APAC, EU) are accessible to your script code via environment variable. 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, 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 workspaces, org, or environment (APAC, EU,US)?
The automations feature in Workiva can only execute scripts in the same workspace where the file is located. However, the Workiva Scripting connector or the Workiva Scripting API can be used to execute a script hosted in another location.
If using the scripting API, you must create and host a script in the main workspace whose sole purpose is to call the Scripting API and execute the script in the secondary workspace.
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 workspaces, org, or environment (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 be executed simultaneously from multiple nodes within the same Chain and/or 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 a temporal file be created in a chain by parameters in the script?
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.
Learn more: 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.
Learn more: 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. Scripting API endpoints are currently available as prototype endpoints within Workiva's Prototype Platform API.
Public Scripting API endpoints will be available in Summer 2026. Once they're available, you'll be expected to migrate to the public endpoints — support for Workiva Scripting non-public endpoints (including prototype) will end in October 2027.
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 code snippet makes a call to the IAM service to generate an access token that is then used to authenticate into the Scripting prototype endpoints. It will get a list of all the scripts that the API grant (i.e., client) has access to in the workspace where the grant was created.
import requests
import json
import os
AUTH_URL = "https://api.app.wdesk.com/iam/v1/oauth2/token"
SCRIPTING_API_URL = "https://api.app.wdesk.com/prototype/platform/scripts/"
CLIENT_ID = os.getenv('CLIENT_ID')
CLIENT_SECRET = os.getenv('CLIENT_SECRET')
tokenResponse = requests.post(
AUTH_URL,
data = 'client_id=' + CLIENT_ID +
'&client_secret=' + CLIENT_SECRET +
'&grant_type=client_credentials',
headers = {'Content-Type':
'application/x-www-form-urlencoded; \
charset=UTF-8'})
accessToken = 'Bearer ' + json.loads(tokenResponse.text)['access_token']
dataRes = requests.get(SCRIPTING_API_URL, headers = {'Authorization': accessToken})
print(json.loads(dataRes.text))
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 applyFormats field to apply formats such as bold, number and currency formatting, and shading, and applyBorders to apply borders. 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.
Learn more: Update sheet content and the Spreadsheet Data Guide.
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.