cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
New Member

New file in sharepoint, add file in teams message

Hi all,

 

I am currently using a one drive folder structure as a document library at work due to the advantage of having the familiar file explorer layout. This one drive is linked to a team site in sharepoint which has been created from a teams channel. I am trying to make a flow for when a file is added into the folder within one drive (linked to sharepoint), post a message in the teams channel of the location of the file and add the file as an attachment in the message. However my flow fails as the 'file content' in my teams message does not work and cannot add the file in the message. I would also like to add the location of the file in onedrive (file explorer) in the teams message if that is possible.

 

This is my first flow so am a bit lost! Please ask for more info if needed.

 

Many thanks

3 REPLIES 3
Highlighted
Super User II
Super User II

Re: New file in sharepoint, add file in teams message

Hello @scott_l 

Just a recommendation... OneDrive is linked to a personal account, so the idea is to store documents of a specific user. On the other way, SharePoint document libraries are focused on sharing documents between the members of the team. In SharePoint document libraries you can use the file explorer layout too.

In any case, could you share a screenshot of your flow and the error you are receiving?

Regards,

Ferran

Did I answer your question? Please consider to mark my post as a solution to help others.
Proud to be a Flownaut!
Highlighted
New Member

Re: New file in sharepoint, add file in teams message

Hi @fchopo ,

 

Thanks for the reply. As far as Im aware, if all users sync the teams channel sharepoint site on their computer, everyone can see and make changes to the files under that onedrive? If possible we would like to keep using file explorer  whilst having these automated messages.

 

Below is the flow and the error, not much to it but the 'file  content' does not want to work.

 

Flow.PNGError.PNG

 

Many thanks

Highlighted
Super User II
Super User II

Re: New file in sharepoint, add file in teams message

Hello @scott_l 

You should place two SharePoint actions before posting the message in Teams. Have a look at this sample:

flow.png

 

1) When a new file is created or modified.

2) Get the file Metadata to get the file ID.

3) With the file ID, get the file Properties.

4) Post the message in teams, using the "Link To Item" value (we got it in the previous step).

 

Hope it helps!

Ferran

Did I answer your question? Please consider to mark my post as a solution to help others.
Proud to be a Flownaut!

Helpful resources

Announcements
Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Upcoming Events

Experience what’s next for Power Automate

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Top Solution Authors
Top Kudoed Authors
Users online (4,762)