MSGraph Email Poller

Overview

Need to poll emails from your Exchange server? This smart service can be used in a poller process and extract the data from the Microsoft Exchange server. Messages are stored in the Appian Document System, as well as the attachments. Meta data is stored in a database table for further processing.

This plug-in provides an alternative to sending emails to an Appian process model when inbound email integration is requested. Instead of the email being forwarded to Appian, this plug-in reads the emails directly from the Exchange mailbox using the MS Graph API as described below:

  • Reads the mailbox using the MS Graph API
  • Convert the email to an EML file stored as an Appian document; Item attachments (calendar invites, messages) are kept in the eml file, File attachments removed from it and stored separately in the document management system.
  • Store all email file attachments as separate Appian documents
  • Store all email metadata (subject, author, recipients, etc...) into a set of tables in the database

Key Features & Functionality

All information how to deploy, configure and use the smart service is in the 'MS Graph Mail Poller.pdf' document in the downloaded zip. Extract the files in the ZIP and follow the instructions in the document.

Anonymous
Parents
  • Hi, I have two questions related to this plugin.
    The first one is, what exactly is the function of the Message Batch Size input node. I thought it was the maximum number of emails it could read but I am seeing that it is not and I would like to know exactly what it implies.

    The second is, we have an application running with this plugin and it is redirecting emails to the Junk folder when it should not be, any possible explanation

  • Hi dnat4,

    The messageBatchSize defines how many messages will be loaded from the server at once. Typically, you want this to be the number of messages that you can process within your timeLimit. However, if the timeLimit happens before you have processed the number in the batch, it will stop processing and leave the messages in the inbox for the next run.

    If you have messages in the Junk folder, it means some issue happened (e.g. database errors). Check the tomcat-stdOut.log to see the root cause of these errors.

Comment
  • Hi dnat4,

    The messageBatchSize defines how many messages will be loaded from the server at once. Typically, you want this to be the number of messages that you can process within your timeLimit. However, if the timeLimit happens before you have processed the number in the batch, it will stop processing and leave the messages in the inbox for the next run.

    If you have messages in the Junk folder, it means some issue happened (e.g. database errors). Check the tomcat-stdOut.log to see the root cause of these errors.

Children
  • The batch size only indicates the size of batches used internally to load messages. As long as there are more messages and the timeLimit is not hit, the next batch will be loaded. The reason a batch size was introduces is because we have seen sorting/paging in O365 is not always perfect and for some use cases this helps overcoming the issue. The recommendation is to set it to the number of messages you expect to load in the timeLimit given, unless you have a long timeLimit. The more messages you have in a batch, the more memory the plugin requires.

  • Hi Raymond, first of all thanks for the answer.
    My doubt comes because sometimes the component has read more messages than those set in the messageBatchSize (10 in my case) so the 10 messages have entered within the timeLimit and I do not understand why it keeps reading if supposedly 10 is the limit to process.
    That is to mean, I have had 25 emails in the inbox, a MessageBatchSize with 10 elements and I have processed 15
    items. Another example, 21 emails in the inbox, where the Mail Poller has read 11 emails.
    This makes me think that the MessageBatchSize may imply the maximum number of emails left unprocessed, since it only reads more emails than 10 when I have had more than twice as many messages in the inbox than the MessageBatchSize. In these cases it has processed emails until leaving 10 in the inbox unread as in the previous cases I mention.
    If you know anything about this, I would appreciate a reply.
    Thanks!