MSGraph Mail 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.
  • This plugin currently supports only MySQL and Oracle databases.
Anonymous
Parents
  • Performance Optimization Tip: Reduce Graph API Payload When Generating EML Files

    Context: When generating EML files without file attachments, we can avoid retrieving unnecessary attachment data from Microsoft Graph API.

    Location: In the extractDataAndDocFromMimeContentProxied method, when processing the EML generation path that excludes file attachments.

    Recommended Change:

    Use selective field retrieval with .select("id"):

    AttachmentCollectionPage attachments = mc.graphClient.users(mailbox)
        .messages(copyMsg.id)
        .attachments()
        .buildRequest(requestOptions)
        .select("id")
        .get();

    Instead of retrieving all fields:

    AttachmentCollectionPage attachments = mc.graphClient.users(mailbox)
        .messages(copyMsg.id)
        .attachments()
        .buildRequest(requestOptions)
        .get();

    Benefits:

    • Reduced network transfer: Avoids downloading large contentBytes from each attachment
    • Faster API response: Graph API returns only attachment IDs instead of full attachment data
    • Lower memory usage: Especially beneficial for messages with multiple large attachments
    • Same functionality: Attachment IDs are sufficient for deletion operations

    Performance Impact: For messages with large attachments (e.g., 5+ files totaling 50+ MB), this can reduce API response time by 50-70% during EML generation without attachments.

    This optimization applies specifically when generating EML files where file attachments are excluded (isKeepFileAttachmentsInEml != INCLUDE).

    Hope this helps optimize your Graph API integrations!

    Best regards,
    NLC

Comment
  • Performance Optimization Tip: Reduce Graph API Payload When Generating EML Files

    Context: When generating EML files without file attachments, we can avoid retrieving unnecessary attachment data from Microsoft Graph API.

    Location: In the extractDataAndDocFromMimeContentProxied method, when processing the EML generation path that excludes file attachments.

    Recommended Change:

    Use selective field retrieval with .select("id"):

    AttachmentCollectionPage attachments = mc.graphClient.users(mailbox)
        .messages(copyMsg.id)
        .attachments()
        .buildRequest(requestOptions)
        .select("id")
        .get();

    Instead of retrieving all fields:

    AttachmentCollectionPage attachments = mc.graphClient.users(mailbox)
        .messages(copyMsg.id)
        .attachments()
        .buildRequest(requestOptions)
        .get();

    Benefits:

    • Reduced network transfer: Avoids downloading large contentBytes from each attachment
    • Faster API response: Graph API returns only attachment IDs instead of full attachment data
    • Lower memory usage: Especially beneficial for messages with multiple large attachments
    • Same functionality: Attachment IDs are sufficient for deletion operations

    Performance Impact: For messages with large attachments (e.g., 5+ files totaling 50+ MB), this can reduce API response time by 50-70% during EML generation without attachments.

    This optimization applies specifically when generating EML files where file attachments are excluded (isKeepFileAttachmentsInEml != INCLUDE).

    Hope this helps optimize your Graph API integrations!

    Best regards,
    NLC

Children
No Data