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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Automate
Answered

Easy but dificult

(0) ShareShare
ReportReport
Posted on by 13

I am glad to join Power Automate community. 

Dossary007_0-1700727510823.png

 

 

 

 

in the past three weeks, I was trying to create a cloud flow and this flow will be as follow.

 

for every single channel post created and its replies, if there is an attachment. 

 

in SharePoint those all attachment in that post should be in one single folder that will have the same name as the subject of the post.

 

for Example 

 

Channel posted and reply 

Dossary007_1-1700727511395.png

 

 

In SharePoint this is what happened

Dossary007_2-1700727511416.png

 

 

what I want your help with is for this to happen and this is what I want. 

 

Dossary007_3-1700727511414.png

 

 

Dossary007_4-1700727511315.png

 

 

 

 

 

please if my explanations is not understood let me know, so i can try to explain it more clearly.

 

sincerely, 

 

Dossary007  

Categories:
I have the same question (0)
  • Verified answer
    Caspar_Rubin Profile Picture
    831 on at

    Hey

     

    As you mentioned, I just want to clarify that files added to posts are automatically uploaded to the corresponding SharePoint Folder of the relevant Teams Channel. Therefore, files posted to the General Channel in Teams are automatically hosted at '/Shared Documents/General' in SharePoint.

     

    This means, we simply need to create a folder with the Title of the post and then move the file(s) in there.

     

    That can be done like this:

    Caspar_Rubin_0-1701007035316.png

     

    Breakdown of the actions:

     

    Condition:

    Caspar_Rubin_2-1701007167978.png

    Condition expression:

    Caspar_Rubin_3-1701007210215.png

    length(item()?['attachments'])

     


    Create new folder action:

    Caspar_Rubin_1-1701007106796.png

     

     

    Apply to each action:

    Caspar_Rubin_4-1701007262680.png

     

    Move file action:

    Caspar_Rubin_5-1701007326917.png

    Move file "File to Move" dynamic content:

    Caspar_Rubin_8-1701007541946.png

     

    /Shared Documents/General/@{item()?['name']}

     

    Move file "Destination Folder" dynamic conte:

    Caspar_Rubin_7-1701007510510.png

     

    Let's test it:

     

    Post in Teams:

    Caspar_Rubin_9-1701007627180.png

     

    SharePoint: 

    Caspar_Rubin_10-1701007691251.png

     

    Successful Flow:

    Caspar_Rubin_12-1701007796282.png

     

     

     

    Here's the full flow in the classic designer because i hate the new one:

    Caspar_Rubin_13-1701007840370.png

     

     

    Cheers

     

     

     

  • Dossary007 Profile Picture
    13 on at

    Dear Caspar_Rubin,

     

    thank you for the clear and great explanation. However, I am having an error not sure where, but we are almost there. 🙂

     

     

    I am not sure where my mistake at, but I'll share it all. 

     

    full flow 

    Dossary007_1-1701077465927.png

    for each

    Dossary007_2-1701077616015.png

     

    Condition 

    Dossary007_3-1701077695219.png

     

  • Dossary007 Profile Picture
    13 on at

    Dossary007_0-1701120118887.png

     

  • Dossary007 Profile Picture
    13 on at

    Thank you I had a mistake in the move file action

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard