Just as @Tom_Kiwi suggested it should be doable with an shortcut, if you have an Apple Script that works with notes it should be possible to modify the script to get the output from it, but then remove the parts that sends it to apple notes. So I think you could just add an apple script action, paste the script to the shortcut, and then use the output of the script to create a note in Agenda with the attached pdf.
Not sure if you could use the “Add New Note” action for this in shortcut, or if it has to be done with the X-callback-url function (have a look at the documentation for this here: X-callback-url Support and Reference), but either way it should be doable.