I moved this to a new topic since this doesn’t really have to do with the inline pdf component.
The automation plugin might help, but I don’t know that it has a trigger that will do that.
I think you’ll need a custom plugin or a custom trigger for the automation plugin.