web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How to Get related Sha...
Power Automate
Unanswered

How to Get related SharePoint site for Plan

(0) ShareShare
ReportReport
Posted on by 2

In General I try to build flow that would enable attache email attachments to planner task by sending email with specific task link.

 

But at some point I need to find sharepoint site adres related to plan to show where files will be stored. I want to be some how generic for all groups .

 

I have plan Id, Task Id 

 

 

Categories:
I have the same question (0)
  • Expiscornovus Profile Picture
    33,195 Most Valuable Professional on at

    Hi @Bocian83,

     

    You can use the Group Id to find the webUrl of your related site. Elio Struyf has a nice blog about this approach:

    https://www.eliostruyf.com/get-the-sharepoint-site-behind-an-office-365-group-via-the-microsoft-graph/

     

    Below is an example

    This example is using a Send an HTTP request V2 action of the Office 365 Groups connector.

     

    https://graph.microsoft.com/v1.0/groups/@{actions('Create_a_task')['inputs']['parameters']['body/groupId']}/sites/root?$select=webUrl

     

    weburl_group.png

     

  • Bocian83 Profile Picture
    2 on at

    Thank you.

     

    But how to get related plan group id.

    As I said I have plan id and task id.

     

    From This I need to find share point site where task attachments are stored.

     

     

     

  • Expiscornovus Profile Picture
    33,195 Most Valuable Professional on at

    Hi @Bocian83

     

    In my example I reused the group selected in the create a task action via an expression.

     

    Which action are you using which is returning the plan Id and task id values? Can you share a screenshot of your flow setup. This way I can change my example for your setup.

  • Bocian1 Profile Picture
    4 on at

    Thank you Expiscornovus 

     

    I use link to task,as a base for the flow
    From link i get task Id, then i get Plan Id 

     

    In general i use flow  (https://www.youtube.com/watch?v=42U1r9hpCFM)

    This flow gets share point site for planner manualy, but i have many groups and plans 

    I hope it will make it clear

    Get Plan details and List plan for groups i took for testing

    Flow 1.png

    Flow 2.png

  • Expiscornovus Profile Picture
    33,195 Most Valuable Professional on at

    Hi @Bocian1,

     

    In that case you can for example use a list groups. With an OData Filter you can even find the specific group in that action. That action should output the correct group and its id.

     

    Below is an updated example

     

    1. List Groups with filter on displayName property

    displayName eq 'SPO Task Linking'

     

    2. URI which used the id of the first returned group

    https://graph.microsoft.com/v1.0/groups/@{first(outputs('List_groups')['body']['value'])['id']}/sites/root?$select=webUrl

     

    groupid_listgroups.png

     

     

  • Bocian1 Profile Picture
    4 on at

    Thank you Expiscornovus

     

    I did manage to get share point site by 

    Puting in Lists Groups filter 'CAM Genaral' not 

    'SPO Task Linking'

    and the i managed to get propoer adres

    But my question is still bit diferent 
    Can i get Grup Id / Group Name  from related 'Plan id' or 'Task Id'

     

    In my structure there are many groups and plans 

  • Expiscornovus Profile Picture
    33,195 Most Valuable Professional on at

    Hi @Bocian1,

     

    The filtering was just to demonstrate how you could retrieve group ids via List Groups action. You can still use the same approach, only you would to have to slightly change the setup. You can remove the filter and loop through your groups to check if they have any related plans.

     

    If that is the case you can retrieve the related site. Each group will have its own site.

     

    Below is an example.

    You could even amend the Condition to add a new row find the matching plan id, if you want. The below example only checks if it has any plans at all via a length function.

    length(outputs('List_plans_for_a_group')?['body/value'])

     

     

    applytoeach_group.png

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard