Customize Saving Email Headers in SharePoint Columns Using New harmon.ie

When users save emails to Microsoft 365, New harmon.ie assigns the email content type and maps email headers to columns if an email content type and columns already exist in the document library. If they don’t exist, harmon.ie can create the email structure (content type, columns, and an Emails view), using either harmon.ie’s default email header mapping or your company’s custom email header mapping.

This article explains how you can assign your company’s custom email content type and map email headers to non-standard columns.

When Should You Customize harmon.ie’s Email Header Mapping?

Consider customizing email header mapping if:

  • You already have pre-configured email columns with non-standard internal column names that you’d like to use with harmon.ie (set with harmon.ie Classic, for example)
  • You want to add additional columns beyond those created automatically by harmon.ie
  • You need to create columns with a different data type than the default (e.g., Multiple lines of text instead of Single line of text)
  • You prefer to use custom display names for the email content type or for the email-related columns (e.g., in other languages).

What harmon.ie does when you save an email

When a user saves an email to SharePoint or Teams, what harmon.ie does depends on the save location:

  • The location already has an email content type: harmon.ie assigns the content type to the email and maps the email headers into the email columns.
  • The location has no email content type: harmon.ie creates the email structure, adding an email content type, email columns, and an Emails view.
  • harmon.ie creates the email structure on the user’s behalf, so the user needs at least Edit permission in the Microsoft 365 location.
  • If an email content type already exists in the location, harmon.ie will not create an Emails view, even if the view itself is missing.

With your custom mapping, harmon.ie uses the content type and columns defined in your provisioning file:

  • Content type: harmon.ie assigns the email content type you defined, or creates it if the location doesn’t have it. If your provisioning file defines more than one content type, harmon.ie assigns the first one it finds in the location.
  • Email headers: harmon.ie maps the email headers into the columns you defined. For any required columns you did not define, it creates them from harmon.ie’s default content type.
Date and Received: If you define Date, harmon.ie creates the Date field. If you don’t, harmon.ie creates the Received field instead. If you define both, harmon.ie maps to both.

Configuring whether and where harmon.ie creates the email structure

harmon.ie can be configured to create the email structure when saving emails to SharePoint and/or Teams.

Administrators control this with the Create the email content type setting, per destination (SharePoint and Teams), in the harmon.ie admin configuration. This setting applies to your custom mapping the same way it applies to the default mapping.

Even when creation is turned off, harmon.ie still saves email headers and assigns the email content type in locations that already have the email structure.

Configuring custom email header mapping

If your organization already configured custom email header mapping in harmon.ie Classic, you can use harmon.ie’s EmailHeaderMappingExport tool to export the custom registry mappings from harmon.ie Classic into a compatible JSON format for New harmon.ie. This replaces steps 2 and 3 below.

See Export Custom Email Header Mapping Settings to New harmon.ie.

Steps:

  1. Prerequisite: Setup New harmon.ie’s configuration.
  2. Download Provisioning.zip and extract it to a local folder.
  3. Edit the extracted Provisioning.json file:
    The EmailHeaderMapping section includes key-value pairs that set custom email header mapping in harmon.ie:

    • Each key is an email header field name.
    • The value is an array of internal column names as defined in your organization. If different libraries have different internal column names for saving email headers, define all of them in a comma-separated list.

    Example: "To": ["EmailTo1", "To1"]

  4. Import the Provisioning.json file to New harmon.ie via the Admin tab in harmon.ie settings.

harmon.ie’s initial mapping includes a list of internal column names as described in the table below.
Update the Provisioning.json file only if your configuration includes other column names.

  • Read SharePoint Naming Guidelines to learn more about SharePoint column names, and how to identify the internal column names.
  • Do not edit the Provisioning.json file directly in the “harmon.ie Files” library. Always edit it locally and then import it, as the import process validates the file and checks for errors.
  • We recommend editing the .json file using VS Code, which will warn you about syntax errors.

SharePoint columns used for email header mapping:

Key: Email Header Field Name Value: Column Internal Names Type Description
HasAttachments or Attachments (Read note) [“hrmV2HasAttachments”, “hrmHasAttachments”, “hrmAttachments”, “HasAttachments”, “Attachment”, “MailAttachments”, “WithAttachments”] Single line of text Indicates if the email message contains attachments.
Note: We recommend naming the column “HasAttachments” or “hrmV2HasAttachments”. After creation, you can change the display name to “Attachments” or any other name you prefer.

Important!
Do not create the column with “Attachments” as the initial display name. SharePoint reserves “Attachments” as an internal column name, and using it will cause conflicts.
Categories [“hrmV2Categories”, “hrmCategories”, “Categories”] Multiple lines of text Message categories.
CC [“hrmV2CC”, “hrmV2Cc”, “hrmCc”, “hrmCcOWSMTXT”, “EmailCc”, “Cc”, “MailCc”] Single line of text The identity of the secondary recipients of the message.
ConversationIndex [“hrmV2ConversationIndex”, “hrmConversationIndex”, “Conversation-Index”, “ConversationIndex”] Single line of text A unique identifier for the conversation.
ConversationTopic [“hrmV2ConversationTopic”, “hrmConversationTopic”, “Conversation-Topic”, “ConversationTopic”] Single line of text The original subject of the email thread (without “FW:”, “RE:”). This column facilitates creating a SharePoint view to group threaded emails (harmon.ie Classic only).
Date [“hrmV2Date”, “hrmDate”, “EmailDate”, “Date”, “MailDate”] Date and Time The date and time when the message was sent.
From [“hrmV2From”, “hrmFrom”, “EmailFrom”, “EMailSender”, “From”, “From1”, “MailFrom”, “Sender”] Single line of text The address of the message sender.
InternetConversationId [“hrmV2InternetConversationId”] Single line of text Identifies the email thread, used for grouping emails in New harmon.ie. Required for shared categories.
MessageID [“hrmV2MessageID”, “hrmMessageID”, “MessageID”] Single line of text A unique identifier for the message. Required for shared categories.
Received [“hrmV2Received”, “hrmV2Recieved”, “hrmReceived”, “EmailReceived”, “Received”] Date and Time The date and time when a message is received.
Subject [“hrmV2Subject”, “hrmSubject”, “EmailSubject”, “Subject”, “MailSubject”] Single line of text The subject of the message.
To [“hrmV2To”, “hrmTo”, “EmailTo”, “To”, “MailTo”] Single line of text The identity of the primary recipients of the message.

Email content type name

Besides the email header columns, you may also need to define the ContentTypes key if you’ve used a non-standard name for the email content type:

KEY VALUE DESCRIPTION
ContentTypes [“Email”, “E-Mail”] Email content types that should be used when uploading an email.