How to not create a new element if it's already created in the data base and feed information to in when User inputs it

I want to create a workflow in which a user fills a report regarding one of my websites, i already have a data type “Website” which inside has a list of “Reports”. The Report data type has a field “URL” that i want to match to the Website’s field URL.

So the workflow has to look at the database and find to which Website the newly created report is to be uploaded and, if it doesn’t find the Website the user has input, would create a new Website element with the report inside.

Any ideas?

I know URL variations will carry issues to this workflow (Abuse creation of redundant website elements…) but i will solve that issue later, however if anyone knows how to do this too would be reallly helpful :smile: