Jira Automation Integration

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

  1. Open a script in the Console
  2. Go to the Config tab
  3. Click Add Trigger and select Automation
  4. Save the script

The script must be enabled and have an enabled Automation trigger to be available in Jira Automation.

Add Automation trigger to script

Script returning JSON for automation

3. Create an Automation Rule

  1. In Jira, go to Project Settings > Automation (or global automation)
  2. Create or edit a rule
  3. Add the action “Run Script - JiBrok Studio”
  4. Configure the inputs (see below)

Add component to automation rule

Search for JiBrok Studio action


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

Automation action script selection

Automation action configuration


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

Automation log result data

Automation log JSON parse result


Example Automation Rule

Scenario: When a high-priority issue is created, run a script that assigns a reviewer and posts a Slack-style comment.

  1. Trigger: Issue created
  2. Condition: Priority = Highest or High
  3. Action: Run Script - JiBrok Studio
    • Script: “Auto-assign reviewer”
    • Issue Key: {{issue.key}}
  4. Condition: {{triggeredJiraScript.success}} equals true
  5. Action: Log or send notification with {{triggeredJiraScript.result}}

Automation rule overview

Automation rule execution log result

Automation audit log results


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