Automation Integrations
Use Automation integrations to create custom actions that you can run inside Jira automation flows. This allows you to implement logic that extends beyond native automation actions, such as complex updates, cross-space operations, or external integrations.
Actions run as part of an automation flow, so there can be a short delay between the flow running and your script running. For more information, see Performance and latency on the Scripting limitations page.
Custom action reuse
You can create a custom action once in ScriptRunner and reuse it across multiple automation flows. This helps you:
- Maintain common logic in a single place (for example, notifications, task creation, field synchronization).
- Apply consistent behavior across spaces.
To make a reused action flexible without duplicating it, use dynamic forms to add configurable input fields to your script. This means the same action can serve different use cases across flows, with different values set for each, without requiring any code changes.
Run as and connections
When you add the Run a script (ScriptRunner) action to an automation flow, you must Connect to Jira as a user. This connection defines which Jira user account is used when your custom action runs. This behaves similarly to the Run as option you configure when creating the script in ScriptRunner:
- If your script's Run as is set to As current user, the action will run as the connected user (the user who added the ScriptRunner action to the flow).
- This is the recommended setup when the same script is reused in multiple actions or flows created by different users.
- If you explicitly set Run as in the script to a specific user or to the ScriptRunner app, that setting overrides the connection role.
- In this case, the script always runs as the specified user or as the app, regardless of who created the automation flow or which user is connected in the flow.
Output and logging
When you run a script, the output panel shows:
- Anything logged with
console.log(...) - The final value returned by your script with
return
Use console.log(...) for messages, intermediate values, or debugging, and include a return statement for the main result you want to display.
Activity history
Saved automation actions keep activity history (under Output), so you can review when they were run, and what the output was, making it easier to audit and troubleshoot.
Create an automation action
Follow these steps to create a new automation action in ScriptRunner:
Test an automation action
You can test your automation actions before adding them to an automation flow. This lets you confirm that your script behaves as expected for a given set of inputs.
Test data is the JSON object your script receives as its argument. When the action runs in a real flow, this object holds the values configured for your dynamic form fields, including any smart values the flow has substituted. When you test, you supply those values yourself.
Test your automation action as follows:
Testing runs your script directly, so nothing in the flow around it runs. Smart values are not substituted, and any defaults you set with @default in your Parameters interface are not filled in for you. Enter the finished values you want your script to receive.
Add your automation action to an automation flow
After you create an automation action, attach it to a specific automation flow:
Edit an automation action
Use these steps to modify an existing automation action:
Enable and disable an automation action
You can enable or disable automation actions:
- Globally in ScriptRunner (affects all flows that reference the action).
- Per flow in an automation flow (affects only that script in a flow).
Use global enable/disable when you want to stop an action everywhere. Use flow‑level enable/disable when you only want to pause or remove it from a specific automation flow.
Enable or disable globally
To enable or disable an automation action everywhere it is used:
- In Jira administration, select Marketplace apps.
- Under Apps, select ScriptRunner.
- In ScriptRunner, select Automation integrations.
- Locate the automation action.
- Open the ellipsis (…) menu for that action and select Disable or Enable.
This setting applies to every automation flow that references the action. Disabling it here prevents the script from running anywhere, without needing to edit each flow.
Enable or disable a specific flow
You can disable an entire Jira automation flow, or you can control just your custom action by disabling only the ScriptRunner step in that flow.
To enable or disable an automation action in a single flow:
- In Jira System settings, under Automation, select Global automation.
- Select the flow that contains your custom action.
- Select the Run a script (ScriptRunner) action you want to disable or enable.
- Check or uncheck Disable this script from running in this flow.
- Select Update to save the flow change.
Delete an automation action
Remove automation actions you no longer need to keep your list organized and reduce clutter. When you delete an automation action, it's removed from your active Automation integrations list and is no longer available to automation flows. Any flows that referenced the action may still run, but the deleted script will no longer run as part of those flows.
To delete an automation action:
- In Jira administration, select Marketplace apps.
- Under Apps, select ScriptRunner.
- Select Automation integrations.
- Find the automation action you want to remove.
- Open the ellipsis (…) menu for that action.
- Select Delete.
- When prompted, confirm that you want to delete the automation action.
Restore a deleted automation action
When you restore an automation action, it becomes available again in ScriptRunner and is reconnected to any active automation flows that previously used it. Those flows will start running the script again the next time they are triggered, and the action's activity history remains available.
To restore a deleted automation action:
- In Jira administration, select Marketplace apps.
- Under Apps, select ScriptRunner.
- Select Automation integrations.
- Use the filter and select Deleted to view deleted automation actions.
- Find the automation action you want to restore.
- Open the ellipsis (…) menu for that action.
- Select Restore.