Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
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  

  • Dossary007 Profile Picture
    13 on at
    Re: Easy but dificult

    Thank you I had a mistake in the move file action

  • Dossary007 Profile Picture
    13 on at
    Re: Easy but dificult

    Dossary007_0-1701120118887.png

     

  • Dossary007 Profile Picture
    13 on at
    Re: Easy but dificult

    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

     

  • Verified answer
    Caspar_Rubin Profile Picture
    830 on at
    Re: Easy but dificult

    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

     

     

     

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard >