Customize Saving Email Headers in SharePoint Columns Using New harmon.ie
With custom email header mapping, an admin uses the organization’s own email content type and tells New harmon.ie which columns to save the email headers in. To compare this with harmon.ie’s default mapping, see How to set up email header mapping in New harmon.ie.
When should you customize harmon.ie’s email header mapping?
Consider customizing email header mapping if:
- Users in your organization are not granted Edit permission on SharePoint, so harmon.ie can’t create the email content type for them.
- 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).
How to set up custom email header mapping?
Choose how your email content type reaches each library: add it to every library yourself, or let harmon.ie add it from the site.
Add your content type to every library
harmon.ie only maps the email headers into your columns, so users don’t need Edit permission in the SharePoint site.
- Create an email content type with the columns you want to map. Include a Message ID column (single line of text). Without it, shared categories don’t work.
- Add the content type to every library where users save emails.
- Configure custom email header mapping, mapping each email header key to its column in your content type.
Let harmon.ie add your site content type to libraries
As users save emails, harmon.ie adds your content type to each library that doesn’t have it, and adds the Message ID and Email Thread columns if they are missing from it.
- Create the email content type at the site level.
- Configure custom email header mapping.
- In the Admin tab, turn on Create the email content type for SharePoint. It is on for Teams by default.
- Give users at least Edit permission in the SharePoint site.
What harmon.ie does when a user saves an email
harmon.ie assigns your email content type to the email and maps the email headers into your columns. When Create the email content type is on for the destination and the user has at least Edit permission in the SharePoint site, harmon.ie also adds what’s missing:
- The library doesn’t have your content type: harmon.ie adds it from the site, with an Emails view.
- The site doesn’t have it either: harmon.ie creates it at the site level from your mapping, including any of these columns your mapping doesn’t define, with the default internal names: To, From, Subject, CC, Attachments, Received, Message ID, Conversation Topic, and Email Thread.
- Message ID and Email Thread columns: harmon.ie adds them if they are missing from your content type.
Otherwise, an email saved to a library without your content type is saved without email header mapping.
How to configure custom email header mapping?
Before you start, set up New harmon.ie’s central configuration.
- Download provisioning.zip and extract it to a local folder.
- In the extracted Provisioning.json file, edit the EmailHeaderMapping section. Each key is an email header field name, and its value is an array of the internal column names your organization uses for it. If different libraries use different names, list them all.
Example: "To": ["EmailTo1", "To1"]
harmon.ie already recognizes the internal names in the table below. Add only the names your organization uses that aren’t listed. - Import the Provisioning.json file in the Admin tab.
- 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 |
|---|---|---|---|
| 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. |
| 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. If you map Date, harmon.ie creates the Date column. If you don’t, it creates the Received column instead. If you map both, harmon.ie fills both. |
| From | [“hrmV2From”, “hrmFrom”, “EmailFrom”, “EMailSender”, “From”, “From1”, “MailFrom”, “Sender”] | Single line of text | The address of the message sender. |
| InternetConversationId | [“hrmV2InternetConversationID”, “InternetConversationID”] | Single line of text | Identifies the email thread (display name Email Thread). Can be used to group emails in a SharePoint view. |
| 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. If you list more than one, harmon.ie assigns the first one it finds in the location. |
If your organization also uses harmon.ie Classic, or is moving from it:
- Custom mapping in harmon.ie Classic: Configure the same mapping in New harmon.ie. Instead of entering it again, export it from harmon.ie Classic with the EmailHeaderMappingExport tool and import it in the Admin tab. See Export Custom Email Header Mapping Settings to New harmon.ie.
- Default mapping in harmon.ie Classic: Use default email header mapping in New harmon.ie as well.
- Email views: New harmon.ie saves emails as .eml files, and harmon.ie Classic saves them as .msg files. If your Email views show only .msg files, filter them by the email content type instead, or include .eml files.