I reformatted your script. I think it will work better if you use Edit ‣ Paste and Match Style and then format it with:
```applescript
Your script here
```
Otherwise the forum will insert **
markup for the bold keywords, which doesn’t work inside Markdown code blocks.
I think the error -1728 is a weird AppleScript issue where you have to create the POSIX file
outside of the tell
block so that it sends this command to the system rather than to EagleFiler.
Secondly, the:
set _folderName to "Documents/Employment-Dave"
wont’t work because the name as to be a single level. If you want two levels you would need another variable.
Something like this should work better:
on hazelProcessFile(_file, _inputAttributes)
-- Get the folder name that you set in Hazel
-- "Documents/Employment-Dave"
-- set _folderName to item 1 of _inputAttributes
set _parentFolderName to "Documents"
set _folderName to "Employment-Dave"
-- Change these to the library that you want to use
set _libraryName to "Paperless-Library_local.eflibrary"
set _libraryFolder to "/Users/dbartholomew/Documents/Paperless-Library_local"
-- /Users/dbartholomew/Documents/Paperless-Library_local/Paperless-Library_local.eflibrary
set _libraryPath to "/Users/dbartholomew/Documents/Paperless-Library_local/Paperless-Library_local.eflibrary"
-- set _libraryPath to _libraryFolder & _libraryName
set _libraryFile to POSIX file _libraryPath
tell application "EagleFiler"
open _libraryFile
tell library document _libraryName
set _folderRecord to library record _folderName of library record _parentFolderName of root folder
set {_record} to import files {_file} container _folderRecord
end tell
end tell
end hazelProcessFile