I'm trying to have a flow send an email to certain people based off entries in my SP list. I have a SP lists that has the emails of the people I want to send the email to but I'm having trouble sending the email. I have variables for each email but the To line of the email has the email repeating. Any help would be appreciated, thank you.
Solved! Go to Solution.
Assuming your List looks similar to the following with two columns of type Single line of text, each one with a single email address.
I'm not sure what your trigger is, but I've just used Get item to get the list item above and adding each of the email fields into my Send an email, separated by a semi-colon.
I'm not sure if this works, but you can try this method.
- Compose the "To" recipients and paste the Output of the compose in the to field
- Either with the expression concat(...)
- use separator ";"
or
- Initiate a variable (String) with recipients
- List items
- Append to string variable with for each result (also with separator ";").
- Paste final outcome of variable in the "To" Field of the mail.
How are the emails stored in your SharePoint List? Is it coming from a Person field with multiple entries, a text field with the emails, etc.?
They are stored as a text field with the email but I have two emails that I need from the same line to send the email to.
How are they separated? By a semi-colon, on a new line? And is it a single line text field?
They are two separate columns on the same line in a single line of text field.
Assuming your List looks similar to the following with two columns of type Single line of text, each one with a single email address.
I'm not sure what your trigger is, but I've just used Get item to get the list item above and adding each of the email fields into my Send an email, separated by a semi-colon.
When I do that this is what happens and when I test the flow I get this.
The 'inputs.parameters' of workflow operation 'Send_an_email_(V2)' of type 'OpenApiConnection' is not valid. Error details: Input parameter 'emailMessage/To' is required to be of type 'String/email'.
I'm still learning about flows. Am I doing something wrong?
Are you able to show a screenshot of your actual list that contains the emails to see how they're entered?
I didn't see that there was a "Get Item', I was using the 'Get Items' but your previous post was correct.