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

Send Email to Group based on Forms Respondent Email

Hi all

 

I am facing the following issue and I have no idea how to solve it. If you have any idea, please be specific since I am relatively new to Flow.

 

  1. I have a Survey based on Forms where our employees report things (it is a company survey, the emails of the respondents are automatically saved) --> this is my trigger
  2. I want to send emails to the whole team of the employee who sent the forms response. E.g. Team A has member one@email.com, two@email.com etc. and Team B has ten@email.com, eleven@email.com etc. and I have many many teams like this.
    If two@email.com submits a form response, the whole Team A incl. one@email.com gets an email. 
    If ten@email.com subtmis a form response, the whole Team B incl. eleven@email.com gets an email etc. etc.

I have an excel file (on sharepoint) which is used for the mapping --> each employee email is mapped to a team (e.g. Team A, Team B etc.).

 

What I struggle with is to read all members out of this excel based on the Forms employee email and sent the email to them.

 

Any help is really appreciated. Thanks in advance!

 

Cheers

Goashu

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Super User
Super User

Re: Send Email to Group based on Forms Respondent Email

@goashu 

Here is an example that may help you.

To accomplish your goal, I used two List rows in a table actions, both with OData filters.

The first retrieves just the respondent so that I can get the team.

The second gets all team members.

I assume that you want one email,so I append all email addresses to a string with a semicolon in between.

The other variable stores the content from one question - use a variable for each question that you want to reference in the email.

 

FormsEmail1.jpgFormsEmail2.jpgFormsEmail3.jpgFormsEmail4.jpg

 

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

View solution in original post

Community Support Team
Community Support Team

Re: Send Email to Group based on Forms Respondent Email

 

Hi @goashu ,

 

Please add a semicolon after the value of Append to string variable.

 

Best Regards,

Community Support Team _ Barry
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

14 REPLIES 14
Super User
Super User

Re: Send Email to Group based on Forms Respondent Email

@goashu 

Can you post a screen shot of your Excel table?

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott
goashu
Level: Powered On

Re: Send Email to Group based on Forms Respondent Email

@ScottShearer 

 

The excel list could look like this but its not final, just an example:

 

team-table.PNG

Highlighted
Super User
Super User

Re: Send Email to Group based on Forms Respondent Email

@goashu 

Here is an example that may help you.

To accomplish your goal, I used two List rows in a table actions, both with OData filters.

The first retrieves just the respondent so that I can get the team.

The second gets all team members.

I assume that you want one email,so I append all email addresses to a string with a semicolon in between.

The other variable stores the content from one question - use a variable for each question that you want to reference in the email.

 

FormsEmail1.jpgFormsEmail2.jpgFormsEmail3.jpgFormsEmail4.jpg

 

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

View solution in original post

goashu
Level: Powered On

Re: Send Email to Group based on Forms Respondent Email

@ScottShearer 

 

Thanks a lot!

 

It sound like what I need. I will test it this week at work and report back if it worked.

 

Thanks!!

goashu
Level: Powered On

Re: Send Email to Group based on Forms Respondent Email

@ScottShearer 

 

I tried to follow your steps but faced some issues I didn't know to solve yet.

 

Until here, everything worked well I guess:

 

flow1.png

 

I am not sure what to enter in the Table field (market red). I entered the worksheet name.

 

Next, I am missing any Excel Column in the Filter Query field? I need to add the Team Column right? How can I add/connect the Excel on the Sharepoint?

 

flow2.png

 

Same issue here:

flow3.png

 

And finally: how can I add the "Select an output from previous steps" with the Excel "value" ?

 

Sorry for all the questions but I am close to finishing this flow (I hope!) Smiley Happy

 

 

 

Community Support Team
Community Support Team

Re: Send Email to Group based on Forms Respondent Email

 

Hi @goashu ,

 

The premise of using List rows present in a table action is that the table has been defined in the specified Excel file, and the corresponding fields are created in it.

Then you can select the corresponding table directly from the drop-down list in the Table field.

For connecting the Excel file stored in SharePoint, you can directly select the corresponding SharePoint site in the Location.

Like:

18.PNG

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
goashu
Level: Powered On

Re: Send Email to Group based on Forms Respondent Email

 @ScottShearer 

 

Thanks @v-bacao-msft - it really was the Table in Excel. Its now fixed and I could rebuild the Flow 1:1.

 

Unfortunately it is not running correctly. Please check this error message:

 


flow4.png

 

There seems to be a problem getting an output but I am not able to fix it.

 

Any suggestions?

 

 

Thanks a lot, you both have been a huge help so far!

Community Support Team
Community Support Team

Re: Send Email to Group based on Forms Respondent Email

 

Hi @goashu ,

 

Could you please provide a detailed configuration in Filter Query?

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
goashu
Level: Powered On

Re: Send Email to Group based on Forms Respondent Email

Hi @v-bacao-msft

 

I am not sure I understand. In Filter Query is Responders'Email from Forms like in the picture in my previous post.

 

This is the details error message:

 

{
  "status": 400,
  "message": "Syntax error at position 26 in 'daniel.email@email.com'.\r\n     inner exception: Syntax error at position 26 in 'daniel.email@email.com'.\r\nclientRequestId: 599de654-a324-47c4-8c53-d308e8f234cf",
  "source": "excelonline-eus2.azconn-eus2.p.azurewebsites.net"
}
 
image.png
 
Does this help or what information do you need?
 
Community Support Team
Community Support Team

Re: Send Email to Group based on Forms Respondent Email

 

Hi @goashu ,

 

Please check this blog and get more details about Filter Query:

https://veenstra.me.uk/2018/11/12/microsoft-flow-filter-queries-in-sharepoint-get-items/

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
goashu
Level: Powered On

Re: Send Email to Group based on Forms Respondent Email

Hi @v-bacao-msft 

 

Thank a lot, this helped. I figured it out with the Filter Query and it works not except the last step, sending the Email.

 

I got a BadRequest. --> "One or more recipients are invalid."

  1. It shows (or gets?) only one email address (the one that submitted the Forms) and not the other in the team and example excel file (there are only 2 addresses and 1 team in the excel file).
  2. The recipients seem to repeat but without semicolon, maybe thats the error?

 

image (1).png

 

I am very close!!! Smiley Happy

Community Support Team
Community Support Team

Re: Send Email to Group based on Forms Respondent Email

 

Hi @goashu ,

 

Please add a semicolon after the value of Append to string variable.

 

Best Regards,

Community Support Team _ Barry
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

Super User
Super User

Re: Send Email to Group based on Forms Respondent Email

@goashu 

As has been mentioned by @v-bacao-msft , you need to create a table in Excel and your data needs to be inside of the table.  Also, as shown in my example, you need to place a semicolon after each email address when appending to the string.

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott
goashu
Level: Powered On

Re: Send Email to Group based on Forms Respondent Email

Thank you @ScottShearer & @v-bacao-msft ! You are the best!

 

With your help, my flow now works perfectly! I even added some tasks and conditional branching.

 

 

Last question: What if someone who is not in the email list submits the Forms? No email will be sent right?

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: 104 members 3,141 guests
Please welcome our newest community members: