Automatically print email attachments from inbox



"We have an email inbox that we like to monitor for incoming emails. These emails can contain attachments. If they contain PDF attachments, we would like to print these attachments automatically."


  1. Create a new channel with the name "Print PDF attachments from inbox"
  2. Set the schedule to [Periodic scheduling] and set a time interval of 10 minutes.

Note: commercial email providers like Gmail, Hotmail, Outlook tend to use a restriction and only allow a polling interval of 10 minutes to prevent attacks!

  1. For [Input] use [Email] as input type.
  2. Configure the email connection. In our case we use IMAP and complete the connection info (server, port 993. enable SSL/TLS, username and password). Use the connection settings from your system.
    Your configuration might look similar to this one:


  3. Navigate to the [Options] tab and select the folder you want to monitor by clicking [Browse].
    In our case we monitor the INBOX.
  4. For the option [Data to return:] select Only the attachment(s).
  5. Optionally you can select an [Attachment filter]. This allows you to only process certain types of attachments.
    We only want to process emails that have PDF documents attached. By using a regular expression (regex) we filter out files with a pdf extension: (?i).*[.]pdf$

  6. Skip the [Input Filter] and also skip the [Conversion] tab.
  7. For the [Output] select Print in case you want to print the attachments. You can also dump the PDF attachments to a folder by selecting Local\Network as Output Type.
  8. For [Post-Action] we will configure two actions on success:
  1. First mark the email as read.
    (File Processor processes unread emails, so we have to mark them as read, otherwise they will be processed over-and-over again!)
  2. Second, delete the email:

It is a good practice to first mark the email as read and afterwards delete it. Some email servers do not delete emails when they are not first being marked as read.


Only print PDF files?

How can we process only emails with PDF attachments, coming from the email domain ?

This can be done by using an Input Filter.

  1. Go to [Input Filter].
  2. Click the green [Add] button.
  3. Select the option Property for [Filter type:] and click [Add]:
  4. We want to match the From-email address with a regular expression .*[@]$

Note: some email servers will not give you the From-email address but will also prefix the name,
for example (John Peeters) or "John Peeters" <>
For this you will need to test and modify your regular expression.

Gmail has a strict security policy. Make sure you allow Less secure apps for your Google account.

  1. Go to your Google Account ( )
  2. From the menu select Security.
  3. Scroll down to the Less secure app access section.
  4. Turn the setting On.


You should have learned how to process email attachments. By using the attachments filter from the email you can filter out attachments that end with a specific file extension, or that contain specific words or numbers.

The Input Filter works on the complete email, not on the attachments (as an attachment is contained inside an email). Therefor the Input Filter is very suited to filter out specific email accounts. With a regular expression it is easy to filter out only emails coming from specific accounts or domains.

In this example we used IMAP, but Exchange or other email providers could also be used.

See also