Skip to main content

Notifications

Power Automate - Building Flows
Unanswered

Correlate files to permission groups in SharePoint

Like (0) ShareShare
ReportReport
Posted on 14 Jan 2025 12:36:20 by 351
Hi guys!
 
What I am looking for is when I have tons of files, relation them to groups so when I want to send a mail, adding the group it sends to all the people in that group. Ones in "to" and others in "CC".
 
Example: I want to send a Transmittal note with 4 files. So what i created was a template mail that looks like this. This creates an item with all of the info inside and the files attached. Later, creates a folder in a library with them attachments. Finally, I want to send a mail but dont know what to add or how to do it to create those groupes and be able to send it to different people.
The flow looks like this
Then the other flow which sends the mail is this one:
How should I do it? What I have to change?
 
Thanks!
  • David_MA Profile Picture
    David_MA 8,219 on 14 Jan 2025 at 14:22:25
    Correlate files to permission groups in SharePoint
    I am sorry, but unfortunately your second post doesn't clear things up for me. You need to explain the logic for how the people are determined as to who should be listed in to and cc fields and how it relates to what you are doing. Therefore, I can only give you this as an example.
     
    I have solutions for our Legal department where various forms are submitted for a variety of services offered by the Legal department (contract reviews, lease negotiations, trademark requests, etc.). When the request comes in, an e-mail needs to be sent to the attorneys. On the SharePoint site where the requests are submitted, a SharePoint group has been created, and all of the attorneys are members of the group. The following gets the members of the attorneys' group in order to send the e-mail:
     
     
    Some notes:
    • You can get the ID of the group used in the HTTP request by opening the group on the SharePoint site. The group ID is listed at the end of the URL.
    • It is hard to see in the screen shot, but the character after the e-mail value in the append to string action is a semicolon (;).
    • The scheme for the parse JSON action is:
      {
          "type": "object",
          "properties": {
              "d": {
                  "type": "object",
                  "properties": {
                      "results": {
                          "type": "array",
                          "items": {
                              "type": "object",
                              "properties": {
                                  "__metadata": {
                                      "type": "object",
                                      "properties": {
                                          "id": {
                                              "type": "string"
                                          },
                                          "uri": {
                                              "type": "string"
                                          },
                                          "type": {
                                              "type": "string"
                                          }
                                      }
                                  },
                                  "Alerts": {
                                      "type": "object",
                                      "properties": {
                                          "__deferred": {
                                              "type": "object",
                                              "properties": {
                                                  "uri": {
                                                      "type": "string"
                                                  }
                                              }
                                          }
                                      }
                                  },
                                  "Groups": {
                                      "type": "object",
                                      "properties": {
                                          "__deferred": {
                                              "type": "object",
                                              "properties": {
                                                  "uri": {
                                                      "type": "string"
                                                  }
                                              }
                                          }
                                      }
                                  },
                                  "Id": {
                                      "type": "integer"
                                  },
                                  "IsHiddenInUI": {
                                      "type": "boolean"
                                  },
                                  "LoginName": {
                                      "type": "string"
                                  },
                                  "Title": {
                                      "type": "string"
                                  },
                                  "PrincipalType": {
                                      "type": "integer"
                                  },
                                  "Email": {
                                      "type": "string"
                                  },
                                  "Expiration": {
                                      "type": "string"
                                  },
                                  "IsEmailAuthenticationGuestUser": {
                                      "type": "boolean"
                                  },
                                  "IsShareByEmailGuestUser": {
                                      "type": "boolean"
                                  },
                                  "IsSiteAdmin": {
                                      "type": "boolean"
                                  },
                                  "UserId": {
                                      "type": "object",
                                      "properties": {
                                          "__metadata": {
                                              "type": "object",
                                              "properties": {
                                                  "type": {
                                                      "type": "string"
                                                  }
                                              }
                                          },
                                          "NameId": {
                                              "type": "string"
                                          },
                                          "NameIdIssuer": {
                                              "type": "string"
                                          }
                                      }
                                  },
                                  "UserPrincipalName": {
                                      "type": "string"
                                  }
                              },
                              "required": [
                                  "__metadata",
                                  "Alerts",
                                  "Groups",
                                  "Id",
                                  "IsHiddenInUI",
                                  "LoginName",
                                  "Title",
                                  "PrincipalType",
                                  "Email",
                                  "Expiration",
                                  "IsEmailAuthenticationGuestUser",
                                  "IsShareByEmailGuestUser",
                                  "IsSiteAdmin",
                                  "UserId",
                                  "UserPrincipalName"
                              ]
                          }
                      }
                  }
              }
          }
      }
    Hopefully this will assist with what you are trying to do.
  • CarlesMartin Profile Picture
    CarlesMartin 351 on 14 Jan 2025 at 13:49:34
    Correlate files to permission groups in SharePoint
    Hi @David_MA, in the last picture where it appears send an email, I would like to appear in "to" the row I have in the mail template "to", the same in "CC". But not only a person (could be) but also a group of people.
  • David_MA Profile Picture
    David_MA 8,219 on 14 Jan 2025 at 13:31:03
    Correlate files to permission groups in SharePoint
    I don’t quite understand what you’re trying to achieve. It might be helpful to have someone at your workplace review your post to see if they can help clarify your goals for someone who isn’t familiar with your specific process.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

End of Year Newsletter…

End of Year Community Newsletter…

Tuesday Tip #12 Start your Super User…

Welcome to a brand new series, Tuesday Tips…

Tuesday Tip #11 New Opportunities…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 144,609

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,420

Leaderboard
Loading started