https://www.youtube.com/watch?v=7q3skWvd_nk
A Node.js tool to export Okta Workflows flows and data at scale.
It fetches .folder bundles per group, dumps stash tables into CSVs, and writes a manifest JSON for easy auditing, backup, and migration.
-
Auth detection:
- Uses
WF_AUTH_TOKENenv var (if provided) - Or Chrome cookies (
chrome-cookies-secure) - Or Playwright (headless/interactive login)
- Uses
-
Exports per group:
.folderbundle for flows- CSVs for all stash tables
- Manifest JSON (
workflows_dump.json)
-
Resilience:
- Timeout handling
- Rate limiting between requests
- Concurrency with a small promise pool
-
Node.js 18+
- Needed for built-in
fetchAPI andAbortController. - Download here.
- Needed for built-in
-
npm (comes with Node.js)
Install required libraries:
npm install playwright chrome-cookies-secureThen install the Playwright Chromium browser binary:
npx playwright install chromium- If you want Chrome cookie extraction (
chrome-cookies-secure), you may need to grant your terminal Full Disk Access inSystem Settings → Privacy & Security. - Playwright interactive login works without extra permissions.
- Xcode command line tools may be required for native builds:
xcode-select --install
- Works out of the box with Node.js + Playwright.
- Chrome cookies are read from
%LOCALAPPDATA%\Google\Chrome\User Data\. - No extra permissions required for most setups.
- Playwright requires some system libraries:
sudo apt-get install -y libgbm-dev libx11-dev libxcomposite-dev \ libxrandr-dev libxss-dev libasound2 libatk1.0-0 libatk-bridge2.0-0 \ libcups2 libnss3 libxdamage1
- Chrome cookie access may fail if cookies are encrypted differently on your distro.
# Example run (with auto-auth via Playwright or Chrome cookies)
node workflows_dump.js
# Provide an explicit base URL
WF_BASE="https://ooo.workflows.oktapreview.com" node workflows_dump.js
# If you already have a token, skip Playwright and Chrome:
WF_AUTH_TOKEN="your_auth_token_here" node workflows_dump.jsOutputs:
exports/<group_name>/<group_name>.folder→ Flow bundlesexports/<group_name>/<stash_name>.csv→ Stash table exportsworkflows_dump.json→ Manifest with org and export metadata
| Variable | Description | Default |
|---|---|---|
WF_BASE |
Okta Workflows base URL | https://ooo.workflows.oktapreview.com |
WF_HOST |
Alternate hostname | — |
WF_AUTH_TOKEN |
Use a known auth_token directly |
— |
WF_OUT_JSON |
Path to manifest JSON | workflows_dump.json |
WF_OUT_DIR |
Export root directory | exports |
WF_TIMEOUT |
Request timeout (seconds) | 60 |
WF_SLEEP |
Delay between requests (seconds) | 0.15 |
WF_GROUP_FILTER |
Filter groups by substring (case-insens) | — |
WF_DEBUG |
Debug logging (1 = on) |
0 |
WF_USE_PLAYWRIGHT |
Enable Playwright fallback | 1 |
WF_MAX_WORKERS |
Max concurrent workers | 8 |
- Run
node workflows_dump.js - Playwright launches a browser for login/MFA the first time
- Script collects
auth_token, exports flows and tables - Manifest written to
workflows_dump.json
On subsequent runs, the saved Playwright profile allows headless export without login.
This tool helps Okta admins:
- Back up Workflows for compliance
- Safely experiment with flows knowing they’re recoverable
- Migrate flows between tenants