Hi,
I'm trying to use the "When a new channel message is added" trigger that works on a specified team sire and channel. When a message is added, the flow takes certain message values and creates a sharepoint item with them. That works fine. However, I'd like to also include the team name or ID and channel name or ID in the sharepoint item. The standard options in the flow don't include either, so I think I need to use an expression to return them. I have tried the following without success:
Solved! Go to Solution.
Hi @DanielS1 ,
Please try to use following expression to get Team ID and Channel ID.
Team ID:
first(split(last(split(triggerBody()['webUrl'],'groupId=')),'&tenantId'))
Channel ID:
replace(replace(last(split(first(split(triggerBody()['webUrl'],concat('/',triggerBody()?['etag']))),'message/')),'%3A',':'),'%40','@')
Best Regards,
Hi @DanielS1 ,
Please try to use following expression to get Team ID and Channel ID.
Team ID:
first(split(last(split(triggerBody()['webUrl'],'groupId=')),'&tenantId'))
Channel ID:
replace(replace(last(split(first(split(triggerBody()['webUrl'],concat('/',triggerBody()?['etag']))),'message/')),'%3A',':'),'%40','@')
Best Regards,
Thanks for the responses, both. This is perfect!
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!
User | Count |
---|---|
41 | |
37 | |
34 | |
33 | |
30 |
User | Count |
---|---|
46 | |
36 | |
33 | |
25 | |
24 |