Searching if a folder matches a file name

Dear Community,
I have brain fog and am struggling with a workflow I would like to build - I can't even work out how to ask the question.
The process is:
I scan a patients notes on my phone and call it "Joe Bloggs ppp" . This is transferred to dropbox via the cloud. ppp is my 'code' to get hazel to move the file and create a subfolder "Joe Bloggs".
That works well, but when i upload another file "Joe Bloggs" the next day, i get a dropbox unicode error.
SO i need to now have a workflow that looks to see if the folder "joe Bloggs" already exists from before and then puts the file into that folder.
I just can't seem to find a way ( perhaps its really obvious) to search through a series of folder names based on my filename and then put the file into it if there is a match.
I hope this makes sense?
Greatly appreciate any pointers as to what method to use.
Magnus
I have brain fog and am struggling with a workflow I would like to build - I can't even work out how to ask the question.
The process is:
I scan a patients notes on my phone and call it "Joe Bloggs ppp" . This is transferred to dropbox via the cloud. ppp is my 'code' to get hazel to move the file and create a subfolder "Joe Bloggs".
That works well, but when i upload another file "Joe Bloggs" the next day, i get a dropbox unicode error.
SO i need to now have a workflow that looks to see if the folder "joe Bloggs" already exists from before and then puts the file into that folder.
I just can't seem to find a way ( perhaps its really obvious) to search through a series of folder names based on my filename and then put the file into it if there is a match.
I hope this makes sense?
Greatly appreciate any pointers as to what method to use.
Magnus