Following the documentation, it seems I can only import to top level folders? Unless I'm missing something, here's my script:

tell application "EagleFiler"
    tell library document 1
        set {year:y, month:m, day:d, time string:t} to (current date)
        set theArchive to "/FastMail/Archives/" & y
        set theFolder to library record theArchive of root folder
        import files {_emlPath} source URL _sourceURL container theFolder tag names {"Archived Emails"} with deleting afterwards
    end tell
end tell
The desired behavior is to have this email added to FastMail/Archives/{CURRENTYEAR}, bonus points if it can create that folder if it doesn't exist. But currently I get an error that the library record doesn't exist (it does), so I must be holding it wrong.

Any help is appreciated!