Send an email when a new item is created in a SharePoint list
Using Power Automate, you can easily automate day-to-day tasks or build repetitive tasks in SharePoint that help you stay productive.
In this tutorial, you will create a flow that sends an email when a new item is added in a SharePoint list.
Before proceeding with these instructions, make sure your SharePoint site is set up with the required lists and libraries.
Create a flow
In your SharePoint site, browse to the Projects list.
To create and manage flows for a list or a library, from the command bar, on the list or library page, select Integrate > Power Automate. Selecting Power Automate expands to show you more options:
- Create a flow
- See your flows
- Configure flows
If they are available for the list or library here, you may see other options on the Automate menu, such as Set a reminder and other flows.
Select Create a flow. In the Create a flow panel, you can explore various templates available for your list.
Select the template that reads:
Send a customized email when a new SharePoint list item is added.
On a new browser tab, the Power Automate website appears and displays:
- Template information
- Name and description of the template.
- Connection information
- Various services this flow connect to.
- The credentials those services will use to connect to.
- Template information
Using the dropdowns, verify the connection information (SharePoint Site Address and SharePoint List Name) is accurate to ensure it uses your credentials.
A green checkmark icon indicates a connection to the service was succesfully made using your credentials.
To create the flow, select Create Flow. Any connections that require a connection are also attempted during this step. After you successfully create the flow, the flow details page appears where you can edit and modify the flow, if needed.
In this case, this flow that sends an email when new items are added to the list is now active, and runs whenever new items are added to the Projects list in the specified SharePoint site.
Click Edit in the top command bar to edit the flow in the flow designer.
To expand and view the configured properties, select the When the new item is created trigger. Note the input configured to the SharePoint site address and list name from where you created the flow.
In the Send Email action, to expand the action, select Edit. All the input is filled in with dynamic values from the Get my profile and When the new item is created actions.
Hover over the dynamic values to see what properties they reference. For example, hovering over Email shows that the property is read from the Mail property in Get my profile.
To save the flow, select Save.
Test your flow
To test your flow, either add a new item in SharePoint list by adding a new item, or initiate the test run directly from the flow designer. To test the flow from the designer, follow these steps. Testing the flow from the designer helps you to quickly see the flow run as the flow is executed.
In the flow designer, on the top command bar, select Test.
In the Test Flow panel, select I'll perform the trigger action, and then select Save & Test.
A message appears instructing you to add a new list item to the SharePoint list you selected.
You should have the browser tab with the Projects list opened already. If not, open a new browser tab, and browse to the Projects list.
Do not close the flow designer. Make sure you keep the flow designer browser tab open.
In the Projects list, on the command bar, select New, and add the following items, and then select Save:
- Title: Project 4
- Owner: Select a user from people picker
Switch to the flow designer tab. The flow run history appears. If all of your actions were executed successfully, a green checkmark icon appears aside every action.
Select the action to see the inputs and outputs used in the flow run. This is also a good place to see the actual values translated from those dynamic content properties used in that action.
As a result of this flow, you receive an email regarding the new project information.
Modify your flow
In the flow designer, to edit your flow, select Edit.
Select the Send Email action.
In the Body input, after the Name dynamic property, append the following string:
While you are still editing the Body input, note the dynamic content list that appears aside the action.
In the dynamic content list, select values from the actions in your flow, (for example, in the When the new item is created trigger, the project owner information is available.
To add the owner information, in the dynamic content list, in the search box, search for owner.
In the results, select Owner DisplayName. As you can see, it also displays other information, such as email, job title, picture and more. Because the Owner is a person column in SharePoint, SharePoint passes along the person details as individual properties to the flow.
The modified Body input appears like this with the included Owner info.
To test the flow, repeat these steps.
You receive an email with the updated owner information in it.
Congratulations on creating your first flow!
In the next topic, we will use the same flow, and add the ability to interact with Microsoft Teams.