Hi community,
in order to use AdaptiveChoice I trigger a notification with "run command ..." which will trigger another command via button after the user has made a selection.
Custom Command>Notification>Selection>Submit>Custom Command
This works because I know my own chat ID.
But how can I get the chat ID dynamically in the automation script, depending on which user called the command from Teams?
Hi Felix,
We added a new example "Executor Input Example" for custom commands on how you can know who executed it. You can deploy it from the catalog: Custom Command Examples | Catalog (dataminer.services).
I will be adding/documenting the example on github as well in the course of the day: ChatOps-Extensions/CustomCommandExamples at main · SkylineCommunications/ChatOps-Extensions (github.com)
You can already see how it's done if you deploy the example. Feel free to shoot any questions.
Wkr
Hi Jordy, thanks for the quick implementation. It works very well.
Br, Felix
Glad to hear!
For this specific case I found a solution by replaceing chatIntegrationHelper.Teams.TrySendChatNotification whith engine.AddScriptOutput. But it would be nice to know if it is possible in general.