Hello everyone! I have been using Flow lately and have really been liking it. I have a problem though and was hoping for some help. I have a less advanced workaround for now, but ideally this is how I think it *should* work to be effective. I am new to SharePoint and Flow, so I apologize if I use any incorrect lingo.
I have a reference SharePoint item list with email addressess of people responsible for certain countries and it is on the level of the individual country. Each item/row contains an email and a country as seen below. This is going to be a master list which undergoes changes and will be sortable with different views for the "responsible person", region, email etc.... This cannot be stored within flow, since people not familiar with flow will be managing the list.
Country List SharePoint 1
Column "Email" is a person/group column and contains the emails of people in the company network.
So i am having trouble with getting the Flow to do two things.
First, go through the "Email" list and pull all unique emails into an array This array will be used for two purposes. First, it will send out an email to all email addresses whenever the flow is triggered (telling them I need something from them). The second thing is it will create an item on a Second Sharepoint, which is focused on the email recipient. One item per email address, like this (I apolgize that the data doesn't overlap):
SharePoint 2 - By Email Recipient
To be clear, I only need help getting the unique email addresses into the array. The flow is already set up to email from the array and create items on the second SharePoint site.
The second thing I am having trouble with is having the countries associated with an email address get pulled into one SharePoint field (Like Latin America in the second screenshot). It is important that these countries are pulled at the time the flow is triggered so its also a snapshot in time of the countries the email address is reponsible for. In the event that a particular email address picks up responsibility for other countries for a period of time, this will capture that. This second SharePoint site will basically allow the person in charge of the email address to indicate that they did their job for the countries they are responsible for (in that last column). The SharePoint list item will be created based on the values in the array above (the email addresses), and then pull all countries from the first SharePoint. Perhaps this could be done by adding items into a variable using IF statements? Such as create an item from the first object in the array, and then for each row in the first SharePoint if the email matches the object in the array, put the value (the country) into a string array? Then repeat with object 2 etc... I have about 40 email addresses and only 10 or so have multiple countries.
If this second part isn't possible, I will still be greatful if anyone can still help with the first. Please inquire if I left anything out. I'm open to all suggestions! Thank you very much ahead of time!
-Ryan