web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How to add a tab to a ...
Power Automate
Answered

How to add a tab to a specific channel (MS Teams) using power automate

(0) ShareShare
ReportReport
Posted on by 517

Hi All,

 

I'm using this link (https://www.c-sharpcorner.com/article/adding-power-app-to-teams-tab-using-power-automate/) from Siddharth Vaghasia. This article is about adding a tab (in this case Power App app as a tab) to MS Teams using Power Automate. It works perfectly. The channel is created and the tab is added to the created channel BUT also to any existing channel. I understand that this is caused by using "Apply to each" and I want to make a filter to only add the tab to the last created channel. Does anyone have an idea?


Actually it looks like this :

dkayt_1-1697720091141.png

 

Please ignore the Last added Channel compose.

 

Thank you,

Olivier

Categories:
  • Nived_Nambiar Profile Picture
    18,138 Super User 2026 Season 1 on at

    Hi @dkayt 

     

    if you want to add tab for one single channel, there is no need of using Apply to Each which loops through each channel which create the tab for each then, To avoid that, Place the output of compose action Last added channel  instead of Channel ID dynamic content which is used in api url endpoint. Also after that place the http request action outside the loop, i.e next to the compose action Last added channel. 

    Nived_Nambiar_1-1697726859546.png

     

    Also change the expression which is written in Last added channel  compose action. 

    The expression should be like this : last(outputs('List_channels_2')?['body/value'])?['id']

     

     

    Thanks & Regards,

    Nived N 🚀

    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel

    🔍 Found my answer helpful? Please consider marking it as the solution!
    Your appreciation keeps me motivated. Thank you! 🙌

  • dkayt Profile Picture
    517 on at

    Hi @Nived_Nambiar 

    Thanks for replying.

    Unfortunately, it doesn't take the ID of the last channel created, but the ID of the last channel in the list, which in this case is the "General" channel (the first channel that appears when you create a new team).

     

    Is there something like LastCreated() function or a workaround?

     

    Thanks and Regards, dKayt

  • Verified answer
    Nived_Nambiar Profile Picture
    18,138 Super User 2026 Season 1 on at

    Hi @dkayt 

     

    Sorry i thought that channel list array will follow a particular order, if not there is a alternative way to do it. See below

     

    Sort the channel list array in ascending order using createdDateTime property and then take last value out of it and finally its ID. This way you can get the latest channel created's ID

     

    Use below expression in compose action

    last(sort(outputs('List_channels_2')?['body/value'],'createdDateTime'))?['id']

     

    Hope it helps !

    Thanks & Regards,

    Nived N 🚀

    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel

    🔍 Found my answer helpful? Please consider marking it as the solution!
    Your appreciation keeps me motivated. Thank you! 🙌

     

     

  • dkayt Profile Picture
    517 on at

    Hey @Nived_Nambiar 

    Thank you very much. It works now.

    Have a nice week.

    Regards, dKayt

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 315 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 267

#3
Henil Profile Picture

Henil 115

Last 30 days Overall leaderboard