How to Send Email to SharePoint Group Using Power Automate - A Step-by-Step Guide

How to Send Email to SharePoint Group Using Power Automate: A Step-by-Step Guide

No comments

Loading

In this “Send Email to SharePoint Group” article, we will learn about how to send email to a SharePoint group automatically using the Power Automate flow step by step. As we know, SharePoint groups don’t have email ID configuration; it is quite challenging to send emails to SharePoint groups using Power Automate flow. Here in this flow, I will show you how to send email to SharePoint Online site groups using Power Automate flow.

Power Automate (formerly Microsoft Flow) is a powerful tool that allows users to automate workflows and integrate with SharePoint, making tasks simpler and more efficient. Sending an email to a SharePoint group using Power Automate is one such task that can enhance collaboration and productivity. In this guide, we’ll walk through the process step by step.

Introduction to Power Automate and SharePoint Groups

Microsoft Power Automate is an automation platform that connects your favourite apps and services, including SharePoint, Outlook, Teams, and more. SharePoint Groups are a way to organize users for easy permission management and collaboration. Automating email notifications to these groups can save time, ensure timely communication, and streamline your business processes.

This guide is tailored to:

  • SharePoint administrators and power users.
  • Professionals seeking automation for group notifications.
  • Individuals new to Power Automate but eager to learn.

What is SharePoint Group?

A SharePoint Group is a collection of users within Microsoft SharePoint that is created to simplify permissions management and facilitate collaboration. These groups are used to control access to SharePoint resources such as sites, lists, libraries, and documents. Instead of assigning permissions to individual users, permissions are assigned to groups, making it easier to manage access for multiple people at once.

Key Features of SharePoint Groups

  1. Centralized Management: Manage permissions for multiple users in one place.
  2. Role-Based Access: Define roles and assign specific permissions like Read, Edit, or Full Control.
  3. Custom Memberships: Add or remove users based on your organization’s needs.
  4. Collaboration-Friendly: Groups help ensure the right people have access to the right content.

Types of Users in SharePoint Groups

SharePoint Groups can include:

  1. Individual Users: People with Microsoft accounts who are part of your organization or external collaborators.
  2. Active Directory Groups: Security groups or distribution lists from your organization’s Active Directory.
  3. Visitors: Users with read-only access.
  4. Members: Users with contribute permissions (can add, edit, and delete content).
  5. Owners: Administrators of the group with full control over permissions and settings.

Default SharePoint Groups

When you create a SharePoint site, some default groups are automatically created to facilitate basic permissions management:

  1. Owners: Full control over the site and its settings.
  2. Members: Edit and contribute permissions.
  3. Visitors: Read-only access to view content.

Why Use SharePoint Groups?

  1. Simplify Permissions Management: Assign permissions to a group once instead of configuring permissions for each individual.
  2. Enhance Security: Ensure only authorized users access sensitive information.
  3. Improve Collaboration: Groups streamline teamwork by ensuring everyone involved has access to the necessary resources.

How to Create a SharePoint Group

  1. Navigate to the SharePoint site.
  2. Click on Settings (gear icon) > Site Permissions.
  3. Select Create Group.
  4. Enter the group name and description.
  5. Assign the appropriate permissions level (e.g., Read, Edit, Full Control).
  6. Add users to the group.

Example of how to create a group in SharePoint Online:

Create group in SharePoint Online
Create group in SharePoint Online

Common Use Cases for SharePoint Groups

  • Project Teams: Provide team members with access to project documents and collaboration tools.
  • Department-Specific Permissions: Assign permissions for HR, Finance, or IT teams based on their specific needs.
  • External Collaborators: Grant external partners or clients temporary access to certain resources.

Benefits of SharePoint Groups

  1. Efficiency: Simplify permissions management for large teams or organizations.
  2. Scalability: Easily adjust group memberships as team compositions change.
  3. Accountability: Use audit logs to monitor access granted through groups.

Limitations of SharePoint Groups

  1. No Email Integration: SharePoint groups don’t have email addresses. To send emails, you need to retrieve individual user emails via Power Automate or other tools.
  2. Basic Management: More complex role-based access control may require integration with Active Directory or Microsoft 365 Groups.

Why Automate Emails to SharePoint Groups?

Sending emails to SharePoint groups manually can be repetitive and error-prone, especially for dynamic, large teams. Automating this process using Power Automate has several benefits:

  1. Efficiency: Automates repetitive tasks.
  2. Consistency: Ensures accurate and timely communication.
  3. Scalability: Handles large groups effortlessly.

Pre-Requisites for Creating the Flow

Before you begin, ensure the following:

  1. Access to Power Automate and SharePoint Online.
  2. A SharePoint group already created with valid members.
  3. Permission to use Power Automate and send emails via Microsoft Outlook or any other integrated email service.

Step-by-Step Guide to Send Emails to SharePoint Groups

Follow these steps to set up your flow.

Step 1: Log in to Power Automate

  1. Go to Power Automate.
  2. Log in with your Microsoft 365 credentials.

Step 2: Create a New Flow

  1. Click on Create in the left-hand menu.
  2. Select Automated Cloud Flow.
  3. Name your flow, e.g., “Notify SharePoint Group via Email.”
  4. Choose a trigger, such as:
    • When an item is created.
    • When a file is uploaded.
    • Manually triggered flow (if you want to control when the flow runs).

Step 3: Set Up the Trigger

For example, if you select “When an item is created”:

  1. Connect to your SharePoint site by adding the URL.
  2. Select the specific list or library you want to monitor.

Step 4: Retrieve Members of the SharePoint Group

Power Automate doesn’t natively send emails to a SharePoint group directly. Instead, you’ll need to retrieve the group’s members.

  1. Add a new HTTP Action:
    • Click New Step and search for “HTTP.”
    • Configure the HTTP action as follows:
      • Method: GET
      • URI:
        https://{yourSharePointSite}/_api/web/sitegroups/getbyname('{Group Name}')/users

      Replace {yourSharePointSite} with your SharePoint site URL and {Group Name} with the group name.

  2. Headers:
    • Add the following headers:
      Accept: application/json;odata=verbose
      Content-Type: application/json;odata=verbose

Step 5: Parse the Group Members

  1. Add a Parse JSON step to handle the HTTP response:
    • Click + New Step and search for “Parse JSON.”
    • Use the output of the HTTP action as the input.
    • Add a JSON schema. Use the Generate from Sample feature by copying a sample output from the HTTP action.

Step 6: Loop Through the Members

Now, you need to loop through the retrieved members and send emails.

  1. Add an Apply to Each action:
    • Use the value from the parsed JSON as the input.
  2. Inside the loop, add an Outlook – Send an Email action (or any email connector):
    • Set the recipient’s email to the Email property from the parsed JSON.
    • Write your email subject and body.

Step 7: Test the Flow

  1. Save your flow.
  2. Trigger it based on your selected event (e.g., create a new item in the SharePoint list).
  3. Check if emails are sent to all group members.

Send email to SharePoint Group demo

This is my demo flow which I ran successfully.

Send email to SharePoint group using Power Automate flow
Send email to SharePoint group using Power Automate flow

Here, I have chosen the trigger as “When an item is created” in SharePoint Online; however, you may use any other trigger that will suit your requirement.

Then, added a “Send an HTTP request to SharePoint” action.

Send email to SharePoint group using Power Automate flow demo
Send email to SharePoint group using Power Automate flow demo

Note:

  • Your group must be added or available in your site groups.

Use the below REST API:

_api/web/siteGroups/getByName('Your SPO Group Name')/users

Then, Add a select operation.

Add a select operation in Power Automate flow
Add a select operation in Power Automate flow

For the “From” I have configured the below:

body('Send_an_HTTP_request_to_SharePoint')?['d']?['results']

For the “Map” I have configured the below:

item()?['Email']

Add a compose action, then configure the below:

join(body('Select'),';')
Join operation in Power Automate flow
Join operation in Power Automate flow

Finally, add a “Send an email” action to send email to all group members. For the “To”, pass the above compose action output as shown below:

Send an email (v2) action in Power Automate
Send an email (v2) action in Power Automate

Test your flow.

Your flow ran successfully in Power Automate
Your flow ran successfully in Power Automate

One of my SharePoint group members, received the below email from Power Automate.

Email sent to SharePoint group using Power Automate flow
Email sent to SharePoint group using Power Automate flow

Send email using SharePoint Utility REST API

We also can send email using SharePoint Utility REST API where pass the below parameters in the “Send an HTTP request to SharePoint”.

  • Site Address: Your site address
  • Method: POST
  • Uri: /_api/SP.Utilities.Utility.SendEmail
  • Headers: See below.
  • Body: See below.
Send email using SharePoint utility REST API
Send email using SharePoint utility REST API

Headers:

{
"accept": "application/json;odata=verbose",
"content-type": "application/json;odata=verbose"
}

Body:

{ 
'properties': { 
'__metadata': { 
'type': 'SP.Utilities.EmailProperties' 
}, 

'To': { 
'results':['User Email ID']
}, 
'Body': '<p>Hello User,<br> 
This is a demo email on how to send email to SharePoint Online site group.<br>
</p>',
'Subject': 'Demo email on how to send email to SharePoint group!' 
} 
}

Notes:

  • In the above example, we can send email without using the send an email action in Power Automate.
  • Instead of an email ID, if you pass your SharePoint group name, it will not throw any errors; even your flow will run successfully, but the email will not be sent. So, it has to be the user’s email, not the group.
  • You can pass more than one user email, as this is an array.
  • Refer to this Microsoft thread about the Retirement of the SharePoint SendEmail API

Example Scenario

Let’s say you manage a SharePoint list called Project Updates. When a new project update is added, you want all members of the Project Team SharePoint group to receive an email notification.

Your flow setup would:

  1. Trigger when a new item is added to the Project Updates list.
  2. Retrieve all members of the Project Team group.
  3. Send an email to each member, notifying them about the new update.

Common Issues and Troubleshooting

  1. Authentication Errors in HTTP Action:
    • Ensure you have proper permissions to access the SharePoint site.
    • Use an authenticated connection in Power Automate.
  2. Group Name Not Found:
    • Double-check the group name in your URI. It must match exactly, including capitalization.
  3. Emails Not Sending:
    • Verify the recipients’ email addresses in the SharePoint group.
    • Check for any throttling limits on your Microsoft 365 tenant.

Advanced Tips

  1. Use Dynamic Content:
    • Personalize emails by including dynamic fields such as the user’s name or the specific item details.
  2. Error Handling:
    • Add a Configure Run After on the email action to handle failures gracefully.
  3. Scheduled Notifications:
    • Instead of triggering on an event, you can schedule the flow to run daily or weekly, sending updates to the group.
  4. Integrate with Microsoft Teams:
    • Send a message to a Teams channel in addition to emailing the SharePoint group.

Benefits of Automating Email Notifications

  1. Improved Team Communication: Ensures all team members are informed about important updates.
  2. Time-Saving: Reduces manual intervention in sending repetitive emails.
  3. Enhanced Workflow Management: Integrates seamlessly with other business processes.

Conclusion: SharePoint Groups and Power Automate

Thus, in this article, we have learnt how to send email to SharePoint group using Power Automate flow.

SharePoint Groups are an essential tool for managing access and fostering collaboration in a SharePoint environment. They provide a structured way to assign and manage permissions while ensuring scalability and security.

Automating the process of sending emails to SharePoint groups using Power Automate can transform your workflow. With the step-by-step guide provided here, you can set up a robust system that enhances communication, saves time, and ensures your team stays on top of important updates.

Start using Power Automate today to unlock the potential of SharePoint automation. With a little practice, you’ll master this tool and discover countless ways to simplify your daily tasks.

FAQs About SharePoint Groups

  1. What is the difference between a SharePoint Group and a Microsoft 365 Group?
    • SharePoint Groups are used only within SharePoint to manage site permissions. Microsoft 365 Groups integrate across the Microsoft ecosystem, including Teams, Outlook, and Planner, providing more collaborative tools.
  2. Can I assign permissions to multiple SharePoint Groups at once?
    • No, permissions must be assigned individually to each SharePoint Group. However, you can combine SharePoint Groups with Active Directory Groups to streamline permissions management.
  3. Can external users be added to SharePoint Groups?
    • Yes, external users can be added if the SharePoint site allows external sharing. However, their access is limited to what you permit on the site or specific resources.
  4. How do I remove a user from a SharePoint Group?
    • Go to Site Settings > Site Permissions, select the group, find the user you want to remove, and delete their entry. Changes take effect immediately.
  5. Are SharePoint Groups site-specific?
    • Yes, SharePoint Groups are specific to the site they are created in and cannot be reused across different SharePoint sites. For broader access control, use Active Directory or Microsoft 365 Groups.
  6. Can SharePoint Groups have nested groups?
    • SharePoint does not support nested SharePoint Groups. However, you can include Active Directory Groups within SharePoint Groups to mimic nested group functionality.
  7. What happens if a user is in multiple SharePoint Groups with different permission levels?
    • SharePoint applies the most permissive level of access. For example, if one group grants “Read” and another grants “Edit,” the user will have “Edit” permissions.
  8. Can SharePoint Groups be used for workflows or automation?
    • SharePoint Groups cannot directly trigger workflows. However, with tools like Power Automate, you can retrieve group members and use them in automation scenarios.
  9. How do I find out who is in a SharePoint Group?
    • Go to Site Permissions and click on the group name. A list of members will be displayed, showing their names and emails.
  10. What is the maximum number of members a SharePoint Group can have?
    • While SharePoint Groups don’t have a strict member limit, performance issues may arise if a group contains thousands of members. For large-scale scenarios, consider using Active Directory or Microsoft 365 Groups for better scalability.
  11.  Can I send emails to multiple SharePoint groups in one flow?
    Yes, you can repeat the HTTP action and Apply to Each loop for multiple groups.
  12.  Are there any limitations on the number of emails I can send?
    Microsoft enforces email sending limits per user and per flow to prevent abuse. Review your tenant’s quotas.
  13.  Can I use other email services with Power Automate?
    Yes, Power Automate supports various email connectors, including Gmail and third-party services.

About Post Author


Discover more from Global SharePoint

Subscribe to get the latest posts sent to your email.

Do you have a better solution or question on this topic? Please leave a comment