cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
simonexcel
Level: Powered On

Flow sending 2 emails when creating an item in a SharePoint list

I am new to Flow so just getting to grips with it. I have a new SharePoint list and I need to send an email whenever an item is modified or created. Therefore, I set 2 flows using 'when an existing item is modified' and 'when a new item is created'. I didn't realise that 'when an existing items is modified' also triggers when an item is created. However, if I just leave the 'modified' flow activated and disable the 'creation' flow, it doesn't send an email when I create an item. If I then edit the newly created item, I then get both emails to say an item has been created and modified. How can I get it to just send 1 email upon each action - creation and modification? I've added a screenshot showing my 2 flows.

image.pngimage.png

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Flow sending 2 emails when creating an item in a SharePoint list

Hi @simonexcel 

 

The error states Get Item dynamic content is not available

Make sure the data you are sending in the email usign dynamic content is coming from the action above it

 

send an email 2 - should inlcude data from get item 2

send an email 3 - from get item 3

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

10 REPLIES 10
Super User
Super User

Re: Flow sending 2 emails when creating an item in a SharePoint list

Hi @simonexcel 

 

There is a trigger called "When an item is created or modified" which will run for both cases

That will help ensure you do not need multiple Flows

 

Also, if within the flow you need to know if this flow got triggered for item created or updated

 

If created date is same as modified date then item created else modified

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

simonexcel
Level: Powered On

Re: Flow sending 2 emails when creating an item in a SharePoint list

Hi @RezaDorrani 

 

Thanks for your reply. I actually noticed just before your reply that there was this option. I changed the trigger to that and I have the same problem as before - it doesn't send an email on creation and only sends an email upon modification.

 

Also, where (and how) would I add this: "If created date is same as modified date then item created else modified"?

 

Thanks!

Super User
Super User

Re: Flow sending 2 emails when creating an item in a SharePoint list

Hi @simonexcel 

 

add a condition action

 

and use Created is equal to Modified

 

Capture.PNG

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

simonexcel
Level: Powered On

Re: Flow sending 2 emails when creating an item in a SharePoint list

Hi @RezaDorrani 

Appreciate your help. I made the changes you suggested and ran into the opposite problem - emails were sent when being created but not when being modified.

Therefore, I made the below changes but I'm getting the error shown at the top. Do you have any suggestions, please?

 

image.png

Super User
Super User

Re: Flow sending 2 emails when creating an item in a SharePoint list

Hi @simonexcel 

 

The error states Get Item dynamic content is not available

Make sure the data you are sending in the email usign dynamic content is coming from the action above it

 

send an email 2 - should inlcude data from get item 2

send an email 3 - from get item 3

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

simonexcel
Level: Powered On

Re: Flow sending 2 emails when creating an item in a SharePoint list

Thank you @RezaDorrani, that's working (even if it takes a while for the emails to send).

Is it possible to have the emails sent from the SharePoint site itself rather than using the send as permissions on a mailbox?

Super User
Super User

Re: Flow sending 2 emails when creating an item in a SharePoint list

Hi @simonexcel 

 

You are using Flow to send emails when an item is added or updated

 

When you sent from SharePoint I am assuming you do not want to use Flow, in that case your only option would be to set alerts on the sharepoint list

simonexcel
Level: Powered On

Re: Flow sending 2 emails when creating an item in a SharePoint list

@RezaDorrani - understood. The problem I have is that I want this flow to run for everyone in my department. I've set the flow up under my account and so all the connections are using my account. Is this standard or is there a way for me to do this for a department?

 

Thanks again for your help and prompt responses.

Super User
Super User

Re: Flow sending 2 emails when creating an item in a SharePoint list

Hi @simonexcel 

 

Flow runs under the context of the connection accounts used

Since your account is connected it will send email from your account

 

There is also an action to send emails from a shared mailbox

 

simonexcel
Level: Powered On

Re: Flow sending 2 emails when creating an item in a SharePoint list

@RezaDorrani Thank you for all your help, I've got it working as I need it to.

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020.

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 63 members 3,488 guests
Please welcome our newest community members: