cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
joeyeamigh
Level: Powered On

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
Super User
Super User

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

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!



Community Support Team
Community Support Team

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

 

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
Level: Powered On

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

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!

joeyeamigh
Level: Powered On

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

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

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 205 members 5,623 guests
Please welcome our newest community members: