Skip to main content
Question

How to Trigger a Machine Learning Script from a Button in Celonis?

  • April 4, 2025
  • 2 replies
  • 295 views

MrAj
Level 2
Forum|alt.badge.img

Hi everyone,

I need help figuring out how to execute a Machine Learning script directly from a button in my Celonis app in views (dashboard). I believe I might need to use Action Flows, but I’m unsure about the exact steps to make this work.

Here’s what I want to achieve:

  1. When a user clicks a button in the Celonis app, it should trigger an ML script.

  2. The script could be hosted externally (e.g., a REST API) or executed within Celonis.( atm its not hosted, there is just a file in ipynb format, stored in ml workbench in  analysis.

  3. I need guidance on how to set up the Action Flow and link it to the button.

Has anyone implemented something similar? If so, could you share the best approach and any potential challenges I should be aware of?

Thank you in advance!

2 replies

Michał
Level 1
Forum|alt.badge.img
  • Level 1
  • August 26, 2026

Hi MrAj,

Action Flow can execute a Skill which executes a Jupyter Notebook in your Machine Learning Workbench.
Hope that helps

Best Regards,

Michał


abhishek.chatu14
Level 12
Forum|alt.badge.img+8

Recommended Approach

Studio View Button → On-demand Action Flow → ML Workbench Notebook

1. Prepare the ML Workbench Notebook

  • Upload/import the .ipynb into ML Workbench.

  • Note the notebookId and executionFileName.

  • If passing values from the Studio View, add a cell tagged parameters:

record_id = ""
user_name = ""
threshold = 0

These act as defaults and can be overwritten by Action Flow inputs.

2. Create an On-demand Action Flow

The Action Flow should:

  1. Receive inputs from the Studio View.

  2. Prepare the parameters.

  3. Trigger the ML Workbench notebook.

  4. Optionally perform additional processing.

The Action Flow must be published, active, and configured for On-demand execution.

3. Trigger the Notebook

HTTP Request
Use an HTTP/Make a Request step:

POST https://<teamDomain>.<env>.celonis.cloud/machine-learning/api/executions
Authorization: AppKey <APP_KEY>

Body:

{
"notebookId": "<notebookId>",
"executionFileName": "<executionFileName>",
"params": {
"record_id": "{{record_id}}",
"user_name": "{{user_name}}",
"threshold": "{{threshold}}"
}
}

4. Connect to the Studio View

In Studio View:

  1. Add an action to the button/component.

  2. Select Run Action Flow.

  3. Select the published, active On-demand Action Flow.

  4. Map the View values to the Action Flow inputs.

Example:

Selected Row → record_id → Action Flow → ML Notebook

Important Considerations

  • Action Flow: Must be published, active, and On-demand. Otherwise, it may not appear in Studio View.

  • Notebook parameters: The parameter cell must have the parameters tag.

  • Execution status: A successful Action Flow/API call only confirms that the notebook was triggered. The notebook may still be queued/running. Check ML Workbench → Triggered for status/logs.

  • API: Use POST with notebookId. Do not use GET or workspaceId.

  • executionFileName: Use the full path if needed, e.g. FolderA/script.ipynb.

  • Parameter limit: The params payload has a 96 KB limit. For large data, pass an ID/path instead.

  • Multiple rows: If the View passes multiple selected rows as an array, an iterator may be required in the Action Flow.

 

Can follow the following documentation as well → https://docs.celonis.com/en/trigger-machine-learning-script.html