Skip to main content

Web Triggers

A web trigger is a script with its own URL. When another system calls that URL, the script runs and Script Master sends its answer back to the caller.

Applies to: Script Master for Jira and Script Master for Confluence Β· Cloud

Use web triggers to receive data from other tools or to start work in Jira or Confluence from outside. With Jira Automation, you can also react to events.

The Web Triggers tab with a list of web triggers, their Status switches, History and Last 7 days columns

How it works​

  1. You write the script on the Web Triggers tab and save it. Script Master gives it a URL.
  2. A caller sends an HTTP request to the URL. The caller doesn't sign in.
  3. Script Master runs the script on the Forge back end, through your Companion App. The script gets the request as request.
  4. The script returns an object with a statusCode, and Script Master sends it to the caller as the HTTP response.

The script runs as the app, not as a user. It calls Jira or Confluence with api.asApp(), so it isn't limited by the permissions of whoever calls the URL. See Web trigger request and response for the objects and the globals a script can use.

warning

Anyone who has the URL can call it. Check a token or a secret header at the start of every script that reads or changes data. See Require a token on a web trigger.

The URL​

The URL is Script Master's own Forge web trigger URL, which you copy from the editor. It isn't your Companion App's URL: callers never reach the Companion App directly. All web triggers on a site share one base URL. The id query parameter at the end, for example ?id=00000000-0000-0000-0000-000000000000, picks the web trigger. Keep it when you add your own parameters: a call without it gets 400.

The URL appears after the first save and stays the same when you change the script. Deleting the web trigger makes its URL stop working.

Turn a web trigger on or off​

A new, duplicated or imported web trigger starts switched off. While it's off, calls get 403 and the script doesn't run. Turn it on with Enable in the editor, or with its switch in the Status column of the list.

What the list shows​

ColumnWhat it shows
Web triggerThe title. Select it to open the editor.
StatusWhether the web trigger answers calls.
HistoryThe last kept calls, oldest on the left. Select one for its details.
Last 7 daysCalls per day, with failed calls in red.
ActionsEdit, Version history…, Turn on or Turn off, Duplicate, Export and Delete…

Run history explains the History and Last 7 days columns. Failures explains what a failed call records.

Limitations​

LimitValueWhat to do
Web triggers per site100Route several tasks through one web trigger with a query parameter or the HTTP method.
Rows per page in the list20Use the page numbers under the list, or Filter by name or description.
Title128 charactersNot applicable
Script size230 KiBMove large data out of the script.
Kept calls per web triggerThe last 10Copy a call's details with Copy as JSON to keep them.
Successful calls recordedAt most one every 5 minutes per web triggerFailed calls, and calls that log an error, are always recorded.
Output lines per call100 lines of up to 2,048 characters eachLog less, or return a summary.

When calls arrive too fast, Script Master answers 429 without running the script. The caller should wait and try again.

Web triggers need a configured Companion App. Without one, the tab shows Action Required: This feature cannot function without companion app, and every call fails with 500.

Tasks​

Examples​