OpalScript is Opal’s scripting language for automating access management workflows integrated deeply with Opal’s access management platform. Built on Starlark (a Python-like language), OpalScript enables you to write custom automation logic and scripts that evaluate conditions, query the access graph and take actions programmatically.
OpalScript currently supports automated request review, delegation conditions, request configuration conditions, and Paladin context, with more automation types planned:
Utility modules: Common functions shared across script types (e.g., access for access queries, notifications for sending notifications, http and secrets for calling external APIs). Which modules a script can use depends on its type. See Module availability by script type
Context module: Script-type-specific data about what triggered the script
Actions module: Script-type-specific operations the script can perform
This separation allows you to learn the core language and utility functions once, then apply them across different automation scenarios.
In Opal, navigate to Admin > OpalScript > Editor and create a new script. Give it a name and select an owner.For Request Review scripts, Opal provisions a service user with the same name as the script, owned by the owner you select. This service user is the identity that runs the script.
Enter your OpalScript in the editor. For example, to auto-approve all requests:
Attach the OpalScript to an approval stage on any resource, group, or configuration template (or via opal_script_ids in the REST API and Terraform). When a request reaches that stage, the script runs automatically.
For test runs, version history, triggers, and run monitoring, see Using the editor.To keep scripts in version control and attach them to approval stages as code, see Manage OpalScripts with Terraform.
Last modified on October 27, 2026
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Opal Security Docs","colors":{"primary":"#0C7997","light":"#EDFCFC","dark":"#074055"},"logo":{"light":"https://mintcdn.com/opalsecurity/FBbZyeMPZrA69UcV/logo/logo-dark.svg?fit=max\u0026auto=format\u0026n=FBbZyeMPZrA69UcV\u0026q=85\u0026s=93a4bd75f157f9f0ab43cdf4d715b5cd","dark":"https://mintcdn.com/opalsecurity/FBbZyeMPZrA69UcV/logo/logo-light.svg?fit=max\u0026auto=format\u0026n=FBbZyeMPZrA69UcV\u0026q=85\u0026s=1774b545e4f1c5cad647f5194f7b26d9"},"favicon":{"light":"https://mintcdn.com/opalsecurity/DRAwGKUXMxLRQouh/logo/icon-opal-black.svg?fit=max\u0026auto=format\u0026n=DRAwGKUXMxLRQouh\u0026q=85\u0026s=9c8bd1204b6b5b83542c2ab5be549858","dark":"https://mintcdn.com/opalsecurity/DRAwGKUXMxLRQouh/logo/icon-opal-white.svg?fit=max\u0026auto=format\u0026n=DRAwGKUXMxLRQouh\u0026q=85\u0026s=73b53b4ceab6ae0b00e30b2042a6020a"},"icons":{"library":"lucide"},"styling":{"eyebrows":"breadcrumbs","latex":false},"integrations":{"ga4":{"measurementId":"G-1PPPM1WF6D"}},"errors":{"404":{"redirect":false,"title":"Page can't be found","description":"Sorry! This page might have been moved, or the link might be broken. Go back to our documentation via https://docs.opal.dev/docs/welcome."}},"metadata":{"timestamp":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"opalsecurity","hasAudioNarration":false,"actualSubdomain":"opalsecurity","customDomains":["docs.opal.dev"],"gitSource":{"type":"github","owner":"opalsecurity","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6af3ae6f5af5c0e68e5e0857","clientVersion":"0.0.4102","searchFilterCounts":[{"language":"default","tag":"API Reference","count":218},{"language":"default","tag":"Opal API","count":213},{"language":"default","tag":"Documentation","count":104},{"language":"default","tag":"Integrations","count":102},{"language":"default","tag":"Entitlement Management","count":68},{"language":"default","tag":"resources","count":34},{"language":"default","tag":"groups","count":32},{"language":"default","tag":"Getting Started","count":25},{"language":"default","tag":"Access Management","count":22},{"language":"default","tag":"Infrastructure","count":22}]},"assistantConfig":{"enableStarterQuestions":true,"enableContextualStarterQuestions":true,"deflection":{"enabled":true,"email":"support@opal.dev","showHelpButton":true}},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"docs/opalscript-overview","slug":"/docs/opalscript-overview","pageMetadata":{"title":"Use OpalScript to automate access workflows","description":"Build access management workflows with OpalScript.","sidebarTitle":"Overview","href":"/docs/opalscript-overview"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Build access management workflows with OpalScript.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,em:`em`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{Badge,CodeBlock,Heading,Table,Tip}=_components;if(!Badge)_missingMdxReference(`Badge`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tip)_missingMdxReference(`Tip`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`overview`,children:`Overview`}),`\n`,_jsxs(_components.p,{children:[`OpalScript is Opal’s scripting language for automating access management workflows integrated deeply with Opal’s access management platform. Built on `,_jsx(_components.a,{href:`https://github.com/bazelbuild/starlark`,children:`Starlark`}),` (a Python-like language), OpalScript enables you to write custom automation logic and scripts that evaluate conditions, query the access graph and take actions programmatically.`]}),`\n`,_jsx(Heading,{level:`2`,id:`use-cases`,children:`Use cases`}),`\n`,_jsxs(_components.p,{children:[`OpalScript currently supports `,_jsx(_components.strong,{children:`automated request review`}),`, `,_jsx(_components.strong,{children:`delegation conditions`}),`, `,_jsx(_components.strong,{children:`request configuration conditions`}),`, and `,_jsx(_components.strong,{children:`Paladin context`}),`, with more automation types planned:`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Script Type`}),_jsx(_components.th,{children:`Status`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.a,{href:`/docs/requestreview-getstarted`,children:`Request Review`})}),_jsx(_components.td,{children:_jsx(Badge,{color:`green`,size:`sm`,children:`Available`})}),_jsx(_components.td,{children:`Automatically approve, deny, or comment on access requests`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.a,{href:`/docs/opalscript-delegation-conditions`,children:`Delegation Conditions`})}),_jsx(_components.td,{children:_jsx(Badge,{color:`green`,size:`sm`,children:`Available`})}),_jsx(_components.td,{children:`Decide which delegates are eligible to cover a request`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Request Configuration`}),_jsx(_components.td,{children:_jsx(Badge,{color:`green`,size:`sm`,children:`Available`})}),_jsx(_components.td,{children:`Decide whether a request configuration applies to a requested item`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.a,{href:`/docs/opalscript-context-provider`,children:`Paladin Context`})}),_jsx(_components.td,{children:_jsx(Badge,{color:`orange`,size:`sm`,children:`Beta`})}),_jsx(_components.td,{children:`Pull data from your own systems into a Paladin review`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.em,{children:`Additional types`})}),_jsx(_components.td,{children:_jsx(Badge,{color:`gray`,size:`sm`,children:`Coming Soon`})}),_jsx(_components.td,{children:_jsx(_components.em,{children:`More automation capabilities will be added`})})]})]})]}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[`New to OpalScript? The `,_jsx(_components.a,{href:`/docs/opalscript-ai-assistant`,children:`AI assistant`}),` can write a script for you from a plain-language description.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`how-opalscript-works`,children:`How OpalScript works`}),`\n`,_jsx(_components.p,{children:`Each OpalScript type has access to:`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/docs/opalscript-utilitymodules`,children:_jsx(_components.strong,{children:`Utility modules`})}),`: Common functions shared across script types (e.g., `,_jsx(_components.code,{children:`access`}),` for access queries, `,_jsx(_components.code,{children:`notifications`}),` for sending notifications, `,_jsx(_components.code,{children:`http`}),` and `,_jsx(_components.code,{children:`secrets`}),` for calling external APIs). Which modules a script can use depends on its type. See `,_jsx(_components.a,{href:`/docs/opalscript-utilitymodules#module-availability-by-script-type`,children:`Module availability by script type`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Context module`}),`: Script-type-specific data about what triggered the script`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Actions module`}),`: Script-type-specific operations the script can perform`]}),`\n`]}),`\n`,_jsx(_components.p,{children:`This separation allows you to learn the core language and utility functions once, then apply them across different automation scenarios.`}),`\n`,_jsx(Heading,{level:`2`,id:`create-your-first-workflow`,children:`Create your first workflow`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[`In Opal, navigate to `,_jsx(_components.strong,{children:`Admin`}),` > `,_jsx(_components.strong,{children:`OpalScript`}),` > `,_jsx(_components.strong,{children:`Editor`}),` and create a new script. Give it a name and select an `,_jsx(_components.strong,{children:`owner`}),`.`]}),`\n`,_jsx(_components.p,{children:`For Request Review scripts, Opal provisions a service user with the same name as the script, owned by the owner you select. This service user is the identity that runs the script.`}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:`Enter your OpalScript in the editor. For example, to auto-approve all requests:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`1`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`actions.approve()`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`See `,_jsx(_components.a,{href:`/docs/requestreview-getstarted`,children:`Request Review: Get started`}),` for the full `,_jsx(_components.code,{children:`context`}),` and `,_jsx(_components.code,{children:`actions`}),` API reference, and `,_jsx(_components.a,{href:`/docs/requestreview-examples`,children:`examples`}),` for ready-to-use scripts.`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[`Attach the OpalScript to an approval stage on any resource, group, or configuration template (or via `,_jsx(_components.code,{children:`opal_script_ids`}),` in the REST API and Terraform). When a request reaches that stage, the script runs automatically.`]}),`\n`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`For test runs, version history, triggers, and run monitoring, see `,_jsx(_components.a,{href:`/docs/opalscript-editor`,children:`Using the editor`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`To keep scripts in version control and attach them to approval stages as code, see `,_jsx(_components.a,{href:`/docs/opalscript-terraform`,children:`Manage OpalScripts with Terraform`}),`.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Use OpalScript to automate access workflows","description":"Build access management workflows with OpalScript.","sidebarTitle":"Overview","href":"/docs/opalscript-overview"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Overview","slug":"overview","depth":2,"children":[]},{"title":"Use cases","slug":"use-cases","depth":2,"children":[]},{"title":"How OpalScript works","slug":"how-opalscript-works","depth":2,"children":[]},{"title":"Create your first workflow","slug":"create-your-first-workflow","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/opalsecurity/d0e14c3cf9bbd682/changelog-scraper.js"],"subdomain":"opalsecurity","siteName":"Opal Security Docs","title":"Use OpalScript to automate access workflows - Opal Security Docs","contextualStarterQuestions":[{"_id":"6ae0dab3bc18c829f9bf62e9","deploymentId":"68ddaa9a3f8b7de5bc3a7b47","questionText":"How do I write access workflows?","status":"active","generatedBy":"contextual","path":"docs/opalscript-overview","createdAt":"2026-10-27T17:09:07.879Z","updatedAt":"2026-10-27T17:09:07.879Z","__v":0},{"_id":"6ae0dab3bc18c829f9bf62e8","deploymentId":"68ddaa9a3f8b7de5bc3a7b47","questionText":"What can OpalScript automate?","status":"active","generatedBy":"contextual","path":"docs/opalscript-overview","createdAt":"2026-10-27T17:09:07.879Z","updatedAt":"2026-10-27T17:09:07.879Z","__v":0},{"_id":"6ae0dab3bc18c829f9bf62ea","deploymentId":"68ddaa9a3f8b7de5bc3a7b47","questionText":"Which script types are available?","status":"active","generatedBy":"contextual","path":"docs/opalscript-overview","createdAt":"2026-10-27T17:09:07.879Z","updatedAt":"2026-10-27T17:09:07.879Z","__v":0}],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-27T17:08:43.516Z","gitLastModified":"2026-10-27T17:08:07.000Z","originalFileLocation":"docs/opalscript-overview.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Build access management workflows with OpalScript.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Opal Security Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/opalsecurity/t501z2uOx-XXqevB/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/opalsecurity/t501z2uOx-XXqevB/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/opalsecurity/t501z2uOx-XXqevB/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/opalsecurity/t501z2uOx-XXqevB/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/opalsecurity/t501z2uOx-XXqevB/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/opalsecurity/t501z2uOx-XXqevB/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/opalsecurity/t501z2uOx-XXqevB/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/opalsecurity/t501z2uOx-XXqevB/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/opalsecurity/t501z2uOx-XXqevB/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Use OpalScript to automate access workflows - Opal Security Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Build access management workflows with OpalScript.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Opal Security Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.opal.dev/docs/opalscript-overview\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://opalsecurity.mintlify.site/_mintlify/api/og/v2?division=OpalScript\u0026amp;title=Use+OpalScript+to+automate+access+workflows\u0026amp;description=Build+access+management+workflows+with+OpalScript.\u0026amp;theme=156eb1ba223f12a303f95077\u0026amp;signature=d93950c811db031891dc3a207618372d3730503beccbb587d96e00459aecf143\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Use OpalScript to automate access workflows - Opal Security Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Build access management workflows with OpalScript.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://opalsecurity.mintlify.site/_mintlify/api/og/v2?division=OpalScript\u0026amp;title=Use+OpalScript+to+automate+access+workflows\u0026amp;description=Build+access+management+workflows+with+OpalScript.\u0026amp;theme=156eb1ba223f12a303f95077\u0026amp;signature=d93950c811db031891dc3a207618372d3730503beccbb587d96e00459aecf143\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/opalsecurity/t501z2uOx-XXqevB/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Opal Security Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0C7997\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.opal.dev/docs/opalscript-overview\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/opalscript-overview.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.opal.dev/#organization\",\"name\":\"Opal Security Docs\",\"url\":\"https://docs.opal.dev\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/opalsecurity/FBbZyeMPZrA69UcV/logo/logo-dark.svg?fit=max\u0026auto=format\u0026n=FBbZyeMPZrA69UcV\u0026q=85\u0026s=93a4bd75f157f9f0ab43cdf4d715b5cd\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.opal.dev#website\",\"name\":\"Opal Security Docs\",\"url\":\"https://docs.opal.dev\",\"publisher\":{\"@id\":\"https://docs.opal.dev/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.opal.dev/docs/opalscript-overview#webpage\",\"url\":\"https://docs.opal.dev/docs/opalscript-overview\",\"name\":\"Use OpalScript to automate access workflows\",\"description\":\"Build access management workflows with OpalScript.\",\"dateModified\":\"2026-10-27T17:08:07.000Z\",\"isPartOf\":{\"@id\":\"https://docs.opal.dev#website\"},\"breadcrumb\":{\"@id\":\"https://docs.opal.dev/docs/opalscript-overview#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.opal.dev/docs/opalscript-overview#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Opal Security Docs\",\"item\":\"https://docs.opal.dev\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Use OpalScript to automate access workflows\",\"item\":\"https://docs.opal.dev/docs/opalscript-overview\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.opal.dev/docs/opalscript-overview#article\",\"headline\":\"Use OpalScript to automate access workflows\",\"name\":\"Use OpalScript to automate access workflows\",\"description\":\"Build access management workflows with OpalScript.\",\"url\":\"https://docs.opal.dev/docs/opalscript-overview\",\"mainEntityOfPage\":{\"@id\":\"https://docs.opal.dev/docs/opalscript-overview#webpage\"},\"dateModified\":\"2026-10-27T17:08:07.000Z\",\"publisher\":{\"@id\":\"https://docs.opal.dev/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.opal.dev#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Opal Security Docs\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Opal Security Docs\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/docs/opalscript-overview.md","siteName":"Opal Security Docs","nav":{"global":null,"tabs":[{"tab":"Documentation","groups":[{"group":"Welcome","icon":"leaf","pages":[{"title":"Quickstart","mode":"wide","href":"/docs/welcome"},{"title":"Overview","href":"/docs/opal-overview"},{"title":"Concepts","href":"/docs/opal-101"},{"title":"Opal architecture","href":"/docs/opal-architecture"},{"group":"Best practices","pages":[{"title":"Best practices for access requests","href":"/docs/best-practices-for-access-requests"},{"title":"Best practices for access reviews","href":"/docs/best-practices-for-user-access-reviews"}]}]},{"group":"End user","icon":"book-open","pages":[{"title":"Access Request FAQs","sidebarTitle":"How to request access","href":"/docs/end-user-faq"},{"title":"Tips on searching","href":"/docs/tips-on-searching"},{"title":"Complete Access Reviews","sidebarTitle":"How to complete access reviews","href":"/docs/complete-access-reviews"}]},{"group":"Getting Started","icon":"rocket","pages":[{"title":"Set up Cloud","href":"/docs/set-up-cloud"},{"group":"Set up Self-Hosted","pages":[{"title":"Set up Self-Hosted","href":"/docs/self-host-overview"},{"title":"Self-Hosted on AWS EKS","href":"/docs/self-host-opal-aws-guide"},{"title":"Self-Hosted on GKE","href":"/docs/self-host-opal-gke-guide"},{"title":"Disaster recovery guide","href":"/docs/disaster-recovery-guide"},{"title":"Update your Opal installation","href":"/docs/update-self-hosted-opal"},{"title":"Install Opal using Helm","href":"/docs/install-opal-using-helm"},{"title":"Set up an Airgapped Opal Environment","href":"/docs/setup-an-airgapped-opal-environment"},{"title":"Configure Async Exports Storage (Self-Hosted)","href":"/docs/configure-async-exports-storage"},{"title":"Kubernetes Components and Health Monitoring","href":"/docs/kubernetes-components-and-health-monitoring-guide"}]},{"group":"Connect Identity or HR Providers","pages":[{"title":"Connect Identity or HR Providers","sidebarTitle":"Overview","href":"/docs/connect-your-identity-provider-idp"},{"title":"Add your first IDP/HR provider","href":"/docs/add-your-first-idphr-provider"},{"title":"Add additional IDP/HR providers","href":"/docs/add-additional-idphr-providers"},{"title":"Import user secondary emails","href":"/docs/importing-user-secondary-email"}]},{"title":"Connect Productivity Tools","sidebarTitle":"Connect Productivity Tools","href":"/docs/connect-your-productivity-tools"},{"group":"Connect Apps and Infrastructure","pages":[{"title":"Connect Apps and Infrastructure","sidebarTitle":"Overview","href":"/docs/set-up-connections"},{"title":"Import and configure resources","href":"/docs/import-and-configure-resources-and-groups"},{"title":"Opal's server IP ranges","href":"/docs/ip-ranges"}]},{"group":"Configure SSO and MFA","pages":[{"title":"Configure SSO and MFA","sidebarTitle":"Overview","href":"/docs/configure-sso-and-mfa"},{"group":"SSO with SAML","pages":[{"title":"SSO with SAML","href":"/docs/sso-with-saml"},{"title":"Google SAML Setup","href":"/docs/google-saml-setup"},{"title":"Okta SAML Setup","href":"/docs/okta-saml-setup"}]},{"title":"Okta Multifactor Authentication","href":"/docs/okta-multifactor-authentication"},{"title":"Okta SCIM: Provision Opal Users","href":"/docs/okta-scim-integration"},{"title":"OIDC Provider Setup for Opal Actions","href":"/docs/oidc-provider-setup-for-opal-actions"}]}]},{"group":"Access Management","icon":"shield","pages":[{"group":"Manage end-user catalog","pages":[{"title":"Curate end-user catalog","href":"/docs/curate-catalog"},{"title":"Bundles","href":"/docs/bundles"},{"title":"Configure reviewers","href":"/docs/configure-reviewers"},{"title":"Escalate if no response","href":"/docs/escalate-if-no-response"},{"title":"Request on behalf rules","href":"/docs/request-on-behalf"},{"title":"Delegate reviews","href":"/docs/delegate-reviews"}]},{"title":"Configuration templates","href":"/docs/configuration-templates"},{"title":"Manage access with ticketing","href":"/docs/ticket-propagation"},{"title":"Access Rules","href":"/docs/access-rules"},{"title":"Risk Center","href":"/docs/least-privilege-posture-management"},{"group":"Manage groups in Opal","pages":[{"title":"Overview","href":"/docs/manage-groups-in-opal"},{"title":"Manage break-glass access","href":"/docs/manage-breakglass-access"},{"title":"Nested groups","href":"/docs/nested-groups"},{"title":"Group aliasing","href":"/docs/okta-group-aliasing"},{"title":"Linked groups","href":"/docs/linked-groups"},{"title":"Group leaders","href":"/docs/group-projects"}]},{"title":"Notifications","href":"/docs/notifications"},{"title":"Special roles in Opal","href":"/docs/roles-in-opal"},{"title":"Owner Permissions","href":"/docs/owner-permissions"},{"title":"Custom Opal roles","href":"/docs/custom-opal-roles"},{"title":"User provisioning","href":"/docs/user-provisioning"},{"title":"Access Comparison","sidebarTitle":"Access Comparison","tag":"NEW","href":"/docs/access-comparison"}]},{"group":"AI Agent Governance","icon":"cpu","pages":[{"title":"Agent Inventory","href":"/docs/agent-inventory"},{"title":"OpenAI and ChatGPT","href":"/docs/openai-chatgpt-setup"},{"title":"Anthropic Setup","description":"Connect your Anthropic organization to Opal and sync Claude agents into Agent Inventory.","href":"/docs/anthropic-agent-setup"}]},{"group":"OpalScript","icon":"scroll","tag":"NEW","pages":[{"title":"Use OpalScript to automate access workflows","sidebarTitle":"Overview","href":"/docs/opalscript-overview"},{"title":"Work with scripts in the OpalScript editor","description":"Create, test, version, and monitor OpalScript automations from the editor.","sidebarTitle":"Using the editor","href":"/docs/opalscript-editor"},{"title":"Write OpalScript with AI","sidebarTitle":"Write with AI","href":"/docs/opalscript-ai-assistant"},{"title":"Utility Modules for OpalScript","sidebarTitle":"Utility Modules","href":"/docs/opalscript-utilitymodules"},{"group":"Request Review Scripts","pages":[{"title":"Start automating workflows around requests","sidebarTitle":"Request Review","href":"/docs/requestreview-getstarted"},{"title":"Request Review Example Scripts","sidebarTitle":"Examples","href":"/docs/requestreview-examples"}]},{"title":"Control who can cover a request with delegation conditions","sidebarTitle":"Delegation Conditions","href":"/docs/opalscript-delegation-conditions"},{"title":"Choose a request configuration with OpalScript","sidebarTitle":"Request Configuration Conditions","href":"/docs/opalscript-request-configuration-conditions"},{"title":"Give Paladin extra context with context provider scripts","sidebarTitle":"Paladin Context","tag":"BETA","href":"/docs/opalscript-context-provider"},{"title":"Manage OpalScripts with Terraform","sidebarTitle":"Terraform","href":"/docs/opalscript-terraform"},{"title":"OpalScript Reference","sidebarTitle":"Reference","href":"/docs/opalscript-reference"}]},{"group":"Paladin","icon":"bot","tag":"NEW","pages":[{"title":"Use Paladin to scale your security function","sidebarTitle":"Overview","href":"/docs/paladin/overview"},{"title":"Review access requests with Paladin","sidebarTitle":"Access Requests","href":"/docs/paladin/access-request"},{"title":"Review access campaigns with Paladin Insights","sidebarTitle":"Access Reviews","href":"/docs/paladin/access-reviews"},{"title":"Model providers","sidebarTitle":"Model Providers","href":"/docs/paladin/model-providers"},{"group":"AI Gateways","tag":"BETA","pages":[{"title":"Connect an AI gateway","sidebarTitle":"Overview","href":"/docs/paladin/ai-gateway"},{"title":"Connect Cloudflare AI Gateway","sidebarTitle":"Cloudflare AI Gateway","href":"/docs/paladin/ai-gateway-cloudflare"},{"title":"Connect LiteLLM","sidebarTitle":"LiteLLM","href":"/docs/paladin/ai-gateway-litellm"},{"title":"Connect Bifrost","sidebarTitle":"Bifrost","href":"/docs/paladin/ai-gateway-bifrost"}]},{"title":"Set up Paladin on self-hosted Opal","sidebarTitle":"Self-Hosted Setup","href":"/docs/paladin/self-hosted-setup"}]},{"group":"OpalQuery","icon":"search","tag":"NEW","pages":[{"title":"Overview","href":"/docs/opal-query"},{"title":"Node queries","href":"/docs/opal-query-node"},{"title":"Access queries","href":"/docs/opal-query-access"},{"title":"Query API","href":"/docs/opal-query-api"}]},{"group":"Auditing and Security","icon":"user-round-search","pages":[{"group":"Access Campaigns","tag":"NEW","pages":[{"title":"Create Access Campaigns","sidebarTitle":"Create access campaigns","href":"/docs/access-campaigns"},{"title":"Manage Access Campaign","sidebarTitle":"Manage your access campaign","href":"/docs/managing-access-campaigns"},{"group":"Legacy UARs","pages":[{"title":"Create Access Reviews","tag":"LEGACY","href":"/docs/access-reviews-legacy"},{"title":"Assign and complete reviews","tag":"LEGACY","href":"/docs/assigning-and-completing-reviews-legacy"},{"title":"Manage reviews","tag":"LEGACY","href":"/docs/managing-user-access-reviews-legacy"}]}]},{"title":"Events","href":"/docs/event-types"},{"title":"Events Streaming","href":"/docs/events-streaming"},{"title":"Metrics dashboard","href":"/docs/metrics"},{"title":"Sync schedules and triggers","href":"/docs/sync-schedules-and-triggers"}]},{"group":"Custom Integrations","icon":"pencil-line","pages":[{"title":"Overview","href":"/docs/custom-integrations-overview"},{"title":"Create your own connector","href":"/docs/how-to-create-your-own-connector"},{"title":"Custom Connector API Spec","href":"/docs/api-spec"},{"title":"Webhooks","href":"/docs/webhooks"}]},{"group":"For Developers","icon":"terminal","pages":[{"title":"Opal CLI","href":"/docs/opal-cli"},{"title":"Use Terraform with Opal","href":"/docs/use-terraform-with-opal"},{"group":"Model Context Protocol (MCP) Server","tag":"NEW","pages":[{"title":"Model Context Protocol (MCP)","mode":"wide","sidebarTitle":"Overview","href":"/docs/mcp/overview"},{"title":"End User MCP Server","sidebarTitle":"End Users","href":"/docs/mcp/end-user"},{"title":"Admin Provisioning MCP Server","sidebarTitle":"Admin Provisioning","href":"/docs/mcp/admin-provisioning"},{"title":"Admin Auditing MCP Server","sidebarTitle":"Admin Auditing","href":"/docs/mcp/admin-auditing"},{"title":"Okta Cross App Access (XAA)","sidebarTitle":"Okta Cross App Access","href":"/docs/mcp/okta-cross-app-access"},{"title":"Legacy MCP","deprecated":true,"href":"/docs/mcp/gram-mcp-servers"}]}]}]},{"tab":"Integrations","pages":[{"title":"Integrations","href":"/integrations/overview"}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/reference/authentication"}]},{"tab":"Changelog","pages":[{"title":"Changelog","href":"/changelog/changelog"}]}]},"basePath":"","title":"Use OpalScript to automate access workflows - Opal Security Docs","buildId":"dpl_596ePT575z4qnAFksq1biRW97aLY","deploymentId":"dpl_596ePT575z4qnAFksq1biRW97aLY","dynamics":[],"chunks":[]}