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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / SharePoint GetItems - ...
Power Automate
Answered

SharePoint GetItems - setting the "List Name" value to a variable

(0) ShareShare
ReportReport
Posted on by 56

Hi All,

I have what seems like a rather simple question, but I'm struggling with how to go about it (perhaps a case of overthinking).

In my Cloud Flow, I'm using the SharePoint Get Items action to select files from a SharePoint list and copy them to a different list. 

As part of the Flow, I wanted to take the List Name value from the Get Items inputs and set it to a variable to be used later on (specifically, in an email that's sent out at the tail end). 

If I select "Peek Code" for the Get Items action, I can see what appears to be a fairly basic JSON schema of data wherein the SharePoint List Name value is nested under inputs --> parameters and corresponds to the "table" value ("My SharePoint List Name"). 

Is there a way to parse this data and then store the "table" value in a variable as opposed to parsing the entire array of items that the Get Items action is returning?

{
 "inputs": {
 "host": {
 "connectionName": "shared_sharepointonline",
 "operationId": "GetItems",
 "apiId": "/providers/Microsoft.PowerApps/apis/shared_sharepointonline"
 },
 "parameters": {
 "dataset": "https://mydomain.sharepoint.com/teams/codg/",
 "table": "My SharePoint List Name,
 "$filter": "Originally_Created lt '@{addDays(utcNow(), -210)}'"
 },
 "authentication": {
 "type": "Raw",
 "value": "@json(decodeBase64(triggerOutputs().headers['X-MS-APIM-Tokens']))['$ConnectionKey']"
 }
 },
 "runtimeConfiguration": {
 "paginationPolicy": {
 "minimumItemCount": 680
 }
 },
 "metadata": {
 "operationMetadataId": "4b21e18d-328c-479a-8fda-629f1996b0fd"
 }
}

 

Categories:
I have the same question (0)
  • Verified answer
    grantjenkins Profile Picture
    11,063 Moderator on at

    I'm not sure how to get access to the input JSON, but you could just retrieve the first item and get the List Name from that item. This is assuming you have at least one item returned.

     

    split(first(outputs('Get_items')?['body/value'])?['{Path}'], '/')[1]

     

  • bcanfield83 Profile Picture
    56 on at

    @grantjenkins - thanks! I'll play around with it and see what happens. 😊

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 484

#2
11manish Profile Picture

11manish 282

#3
David_MA Profile Picture

David_MA 280 Super User 2026 Season 1

Last 30 days Overall leaderboard