I need to read invoices from an email account for an unattended process.

I need each PDF in the email to be treated as a document and if blank pages exist in the PDF to separate those into individual documents.

How can I do this?