Skip to main content

Celonis Product Documentation

Execute Action Flows in Skills

In this documentation, we're going to show you how you can execute an Action Flow from Skills. If you're interested in how to do it the other way around, i.e. execute a Skill from an Action Flow, please check out this tutorial.

Getting Started
Configuring the Action Flow

1. Navigate to your Action Flow that you want to execute in Skills.

2. Add a new action.

3. Search for 'Celonis'.

4. Select 'Custom Skill Trigger'. It gets triggered anytime data from a Process Automation Skill is received.

5. Configure a Webhookby clicking on 'Add' in the Action configuration by naming it. A URL will be automatically created.

50725913.png

6. Publish your Action Flow to make it accessible from within skills.

Important

To access an Action Flow from a Skill, the Action Flow needs to be published (not only saved!).

Configuring the Skill

7. Go to the Skill you want to execute an Action Flow from.

8. Add a sensor to your Skill. In the example below, we've used a Manual Sensor, allowing for a manual execution of the skill by copying and inserting the execution URL in the browser.

50725856.png

(optional) 9. You can specify a custom input (called 'Test' with the initial value 'sample input' in the example below) that will be passed on to the Action Flow to be executed.

50726145.png

10. Select the Action Flow by navigating to 'Next Step' → 'Celonis' → 'Execute Action Flows'.

11. Select the Action Flow you want to use in the dropdown menu 'Action Flows'. Here, you get a list of all published Action Flows you can connect to.

12. In the 'Data' field below, you can additionally specify the data you want to pass on to the Action Flow in JSON format.

60361219.png

Note

Note that an additional menu called 'Output' opens up when you click on the 'Data' field: Here you can see all outputs from previous Skills (in our case: the Manual Sensor) that you can reference in the 'Data' field to be forwarded to the Action Flow.

Accessing Parameters in Action Flows

If you now run your Action Flow once by clicking on the 'Run' icon in the upper right corner, you will have the parameters available as inputs, allowing you to use them in further Actions. IMPORTANT: Your Action Flow will only receive something if your Skill sent something, so make sure to trigger the Sensor to make the Skill sent Bundle(s) to the Action Flow.

Using An Output From Action Flows in Skills

1. Configure a Webhook Response Action by adding a new Action → Webhooks → Response Action to send back content to the Skill in which you execute the Action Flow,

50725880.png

2. In the example, a text in JSON format was created to be sent back to the Skill. Add a data structure (1), choose a name (2) and add a item (3) to it. Choose a name for the item (4) and save it for later (remember it). Add the item (5) and make sure the data structure looks similar to the one in the screenshot. Save the data structure (6). After saving a new field occurs labeled with the name of the item you just defined (in the screenshots it's called 'input'). Fill the field with the respective item of the Celonis module (7) and save the set up by confirming it with the ok button (8).

55706450.png

3.1 to send it back to skills, the body of the webhook response needs to include the data created by the Create JSON Module. The status can be set to 200.

50725882.png

3.2 You also have the possibility to let the skill fail by sending back a status code standing for failure (find more about statuscodes here: https://en.wikipedia.org/wiki/List_of_HTTP_status_codes). You could use 400 (Bad Request) or 500 (Internal Server Error) to make sure that the Skill fails. You can have a look in the Logs of the skill, there you can see your status code which caused the failing as an output of the Execute Action Flow Skill.

55706398.png
55706400.png
55706401.png

4. Additionally you have the possibility to use the output data of the Action Flows in Skills. As an example you could set up the Execution Output skill adding a Custom Success Message of your choice including the sent data. To access the data which was send to the Execute Action Flow Skill you have to use the following formula:

${bXX["name"]}

  • the two XX have to be replaced by the number of the Execution Action Flow Skill, where we want to get the data from (In case of the screenshots the Execute AF Skill was directly after the sensor, so at the second place)

  • the name has to be replaced by the name you were told to save for later (remember it) in step 2. (in the example case the item was named 'input')

After saving, publishing, letting the Action Flow run and triggering the sensor with the corresponding link one should get the Custom Success Message defined before, in our case including the data we passed to the action flow and sent back (in the example case it was 'sample input').

55706457.png
55706458.png