Introduction
- In this article, we will go through the steps of sending emails based on information stored in the SharePoint list. This could be useful for sending emails to users on the following scenarios
- when a particular task is finished
- particular action got an error.
- The advantage here is there is no need to hardcode the values in flow variables. All the information is dynamically gathered during the run time. Let’s check the steps on how to get this done.
Sending emails based on information stored in SharePoint list
- Below are the steps needed to achieve to send email to dynamic users based out of information stored in SharePoint lists. At first we will configure SharePoint ‘Admins’ list according to below screen capture.
- Title – default column of type ‘Single line of text’
- DisplayName – to show the display name of the admin of type ‘Person or Group’
- OptForNotification – is a ‘Yes/No’ check box field with default value configured to No. This column is used to enable or disable email notifications to be sent without touching flow design.
Step 1
Go to URL https://flow.microsoft.com with your org account credentials and then select ‘New Flow’ and then select ‘Instant cloud flow’
Step 2
Configure the flow name and trigger. Here I have chosen manually trigger a flow or simplicity ane named it is ‘SendEmailDynamically’.
Step 3
- Initialize variable ‘arrayEmail’ of type ‘String’.
Step 4
- Get the items from the SharePoint list using the ‘Get items’ action.
- Please note that ‘Filter Query’ is defined to get the only items that have the ‘OptForNotification’ option selected to ‘Yes’ in the SharePoint list.
Step 5
- For each value got from the ‘Get Items’ action select Email and then append to the array variable. Please refer to below screen capture for reference.
Step 6
- Configure the email action according to below screen capture
Step 7
- And Next save and Test
- Your flow ran successfully.
For any Help or Queries Contact us on info@crmonce.com or +918096556344