Overview
JiBrok Studio integrates with Jira Automation as a custom action. You can add the “Run JiBrok Studio Script” action to any automation rule to execute a script from your library.
Scripts run as Application (no user context), making this ideal for system-level automations that don’t depend on a specific user’s permissions.
Setup
1. Enable the Automation Trigger Type
In the Administration panel, ensure the Automation trigger type is enabled globally.
2. Add an Automation Trigger to a Script
- Open a script in the Console
- Go to the Config tab
- Click Add Trigger and select Automation
- Save the script
The script must be enabled and have an enabled Automation trigger to be available in Jira Automation.
3. Create an Automation Rule
- In Jira, go to Project Settings > Automation (or global automation)
- Create or edit a rule
- Add the action “Run Script - JiBrok Studio”
- Configure the inputs (see below)
Action Inputs
| Input | Required | Description |
|---|---|---|
| Script | Yes | The script to execute (selected by script ID) |
| Issue Key | No | The issue key to pass to the script. Use {{issue.key}} smart value to pass the triggering issue |
Output Smart Values
The action produces smart values available to subsequent rule components:
| Smart value | Type | Description |
|---|---|---|
{{triggeredJiraScript.success}} |
boolean | Whether the script executed successfully |
{{triggeredJiraScript.result}} |
string | Script return value (string, number, or JSON object) |
{{triggeredJiraScript.error}} |
string | Error message if script execution failed |
{{triggeredJiraScript.executionMs}} |
integer | Script execution time in milliseconds |
Accessing fields from a JSON result
If your script returns an object (e.g. return { status: "done", count: 5 }), the result is delivered as a JSON string. Use jsonStringToObject() to parse it and access individual fields:
{{jsonStringToObject(triggeredJiraScript.result)}}- the parsed object{{jsonStringToObject(triggeredJiraScript.result).status}}- access a specific field{{jsonStringToObject(triggeredJiraScript.result).count}}- access another field
Example Automation Rule
Scenario: When a high-priority issue is created, run a script that assigns a reviewer and posts a Slack-style comment.
- Trigger: Issue created
- Condition: Priority = Highest or High
- Action: Run Script - JiBrok Studio
- Script: “Auto-assign reviewer”
- Issue Key:
{{issue.key}}
- Condition:
{{triggeredJiraScript.success}}equalstrue - Action: Log or send notification with
{{triggeredJiraScript.result}}
Important Notes
- Scripts run as Application - they use the Forge app’s permissions, not a specific user’s
- The script must have an enabled Automation trigger - otherwise the action will fail
- The Automation trigger type must be enabled in Administration
- Standard execution limits apply
Next Steps
- Triggers - All trigger types
- Administration - Enable/disable Automation trigger type
- Scripting Language - Language and API reference
- Limits - Execution limits











