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 / SharePoint - Get listI...
Power Automate
Unanswered

SharePoint - Get listId from trigger

(0) ShareShare
ReportReport
Posted on by 15

Looking to see if it's possible to get the listID from a trigger action for 'new item created' or 'new item created/modified'.

 

Reason - using http requests, i'd rather hit the list by ID vs list name to prevent the flow from breaking in the event someone  changes the list name.  And, trying to remove one step of me having to manually enter the ID 😀

 

Screen Shot 2020-08-28 at 2.01.04 PM.png

Categories:
I have the same question (0)
  • damooji Profile Picture
    15 on at

    OK - So I think I'm close to finding one method of getting the ID....just need to extract from a string of text! Basically, first created a var w/expression:

    triggerOutputs()?['body']

      From here, I saw there is 'Link' that contains the full URL, along with the ListID, etc.  So, updated the expression to the following:

    triggerOutputs()?['body/{Link}']

    Output would be something like this:

    "https://sharepoint.com/sites/contoso/_layouts/15/listform.aspx?PageType=4&ListId=44c372cf-e53d-405c-95cc-b1f34c1447ca&ID=3&ContentTypeID=0x01007C25FFA01CF12B479995A3.....",

     

    Figured I can just extract the ListID from this string..but I'm struggling!

    I tried 

    last(split(first(split(triggerOutputs()?['body/{Link}'],'ca&')),'&ListID='))

    This trims off the end which is fine, but not the front part...still end up w/the https....

  • damooji Profile Picture
    15 on at

    Disregard the issue above this post - it works. May not be the best or only approach for this but it works!

     

    last(split(first(split(triggerOutputs()?['body/{Link}'],'ca&')),'ListId='))

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 519 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 296 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard