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 / Getting the EntityId a...
Power Automate
Unanswered

Getting the EntityId and ContentUrl of Sharepoint File Created

(1) ShareShare
ReportReport
Posted on by 2

I'm trying to set up a flow to export a pdf from Power BI and upload the file to a teams group. 
After the file is uploaded, I would like to create a tab in the channel of the group linking to the pdf file. 
Is there a way for me to retrieve the EntityId and ContentUrl dynamically from the file I just created? 

 

andycylin_1-1719986320844.png

 

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

    Hi @andycylin,

     

    Not sure if the Send a Microsoft Graph HTTP request action actually allows the creation of tabs, since that is a 3rd segment type of action. That action only allows 2 segments.

     

    Construct a Microsoft Graph REST API request to invoke against the Microsoft Team endpoints. These segments are supported: 1st segment: /teams, /me, /users 2nd segment: channels, chats, installedApps, messages, pinnedMessages.

     

    Reference to the doc: https://learn.microsoft.com/en-us/connectors/teams/?tabs=text1#actions

     

    For the payload you should be able to use the uniqueId of the file, the site collection address and the path properties. Below is example in a HTTP action.

     

    1. The uniqueId value is retrieved via a separate HTTP request. That approach can also be found on my blog:

    https://www.expiscornovus.com/2023/05/04/get-uniqueid-of-file/

     

    _api/web/lists/getbytitle('TestLibrary')/items(@{outputs('Create_file')?['body/ItemId']})/FieldValuesAsText?$select=UniqueId

     

    2. The payload used in the HTTP request is the below. It uses expression referring to the Create File and Send an HTTP request to SharePoint actions.

     

    {
     "displayName": "@{outputs('Create_file')?['body/Name']}",
     "teamsApp@odata.bind" : "https://graph.microsoft.com/v1.0/appCatalogs/teamsApps/com.microsoft.teamspace.tab.file.staticviewer.pdf",
     "configuration": {
     "entityId": "@{outputs('Send_an_HTTP_request_to_SharePoint')?['body']['uniqueId']}",
     "contentUrl": "@{actions('Create_file')['inputs']['parameters']['dataset']}@{outputs('Create_file')?['body/Path']}",
     "websiteUrl": null,
     "removeUrl": null
     }
    }

     

    uniqueid_pathandsiteaddress.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 523 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 406 Moderator

#3
abm abm Profile Picture

abm abm 245 Most Valuable Professional

Last 30 days Overall leaderboard