question

ChristopherMuir-5587 avatar image
0 Votes"
ChristopherMuir-5587 asked ConstanceRivera00-4301 commented

dynamically select team channel to post message to in power automate condition

I am trying to set up a flow that posts a message to a particular channel when a form is filled out. The form will specify the channel to post and I want to specify the channel dynamically. I can get it to work if I hard code the channel id, but I want it to post to different channels depending on values in the form.

The image below shows the control. The "Channel id" should be chosen based on a value in the form, the value is the name of the channel, but that will throw an error. Is there a way to dynamically select a channel id here? Is there a specific format or an internal specification or string?

Thanks

59440-channeldynamic.png


office-teams-windows-itprowindows-forms
channeldynamic.png (19.1 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I think this will help you maroon , I had a similar problem and a dude from the university advised, we wrote codes and it really helped out


0 Votes 0 ·
JimmyYang-MSFT avatar image
0 Votes"
JimmyYang-MSFT answered JimmyYang-MSFT edited

Hi @ChristopherMuir-5587

You can try to enter Custom Values in the 'Post a message in a chat or channel' and pass your dynamic values. The following picture shows the result for your reference:

60114-25.png


If you don’t know how to get the Channel ID, you can get Teams address in your Teams and channel ID can be seen it. For example:

URL:
https://teams.microsoft.com/l/channel/19*%3a3151da3802ea43cd8701a6faf4215978%40*thread.skype/testi?groupId=a4c77160-21b4-4169-a683-5362475cf123&tenantId=1ffaf751-2c9b-46b8-a71b-845cf8b15f69

Just replace the parts marked strong(%3a, %40) with " : " and " @ " you get a valid channel-ID:

19:3151da3802ea43cd8701a6faf4215978@thread.skype


If the response is helpful, please click "Accept Answer" and upvote it.

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.





25.png (54.5 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

ChristopherMuir-5587 avatar image
0 Votes"
ChristopherMuir-5587 answered

Thank You. Is there is a documentation reference for this?

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

JordanBurcherJones-7856 avatar image
0 Votes"
JordanBurcherJones-7856 answered

Hi @ChristopherMuir-5587 ,

To do this dynamically, you could also get a list of available chats using "List group chats". Then look for the chat topic you want to send to and use the chat ID associated with it.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.