Skip to main content
I want to capture the Username of the logged person when executing the action flow. How can I achieve that?

Hello Sai,

 

use pql function USER_NAME() to get the user id of logged person.


Hello Sai,

 

use pql function USER_NAME() to get the user id of logged person.

Hello Mukesh,

 

Thanks for the Information.

 

Where exactly do we need to enter this..?

 

In the action flow?

in the dynamic variable?

on the skill?

 

Thanks

Vishal


Hi,

 

The most important question is How Action Flow is triggered? The answer will determine solution.

 

A) If it's triggered in Business Views in a form of KM Action you'll have to use skill>AF combination to trigger it. In that scenario you'll have to inject USER_NAME() somewhere, not idea how exactly yet.

 

EDIT: i think webhooks can be used for that scenario. In a view just add button to send request / go to URL. Not sure yet how to get PQL function USER_NAME() into that URL without manual writing :|

 

image 

 

 

 

B) If it's triggered manually, it's possible to get it from AF run history:

 

imageyou can capture that data by using python script to send request to URL:

https://<team_name and cluster>.celonis.cloud/ems-automation/api/root/<root_id>/asset/<package_name>/proxy/api/v2/scenarios/<scenario_no>/logs?showCheckRuns=true

 

In my example full URL was:

https://orbis-partner-sandbox.eu-1.celonis.cloud/ems-automation/api/root/f2a144ab-afac-45c5-9ed0-80c00839d7c0/asset/training-package.test-action-flow/proxy/api/v2/scenarios/55256/logs?showCheckRuns=true

 

Not sure how to get root_ID without just going to Specific AF history and checking it manually. As long as you'll monitor specific AF's - you should be fine, dynamic solution may be harder to implement (f.e. monitor all existing AF's in package or in a team). If you're not sure how to send requests to with Celonis authorization data, just check one of the topics I've shown how to do it:

A) https://www.celopeers.com/s/question/0D5S7000003LJKpKAO/load-data-from-the-comments-component-into-an-external-database

B) https://www.celopeers.com/s/question/0D5S7000002zYX7KAM/celonis-user-list-data-upload-with-pycelonis-20-260

 

Data in JSON form after sending GET request to that URL:

imageFor manual runs, you've got only author ID, but you can build up table which will hold author-id and email address combinations.

 

Best Regards,

Mateusz Dudek


Reply