cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
joeyeamigh
Regular Visitor

Check if data is the same, and if not, add it to a file

Hello, I am trying to make a flow to do some very specific tasks. I have a website that POSTs data to FLOW in a JSON format, then parses it. I then want it to check for a few parameters, and if it meets the criteria, it will add data to a table. Let me get more specific. My site posts data in categories "date", "email", "grade", "game", and "points". I want the flow to check the incoming data first to see if someone is cheating on my POST. I want to load the file that everything gets put in, and if there is already an entry for the email on a given date and game, the data will not upload. I also want it to check and see if they are actually submitting on a game day, so I have a third file with the dates of the games, and I want it to throw out anything that isnt submitted on a game day. Thereafter, I want the flow to check with a 4th file if it has passed all of the previous tests, then assosiate the email given with a name, and write it to the first file.

 

I am not neccicarilaly asking for a step by step, but if someone could give me pointers at least, maybe on the connectors and order of steps I need to use, that would be absoulty amazing. Thank you!

4 REPLIES 4
abm
Super User
Super User

Hi @joeyeamigh 

 

Please see my highlighted comments.

 

My site posts data in categories "date", "email", "grade", "game", and "points". I want the flow to check the incoming data first to see if someone is cheating on my POST. I want to load the file that everything gets put in, and if there is already an entry for the email on a given date and game, the data will not upload.

 

Where you planning to store this file? So your primary key for the validation is email, date and game.

You can use the JSON Parser flow step to parse the JSON.

 

I also want it to check and see if they are actually submitting on a game day, so I have a third file with the dates of the games, and I want it to throw out anything that isnt submitted on a game day.

 

What is the indicator for flow to identify whether it is on a game day? Can we use today date? If yes you can use the flow expression function utcNow().

 

Thereafter, I want the flow to check with a 4th file if it has passed all of the previous tests, then assosiate the email given with a name, and write it to the first file.

 

Could you please explain a bit more about write it to the first file. Where it is writing? To a database or this files are kept under Filesystem with format etc?

 

Thanks

 

 

 



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials
v-bacao-msft
Community Support
Community Support

 

Hi @joeyeamigh ,

 

Following abm’s suggestions, I would provide some corresponding links for reference.

For Parse JSON, you can refer to the following blog:

http://johnliu.net/blog/2018/6/a-thesis-on-the-parse-json-action-in-microsoft-flow

For flow expression, you can refer to the WDL function:

https://docs.microsoft.com/en-us/azure/logic-apps/workflow-definition-language-functions-reference

You could try to create a similar Flow based on his suggestions. If you need more assistance, please provide the corresponding error message.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
joeyeamigh
Regular Visitor

Thank you for the response @abm 

 

1. I have this file in OneDrive for Buisness. The JSON just dissipates once parsed, as I capture all of the information.

2. Well, I have a file with all of the games listed in it in the same format as the JSON outputs them, and I want to do if it is between this date and time, and this other date and time, then it will accept responses.

3. All of the files that I mention are in OneDrive for buisness, but I could easily move them to SharePoint if neccicary. What I mean by that is I have a 2 column table with a list of email adresses, and names right next to that. I was wondering if it was possible for flow to see the email address, find it in my table in Excel for Buisness, and then take the name next to the email address and put it into a different file.

4. Also, I have relized this may be easier as a scheduled flow for deleting duplicates. Is it possible to delete duplicates based on more than one parameter, such as if there is a duplicate email, game and date? The issue I am finding is that the date has time in the same string, so I just want it to look at the first part of the date parameter, so that it checks the day but not the exact time yet. Thanks!

@v-bacao-msft This is great documentation. Thank you.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (2,663)