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

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

Send an Email with multiple Document Links corresponding to SharePoint List Items

(0) ShareShare
ReportReport
Posted on by

Hi:  this issue is in regards to sending an email that includes multiple links to documents in a secure SharePoint List - without sending a link to the actual SharePoint List.

I have a secure SharePoint and SharePoint List that is accessible to our Payroll Dept only.  Within this list will be all employees and some pertinent information regarding their anniversary dates and multiple document links:  for performance evaluations (a new blank one & the one from their last anniversary), plus a document link for a wage increase.  I can't be sending links to the SharePoint List since I can't allow multiple managers to see documents pertaining to employees outside their department.

I have the below flow setup to run daily, checking for a date that serves as the manager's 30-day notice (30-days prior to the employee's anniversary date), and if it meets that criteria, an email is sent to the manager which should include 3 document links from SharePoint columns (blank evaluation form, prior completed evaluation form, and wage increase form)

The flow runs correctly, except I can't figure out how to insert links to the documents in the SharePoint list via the email.  The managers do not have access to the SharePoint site or list, so I cannot send them a straight link to the SP List.  I need to be able to email them the 3 document links that are in the SP List.

Overview of FlowOverview of Flow


Here is an expansion of the Send an Email portion of the flow:
Email expansionEmail expansion

Here's the Send an Email expanded, but with the background coding showing.  In the yellow highlights below, I was hoping to be able to choose and insert the Dynamic Content from my SharePoint List that corresponds to each document I want to attach.  I must be missing a precursor step to be able to access this dynamic content.

Employee Performance Flow - Send an Email code detail.JPG

 

Here's a pic of the SP List, which shows the columns of linked documents that I hope to dynamically pull into the email.
Employee Performance Flow - SP List.JPG

I have the same question (0)
  • ChristianAbata Profile Picture
    8,949 Most Valuable Professional on at
    Re: Send an Email with multiple Document Links corresponding to SharePoint List Items

    excellent @Anonymous  what you need is to use varibales to do that see this example and replace my office 365 action per your get items action

     

    variables.PNG

     

    So you can get all the items in one variable and then split it to use it one by one in each href link that you need

  • Community Power Platform Member Profile Picture
    on at
    Re: Send an Email with multiple Document Links corresponding to SharePoint List Items

    @ChristianAbata, I'm sorry, I don't follow your instructional statement ("... replace your office 365 action per my get items action"?) and have some questions regarding your images.  


    1)  Where would the "initialize variable" step need to be added, given my flow above?  If I insert it just after my Get Items step, it automatically inserts it as an Apply to Each.
    2)  I'm not using Planner, so I'm not sure your Apply to Each output would apply to me.  Is mine fine to keep as SharePoint "value"?
    3)  What purpose would the Get User Profile step serve in my flow?
    4)  Where would the Append to String Variable and Compose steps need to be inserted into my flow?

    5)  Would my Send an Email step come right after the Compose?

     

    Apologies if your response was very straight-forward (which it may be to some more experienced users), but these variable Power Automate actions are not very intuitive.

     

    Thanks in advance for the additional guidance.

     

    -KMattern

  • ChristianAbata Profile Picture
    8,949 Most Valuable Professional on at
    Re: Send an Email with multiple Document Links corresponding to SharePoint List Items

    @Anonymous  don't worry friend

     

    1)  Where would the "initialize variable" step need to be added, given my flow above?  If I insert it just after my Get Items step, it automatically inserts it as an Apply to Each.

    You need to add the initialize variable before get items and live it empty as my example 
    2)  I'm not using Planner, so I'm not sure your Apply to Each output would apply to me.  Is mine fine to keep as SharePoint "value"?
    ok, please after get items add a compose value with a value of some column, this will create you an apply to each and then after compose add append variable
    3)  What purpose would the Get User Profile step serve in my flow?

    Nothing, my example saves all the vales in given name in one variable, it was just an example
    4)  Where would the Append to String Variable and Compose steps need to be inserted into my flow?

    I told you in the step 2

    5)  Would my Send an Email step come right after the Compose?

    yes but, please add your send email outside apply to each and use the variable output instead columns sharepoint output to see the result.

  • Community Power Platform Member Profile Picture
    on at
    Re: Send an Email with multiple Document Links corresponding to SharePoint List Items

    @ChristianAbata , thank you!  With your help, I was able to get it working - just a couple final questions.  Below is an image of my new flow (with 3 sets of variable initialize/compose/append/output since I have 3 linked documents in my SP List).  

     

    a)  Is there any way to move the variable steps to after my Condition, which identifies just the employees with an upcoming anniversary?  Otherwise, as is, it appears I'm asking flow to initialize/compose/append the variables for every single list item before checking to see if I even need it to do anything with that row of information.  My fear is that once I have more than 100 employees setup in the list, the flow will take forever to run each day.

    b)  In general, would there have been another way to simplify this flow, or is it necessary to do the initialize/compose/append/output variable steps separately for every single link in a SharePoint List column if I want to include direct links to them in an email?

     

    Here is the new flow:

    Employee Performance Flow - update with working links.JPG

  • ChristianAbata Profile Picture
    8,949 Most Valuable Professional on at
    Re: Send an Email with multiple Document Links corresponding to SharePoint List Items

    excellent @Anonymous  I'm happy to read that, please don;t forget to mark as solution to guide others, a like could be great too 😉

     

    a)  Is there any way to move the variable steps to after my Condition, which identifies just the employees with an upcoming anniversary?  Otherwise, as is, it appears I'm asking flow to initialize/compose/append the variables for every single list item before checking to see if I even need it to do anything with that row of information.  My fear is that once I have more than 100 employees setup in the list, the flow will take forever to run each day.

    Don't worry about the numbers, PA could be great thinks and this could be also pedends on the license you have, if you have premium license the runs are more wickly

     

    b)  In general, would there have been another way to simplify this flow, or is it necessary to do the initialize/compose/append/output variable steps separately for every single link in a SharePoint List column if I want to include direct links to them in an email?

    mmmm coulbe but the way I recommend you could be the best, you can ask for more help maeby you can get other responses 😉

  • Community Power Platform Member Profile Picture
    on at
    Re: Send an Email with multiple Document Links corresponding to SharePoint List Items

    Update:  I thought this flow was working properly, which it did for the 1st item in my SharePoint List...  however, subsequent items in the SP List (with different document links) are emailing the 1st item's document links. 

    Still need help to get the flow to pull the unique document links for the unique items in the list if the condition applies.  Below is the current flow.  I'm thinking the order of the items might be the issue?

    Employee Performance Flow - update with working links.JPG

  • Community Power Platform Member Profile Picture
    on at
    Re: Send an Email with multiple Document Links corresponding to SharePoint List Items

    @ChristianAbata, would you happen to know the fix for the issue above?  Your steps worked with the 1st email and its attachments, but the 2nd item in the list sends its attachments, plus the attachments for the 1st item.

     

    -KMattern

  • ChristianAbata Profile Picture
    8,949 Most Valuable Professional on at
    Re: Send an Email with multiple Document Links corresponding to SharePoint List Items

    hi @Anonymous  I recomned you to open a new topic and mark this as your first part solution, this other situation could help to other user is necessary to see it in another topic. 

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 614 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 401 Moderator

#3
chiaraalina Profile Picture

chiaraalina 282

Last 30 days Overall leaderboard