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(including digitally signed emails) using the MS Graph API
  • Convert the email to an EML file stored as an Appian document, with attachments removed from it
  • Store all email 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
  • v2.2.3 Release Notes
    • Updated version of jsoup library to prevent StackOverflorError when parsing densely nested HTML
    • Updated database scripts
    • Please note that if you're upgrading from pre 2.2.1, there are two new fields included in those scripts that must be added to your DB tables
  • Hello.  We upgraded to the v2.2.2 version and are receiving the following message when the poller runs: There was an error when processing email(s) in monitored email inbox with following error message in [name of app] :(conn=7686054) Unknown column 'BODY_SWAPPED_IMAGES' in 'field list'

    I could not find any reference to 'BODY_SWAPPED_IMAGES'.  Is this field part of the MS Graph Poller?

     

  • v2.2.2 Release Notes
    • Fixed a bug in parsing .json attachments
    • Updated DB script to include the new column
  • v2.2.1 Release Notes
    • Added new smart service with various new input parameters
    • Ability to toggle whether fileAttachments are included in generated EML file
    • Ability to toggle parsing of itemAttachments; Saves them as an Appian doc if set to true, previously these attachments were not included
    • Ability to toggle parsing of inlineImages; Detects any img tags with cid-based src's, replaces the src with the link to the Appian document
  • We have MS Poller configured for one of our application. We noticed that MS Poller smart service is not able to ingest .MSG files as an attachment, however associated mail is ingested. (Email attachment inside another email). 

    Kindly assist.

  • ... is XXX.onmicrosoft.com

  • Hi, I'm trying to configure the pulgin and I have followed the steps in the documentation also added the log4j to debug and I'm getting below error:

    2021-08-09 18:35:18,140 [Appian Work Item - 493 - execution02 : UnattendedJavaActivityRequest] DEBUG com.appiancorp.ps.msgraphmail.MSGraphMailPollerSmartService - Connecting to MS Graph authentication provider
    2021-08-09 18:35:18,146 [Appian Work Item - 493 - execution02 : UnattendedJavaActivityRequest] ERROR com.appiancorp.ps.msgraphmail.MSGraphMailPollerSmartService - Unexpected error polling for mail
    java.util.concurrent.ExecutionException: java.lang.NullPointerException


    Has someone got this same error, that could help to troubleshoot?

  • Hi, I'm trying to configure the pulgin and I have followed the steps in the documentation also added the log4j to debug and I'm getting below error:

    2021-08-09 18:35:18,140 [Appian Work Item - 493 - execution02 : UnattendedJavaActivityRequest] DEBUG com.appiancorp.ps.msgraphmail.MSGraphMailPollerSmartService - Connecting to MS Graph authentication provider
    2021-08-09 18:35:18,146 [Appian Work Item - 493 - execution02 : UnattendedJavaActivityRequest] ERROR com.appiancorp.ps.msgraphmail.MSGraphMailPollerSmartService - Unexpected error polling for mail
    java.util.concurrent.ExecutionException: java.lang.NullPointerException
    at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357)
    at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1908)
    at com.appiancorp.ps.msgraphmail.MSGraphConnector.<init>(MSGraphConnector.java:75)
    at com.appiancorp.ps.msgraphmail.MSGraphMailPollerSmartService.run(MSGraphMailPollerSmartService.java:171)
    at com.appiancorp.process.runtime.framework.DefaultActivityExecutor$1.lambda$call$0(DefaultActivityExecutor.java:131)
    at com.appiancorp.plugins.PluginUsageLogger.runWithPluginInformation(PluginUsageLogger.java:52)
    at com.appiancorp.process.runtime.framework.DefaultActivityExecutor$1.call(DefaultActivityExecutor.java:131)
    at com.appiancorp.process.runtime.framework.DefaultActivityExecutor$1.call(DefaultActivityExecutor.java:125)
    at com.appiancorp.common.ContextClassLoaderSwitcher.runInContext(ContextClassLoaderSwitcher.java:25)
    at com.appiancorp.process.runtime.framework.DefaultActivityExecutor.execute(DefaultActivityExecutor.java:125)
    at com.appiancorp.process.engine.UnattendedJavaActivityRequest.execute(UnattendedJavaActivityRequest.java:88)
    at com.appiancorp.process.engine.UnattendedJavaActivityRequestResponseCreator.getJavaActivityResultResponse(UnattendedJavaActivityRequestResponseCreator.java:21)
    at com.appiancorp.process.engine.UnattendedJavaActivityRequest.getJavaActivityResultResponse(UnattendedJavaActivityRequest.java:67)
    at com.appiancorp.process.engine.UnattendedJavaActivityRequest.execute0(UnattendedJavaActivityRequest.java:55)
    at com.appiancorp.process.engine.ContinuationRequest.executeOuter(ContinuationRequest.java:73)
    at com.appiancorp.process.engine.ContinuationRequest.execute(ContinuationRequest.java:102)
    at com.appiancorp.process.workpoller.UnattendedRequestHandlerBean.onMessage(UnattendedRequestHandlerBean.java:36)
    at com.appiancorp.process.workpoller.WorkItem.run(WorkItem.java:93)
    at org.springframework.jca.work.SimpleTaskWorkManager$DelegatingWorkAdapter.run(SimpleTaskWorkManager.java:239)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
    Caused by: java.lang.NullPointerException
    at com.microsoft.aad.msal4j.AuthenticationResultSupplier.logException(AuthenticationResultSupplier.java:139)
    at com.microsoft.aad.msal4j.AuthenticationResultSupplier.get(AuthenticationResultSupplier.java:88)
    at com.microsoft.aad.msal4j.AuthenticationResultSupplier.get(AuthenticationResultSupplier.java:17)
    at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1604)
    at java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1596)
    at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
    at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
    at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
    at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:175)

    Has someone got this same error, that could help to troubleshoot?

  • v2.1.5 Release Notes
    • Updated the contentType param to allow for the retrieval of both plain text and html