Using Microsoft Power Automate - Include a link in an email to document(s) in a SharePoint document library

sharepoint.stackexchange https://sharepoint.stackexchange.com/questions/285670

Pergunta

I have the following list and document library in the same SharePoint site:

SharePoint List (Policy Inventory):

Sharepoint List

SharePoint Document Library (Policy-Working-Documents): Sharepoint Document Library

My current flow filters for items in the list with a review date that is +120 days from today, then it gets the files from the document library sub-folder named Test-Folder.

I am really struggling with the following:

  1. Filtering the Get Files output so as to keep only the files with a Name that is also contained in the output of Get Items?

  2. Send an Outlook email that contains the documents from #1 as an attachment or link. The body of the email should include the Document Name and Review Date which are provided in the Policy Inventory list.

My current flow:

enter image description here

Troubleshooting

Current Flow:

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here Note that ReviewDocs Body is available in the Dynamic Content for the Apply to each - ReviewItem, but I selected the Body from PolicyReview120 as instructed. After doing this, I am unable to select the Body from ReviewDocs in the From field in the Filter array

Foi útil?

Solução

Here are the steps that can be used to fulfil the requirements:

  1. Get [Policy Inventory] Items with a Filter Query, as currently you're doing

  2. Create JSON object from the output from step 1

  3. Get all Documents' Properties from [Policy-Working-Documents]/Test-Folder. Filter Query can be applied if a meta data field is available in the library

  4. Create Document property JSON object collection from the output from step 3

  5. Loop through all the list items in the collection in step 2

  6. While looping through, Filter the Review Docs collection in step 4

  7. Add [Select] action to Select properties to be included in the email

  8. Add [Apply to each] after [Select] and construct an email to send.

Please see the screenshots showing the Flow Steps

enter image description here

Detail 1

enter image description here

Detail 1.1

enter image description here

Sample of email sent- can be further customized

enter image description here

List and Library data used to TEST enter image description here

enter image description here

Further Enhancement

The document under review can be attached to the email by retrieving the content of the file by adding [Get file content] before sending emails. This requires [File Identifier] which is already included in the [Get Files (properties] action output. This Property need to be added to the [Select] action and then can be used in the [Apply to each] action below it.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a sharepoint.stackexchange
scroll top