Overview
The node named "MsgParser" is designed to convert binary .msg files (commonly Microsoft Outlook email message files) into JSON objects. It reads the binary content of the input file, parses it using a specialized library, and outputs the extracted data as structured JSON. This node is useful in workflows where email message contents need to be analyzed, processed, or integrated with other systems without manual extraction.
Practical examples:
- Extracting email metadata and body from
.msgfiles stored in a binary field for further processing. - Automating email archival by converting
.msgfiles into JSON format for database storage. - Integrating email content into CRM or ticketing systems by parsing
.msgattachments.
Properties
| Name | Meaning |
|---|---|
| Input Binary Field | The name of the input binary field containing the .msg file to be extracted (default: "data"). |
Output
The node outputs an array of items where each item's json property contains the parsed content of the .msg file as a JSON object. The original binary data is removed after parsing (binary property is set to undefined). The JSON structure includes all extracted fields from the .msg file such as sender, recipients, subject, body, attachments metadata, and other email properties as provided by the underlying parser library.
No binary output is produced by this node.
Dependencies
- Uses the external library
@kenjiuno/msgreaderto parse.msgfiles. - Requires the input data to contain a binary field with the
.msgfile content. - No explicit API keys or external services are required.
- Must be run in an environment where the
@kenjiuno/msgreaderpackage is available.
Troubleshooting
- Common issues:
- If the specified input binary field does not exist or is empty, the node will output an empty JSON object for that item.
- Corrupted or unsupported
.msgfiles may cause parsing errors.
- Error messages:
- Parsing errors will throw exceptions unless "Continue On Fail" is enabled, in which case the error details are added to the output item.
- Errors include context about the item index to help identify problematic inputs.
- Resolution tips:
- Verify the input binary field name matches the actual field containing the
.msgfile. - Ensure the
.msgfiles are valid and not corrupted. - Enable "Continue On Fail" to allow partial processing when some items fail.
- Verify the input binary field name matches the actual field containing the
Links and References
@kenjiuno/msgreaderGitHub repository – Library used for parsing.msgfiles.- Microsoft Outlook
.msgfile format – Official documentation on the.msgfile format.