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,

    We are replacing the IMAP Mail Poller with MS Graph Poller by following the documentation: (Using existing tables)

    But we are getting error - 

    96861 - WorkID 239 - execution00 - process 27739 - model 5608 : UnattendedJavaActivityRequest] ERROR com.appiancs.msgraphmail.MSGraphDBHandler - Error writing mail to database
    com.microsoft.sqlserver.jdbc.SQLServerException: Violation of UNIQUE KEY constraint 'UNIQUE_MESSAGE_ID'. Cannot insert duplicate key in object 'dbo.APP_MAIL_POLLER'. The duplicate key value is (<PH0PR08MB75564179B8074406FAF02B2C8C8B9@PH0PR08MB7556.namprd08.prod.outlook.com>).

    Please let us know how to resolve this one? (We already have data in the existing table from IMAP Poller)

    Also we have couple of questions:
    1. Do this plugin picks only Unread emails OR all emails from Inbox?
    2. Is there any batch / count in which it picks the email, we have seen a behavior where while running this sometimes it picks 13 sometimes 20 sometimes 9 messages
    3. Is there any possibility to read only Unread Emails?
    4. If No to Ques 3 then we need to clear our inbox first and then proceed with the implementation, Right?

    Thanks
Comment
  • Hi,

    We are replacing the IMAP Mail Poller with MS Graph Poller by following the documentation: (Using existing tables)

    But we are getting error - 

    96861 - WorkID 239 - execution00 - process 27739 - model 5608 : UnattendedJavaActivityRequest] ERROR com.appiancs.msgraphmail.MSGraphDBHandler - Error writing mail to database
    com.microsoft.sqlserver.jdbc.SQLServerException: Violation of UNIQUE KEY constraint 'UNIQUE_MESSAGE_ID'. Cannot insert duplicate key in object 'dbo.APP_MAIL_POLLER'. The duplicate key value is (<PH0PR08MB75564179B8074406FAF02B2C8C8B9@PH0PR08MB7556.namprd08.prod.outlook.com>).

    Please let us know how to resolve this one? (We already have data in the existing table from IMAP Poller)

    Also we have couple of questions:
    1. Do this plugin picks only Unread emails OR all emails from Inbox?
    2. Is there any batch / count in which it picks the email, we have seen a behavior where while running this sometimes it picks 13 sometimes 20 sometimes 9 messages
    3. Is there any possibility to read only Unread Emails?
    4. If No to Ques 3 then we need to clear our inbox first and then proceed with the implementation, Right?

    Thanks
Children
    1. MS Graph api reads all emails (no option to filter on read status), hence the input in the node to allow the designer to specify which folder to move the emails to.
    2. That is very surprising, there is no batching. It may have something to do with the errors, or potentially timing. It reads a list of emails once and processes those - it does not refresh the list of emails until the next execution.
    3. As explained earlier, constraint from MS.
    4. Yes, you need to move the emails to a different folder. Once the node starts executing, it will move emails to the designated location.