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 / Parse Jason output to ...
Power Automate
Answered

Parse Jason output to check if item already exist in SharePoint before creating or updating item

(0) ShareShare
ReportReport
Posted on by 141

I've dug around the internet and I have not found anything clear or working for myself for that matter.

 

I have a SharePoint list of property names called (Winterization List). I email myself a csv and parse JSON it correctly. However, I have no figured out to check the parse JSON output against the Property Name List. I am trying not to produce duplicates of the record if the record is already in the SharePoint list. I've been stuck on this for days trying different results. Any help would be greatly appreciated! Screenshot 2022-10-13 123951.png

Categories:
  • SudeepGhatakNZ Profile Picture
    14,396 Most Valuable Professional on at

    Please elaborate with some examples. I am not sure if I understand your question

     

     

  • Leu0101 Profile Picture
    141 on at

    In short I have a csv report that is emailed and picked up by power automate. It is broken down in Parse JSON. And it's information is created into a SharePoint list. The problem is, that every 24 hours, a new report goes out and it create duplicates of the same record as I currently dont understand how to compare the JSON body against the sharepoint list. I want to check by address name and compare the street address in the Json to the street address in the SharePoint list so I either create a new property address or update the existing.

  • Verified answer
    SudeepGhatakNZ Profile Picture
    14,396 Most Valuable Professional on at

    Are you able to provide your JSON schema?

    Assuming your JSON schema returns the Street Address, you could try

    SudeepGhatakNZ_0-1665695899156.png

    SudeepGhatakNZ_1-1665695964779.png

    SudeepGhatakNZ_2-1665695979937.png

     

     

     

  • Leu0101 Profile Picture
    141 on at
    {
        "type": "array",
        "items": {
            "type": "object",
            "properties": {
                "Street Address 1": {
                    "type": "string"
                },
                "Unit": {},
                "Days Vacant": {},
                "Last Move Out": {},
                "Unit Status\r": {}
            },
            "required": [
                "Street Address 1",
                "Unit",
                "Days Vacant",
                "Last Move Out",
                "Unit Status\r"
            ]
        }
    }
  • Leu0101 Profile Picture
    141 on at

    What happens to be your expression under the condition for length used to count get items?

  • SudeepGhatakNZ Profile Picture
    14,396 Most Valuable Professional on at
    length(outputs('Get_items')?['body/value'])
  • Leu0101 Profile Picture
    141 on at

    When I try in the condition "greater than" 0 it doesn't work to create any records in the sharepoint list. When I try "equal to" it just loops the creations of items for infinity and doesnt stop creating the items.

    Screenshot 2022-10-13 173119.png

  • Leu0101 Profile Picture
    141 on at

    Here you can see the top end code being ran...

    Screenshot 2022-10-13 173716.png

  • Verified answer
    SudeepGhatakNZ Profile Picture
    14,396 Most Valuable Professional on at

    What that means is the filter criteria is not returning any matching results. Check for spaces, upper/lower cases

  • Leu0101 Profile Picture
    141 on at

    Here you can see the property name column as well as how I have it in the filter query and it appears correct.

     

    Screenshot 2022-10-13 174657.pngScreenshot 2022-10-13 174837.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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 425

#2
11manish Profile Picture

11manish 323 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 274

Last 30 days Overall leaderboard