Forum Discussion
Create distribution list from a SharePoint list
Loubnielsen Couple years late to the party, but since I was looking for roughly the same answer I figured I'd chime in, in case someone else was looking for my solution.
- Create an empty Outlook Group "examplegroup@test.com"
- Created a MS Flow with a "When an Item is created" trigger. Link to the SharePoint that the list resides
- "Add member to group"
-Group Id: "examplegroup@test.com"
-A user AAD ID for the user to **bleep** to a team: Title
Note: I changed the name of the title column to Email. Otherwise it might be something like Name Email. Play with the Dynamic content options till you find the right variable.
Now I just use the group email as the distro.
P.S. I made a second Flow to remove someone. It's almost identical except for instead of "Add member to group" its "Remove member from group"
P.P.S. pro tip: since the distro is being stored in an Outlook group instead of SharePoint list, I find it best to also have an action to "Delete item" at the end of the flow so there isn't an option to double up on anything when triggering the flow.
- ViccyJan 13, 2023Copper Contributor
HaneyTrevor I am using your instructions for creating a flow to add to a distribution list. You said at the end of your instructions you also add a "delete" command. Can you explain why? Thank you!
- HaneyTrevorJan 13, 2023Copper Contributor
Viccy I made the second flow to remove people from the SharePoint list out for two main reasons. First, and easiest, is that SharePoint lists have a maximum of (I think) 500 items. The distro list I was working with is over 2000. The second reason is more of a cleaner programming logic. Person A signs up to the distro, they get added to the SharePoint list, no problem. Person B signs up to the distro, they get added to the distro; Person A shouldn't be added to the distro a second time, but they're on the SharePoint list so maybe(?). Now lets expand further and assume there's Person A, Person B, Person C, and Person D on the "add to distro" SharePoint list. Person C no longer wants to be in the distro list, MS Flow removes them from the distro. Note: Person C is still on the "add to distro" SharePoint list. Now, if, Person E wants to be added to the distro, MS flow might add Person C back into the distro.
All the explanation to say you probably don't need the delete functionality, but it's a best practice to have it. Hope that helps and explains things.
- ViccyJan 13, 2023Copper Contributor
HaneyTrevor That makes sense. So, what I am doing is I have one list of people getting added and deleted. In that case, I don't need a delete function, correct?
- jeffmcnameeMar 15, 2024Copper ContributorWould this work to keep a contact group *updated*? In short, here's what I have:
- SharePoint list column (Person or Group) that allows multiple entries
- Outlook Contact Group
I want to refresh the Contact Group from the names in the list column on a daily basis. I know how to work Power Automate/Workflows in Teams. Is there a quick and easy way to do this?