Proteggiamo il tuo ambiente digitale da qualsiasi attacco informatico. Sfrutta tutte le potenzialità della piattaforma SGBox!

Gallery

Contatti

Via Melchiorre Gioia, 168 - 20125 Milano

info@sgbox.it

+39 02 60830172

Search another article?

You are here:
< Back

Run playbooks trigger to perform other tasks

Run a playbook from outside SGBox

The trigger must be the start node of the playbook. When it’s called, the PB starts and follows its normal flow.
Playbooks - Trigger Node

A URL is provided to call the playbook via browser or any HTTP request (e.g: CURL).
Test URL has to be used while building the playbook, before saving it. Production URL can be used once the PB is saved.
Parameters passed via GET or POST to the trigger became available to the other nodes.

Example

    • Call trigger URL via browser, adding a parameter in GET mode: https://10.250.2.87/sgbox/api/pb/trigger-pb-test?pb=jkDgWSy2S8PpCSVvq&test_param=test_value
    • The parameter is available to all nodes, in JSON format

Playbooks - Trigger Node

  • Test an example condition: the playbook will output {response: false}, as the string test_value does not start with the word TEST – that’s because we used the Case Sensitive option.

Playbooks - Trigger Node

Playbooks - Trigger Node

Run a playbook from inside another one

Playbooks containing a trigger as start node, will be available as nodes for other playbooks, with their custom icon too.

Playbooks - Trigger Node

Once added, the node acts as an API Request would do, so parameters can be passed to it, fixed or extracted from the output of previous nodes. In this way, Playbooks can interact, passing parameters each other.

Playbooks - Trigger Node

Playbooks - Trigger Node

In the example, we are triggering the playbook passing it a value read from an API

Playbooks - Trigger Node

Then the flow continues and the output of the triggered PB can be used in following nodes.