I have 10 text fields in my SharePoint list which may contain:
- An email address
- A note of "Email Missing" if an address is expected but not available
I want to send an email to any of the 10 potential columns that have a valid address (scenario 1). If the field contains "Email Missing" or is null, I obviously can't send for that column.
I initially thought I could just use the dynamic content from my SharePoint list in my BCC field (so the recipients can't see the other recipients' addresses) with semicolons between each, but got an error when any of them returned "Email Missing" where it was expecting an email address.
I have cobbled together a clumsy set of conditions to check, for each field, if it's either null or says "Email Missing", and to send only if it's valid, but it's very inefficient by the time I get through all 10, and if I need to later change the content of the email message, I need to update it after every one of these conditions when I send the message.
So, it seems that an array would work, but I haven't used them in Flow. Can anyone help outline how to:
- Set up an array to hold all of the existing email addresses from my 10 text fields (while not including any with "Email Missing" text)
- How to then call the contents of that array to send an email message to those recipients
I am triggering the flow based on when an item or file is modified, so when the user sets the "Action" field to "Ready" and saves the list item, the flow is launched. That part is working fine - I just need help to collect and use the email addresses.