Skip to main content

Hello everyone,

 

I am trying to call a ML python script from an Action Flow with some parameters. Do some math with it, and give a response to the same Action Flow.

Following the documentation in Trigger Machine Learning Script (celonis.com), I have been able to call the Python code, pass some parameters, process them and then call a NEW Action Flow. Is it possible to make the first action flow wait for a response and make a GET or something similar so you continue in the same action flow?

 

Thank you,

Federico Arribas.

 

Hi Federico,

 

As far as I know, the action flows do not have event based routers that can handle this type of logic unfortunately.


Thank you for your answer, Jan!

How would you handle this kind of workflows? I mean, I call a webhook from an API with some input data, transfer such data to the ML notebook with the Celonis ML API (which I cannot find much documentation on btw, if you now any resources...(maybe perform a GET call from the http?)) and then need to return the processed data to the same system that made the call. How would you do such action? calling a new action flow for the response with the processed data?

 

Best regards,

Federico Arribas.


Thank you for your answer, Jan!

How would you handle this kind of workflows? I mean, I call a webhook from an API with some input data, transfer such data to the ML notebook with the Celonis ML API (which I cannot find much documentation on btw, if you now any resources...(maybe perform a GET call from the http?)) and then need to return the processed data to the same system that made the call. How would you do such action? calling a new action flow for the response with the processed data?

 

Best regards,

Federico Arribas.

You can call a Webhook to start an AF. The AF can call a python, passing parameters. the python can do the processing

Now to call the initial system, I would make the python to write the info in a process model and then call a new AF, that will read the data and then send to the initial system using some standard conector.

 

the alternative is to implement the call directly from the python, but I think that will be a can of worms.

 

My 0,02€


Thank you for your answer, Jan!

How would you handle this kind of workflows? I mean, I call a webhook from an API with some input data, transfer such data to the ML notebook with the Celonis ML API (which I cannot find much documentation on btw, if you now any resources...(maybe perform a GET call from the http?)) and then need to return the processed data to the same system that made the call. How would you do such action? calling a new action flow for the response with the processed data?

 

Best regards,

Federico Arribas.

Hi Federico,

 

To call an ML Notebook, I use the option in the automation skill and let it be executed by the Skill. Didn't know that this was also possible by using an API endpoint directly. If I do an API call, I use indeed the HTTP module to perform get/post requests.

Since I do not see an option to send the data back in the same flow, I would indeed create a new flow that starts with an Webhook call and an instant trigger. By making this call at the end of your notebook, you could pass variables back to Celonis and let it be handled by the action flow.


Really appreciate your answers Jan and Guillermo! What I will do is create a new Action Flow and make the Python code call the new action flow returning the processed data. However, saving the data into the model would also be very convenient in some situations.

 

One month more question, seems like Celonis ML has an API to make calls to Jupyter. For example, in this case I am making a POST request to "https://{{teamDomain}}. {{2ENV}}.celonis.cloud/machine-learning/api/executions".

Do you know if there is any further information regarding this API? I have not been able to find anything. This could be a very powerful API if implemented problerly.

 

Best regards,

 

Federico Arribas 


Really appreciate your answers Jan and Guillermo! What I will do is create a new Action Flow and make the Python code call the new action flow returning the processed data. However, saving the data into the model would also be very convenient in some situations.

 

One month more question, seems like Celonis ML has an API to make calls to Jupyter. For example, in this case I am making a POST request to "https://{{teamDomain}}. {{2ENV}}.celonis.cloud/machine-learning/api/executions".

Do you know if there is any further information regarding this API? I have not been able to find anything. This could be a very powerful API if implemented problerly.

 

Best regards,

 

Federico Arribas 

Hi Federico,

 

I wasn't even aware of this API, so unfurtunately that also implies that I did not came across any information about this during my documentation digging sessions..

 

Next to that, and I'm not sure if I understand your use case correctly, wouldn't it be easier to directly push your data back to the data model from the Python script, using the PyCelonis interface? Then you have no need to push it back to the Action Flows.

 

Best regards,

Jan-peter


Hi Jan,

 

Hopefully they will develop the documentation sometime soon. Could be very powerful.

Prussing the processed data back to the data model with PyCelonis is defiantly the best option (maybe have a specific table which has to do with predictions?).

Getting back to the action flow would be for cases such as sending an email with the processed information or inform the webhook response with the processed data or similar. This would have to be done with another Action Flow i guess.

 

Best regards,

Federico Arribas

 


Hi Jan,

 

Hopefully they will develop the documentation sometime soon. Could be very powerful.

Prussing the processed data back to the data model with PyCelonis is defiantly the best option (maybe have a specific table which has to do with predictions?).

Getting back to the action flow would be for cases such as sending an email with the processed information or inform the webhook response with the processed data or similar. This would have to be done with another Action Flow i guess.

 

Best regards,

Federico Arribas

 

Ah yes, such follow-ups would be helpful indeed via another Action Flow.


Hey Federico,

how did you get it to work? I have followed all the steps in the page, but it does not execute the notebook. Which is super surprising because the POST request ends with status 200. Did you face anything similar?


Hi I need some help in action flows I want to trigger it from views I see it is similar use case only where I want to trigger AF and then send back ml script response to views..

Could we connect it would be great if u could help me


Reply