Can automator pass to Filemaker?

I’m trying to make an folder action that when a PDF is deposited into the folder it will pass the name of the file (whatever.pdf) to filemaker to import this into a new record.

First, I tried the Automator end of this. I initially tried to change the name of the PDF to a generic name (FMP_Import.pdf) and then trigger the filemaker script to import that. It did not work consistently. Each time it only worked the first time I dropped a file on the folder but additional times it would not rename the file.

Then I tried to copy the file to another folder as a backup and then rename. Still problems but with multiple copies of the additional files not renamed.

I’m spending hours automating something that should be simple, sort of counterproductive as to what Automator is supposed to do.

Any ideas before I trash Automator?