Learn How To Automate Your Business

Actionable tips on how to save time and money with automation.

Parse Email Attachments

Since the beginning of mailparser.io one particular feature request popped up every couple of days. People were asking if it was possible to automatically read and process text stored inside e-mail attachments. Quickly it became clear to us that this is something we wanted to build for our customers! Read on to find out how you can parse email attachments with Mailparser.

Update: This article covers the e-mail parsing functionality of Mailparser. If you are looking for a solution to parse complex PDF attachments and convert to Excel, we have exciting news for you! We decided to launch a service dedicated to PDF document parsing. Check out Docparser.


Today we are super happy to announce the launch of our new Email Attachment Parser! It is now possible to pull text from files that are attached to your e-mails. The file formats from which our parser can read and send data from PDF, Excel Spreadsheets, DOC, DOCX, CSV, TXT, or XML files.
To take advantage of this new feature:
Create a Mailparser account

How to parse email attachments

This is how it works:

  • Send over an email with a file attachment to your @mailparser.io inbox.
  • Create a new parsing rule for each data field you want to extract from the attachment.
  • Set the source of the parsing rule to “Attachment” and choose “Text Content”. If you are parsing a Spreadsheet file or you want to extract table rows from a PDF file, switch the filter to “Text Cells”.
  • You will then see the text data of the attached file. The image below shows this step.

Parse Text From Email Attachments

From there on, everything works as usual: you can chain up multiple text filters until your data field is isolated from the rest. Have a look at the next image to see this in action. With a first filter, we define where the data we want to extract is located inside the text of the attachment. Then, we define where the data field ends with another filter.
Text extraction filters

Which file formats are supported?

Right now it is possible to extract text from .pdf files, .xls and .xlsx Excel Spreadsheets, .csv files, .doc and .docx Word Documents, generic .txt and .xml files. If your file format is not listed yet, let us know and we will look into it. The basic idea stays always the same. No matter which file format, the text will be extracted and is then available as if it was text in the body of the email.

32 Responses

  1. I’m looking for something that can parse .ICS (Calendar invites) on emails, so that might be a format to look into. I believe they’re just text files, so perhaps this would already be possible with a bit of work and understanding of the format.

    1. That’s a great idea and should not be too difficult to implement on our end. Please send an e-mail to contact [at] mailparser.io so that we can go more into detail.

  2. Hi,
    I’m looking for a email parsing tool to parse XML data from emails. Do you sell this mailparser as package which can be installed on our server?
    Regards,
    Mike

    1. Hi Mike,
      thanks for asking! mailparser.io is only available as an online tool with a monthly subscription model. If you like, please contact me by e-mail for further details.
      Best regards,
      Moritz

    1. Hi John,
      thanks for asking!
      Unfortunately we do not support optical character recognition (OCR) from scanned documents. Your PDF files need to contain accessible text data.
      Moritz

    1. Hi Mark! By default we apply a limit of 1k rows when parsing CSV email attachments. Please feel free to contact support if you need to have this increased.

  3. Hello,
    To bounce back on the question of John above, If we use an OCR software to transform the scanned document in text or PDF with accessible text data, then it would be easy for you to parse invoices from different vendors? Even if they are using different templates but give similar set of information?
    Thank you for your help!

    1. Hi Hugues! Yes, mailparser.io can pull text out of the PDF files in this case. However, please do have a look at our sister product Docparser which is probably a much better fit for your use-case.

    1. Hi John! Great question! Parsing data from attached Word documents is not possible yet. We are having this on our product road map though for a future release (no ETA yet). If you like, reach out by e-mail and tell us a bit more about your use-case. Moritz

  4. We are concern about security. Send sensitive information through email sound risky some times.
    1. How secure is mailparser.io?
    2. Can we protect our xlsx files with a password and set it up in mailparser.io to access them?

  5. So in my file (which is cvs) I want to count all of the data and have them add up the rows. Is that possible? My file looks like blah blah name, and then several colums, and then IN or OUT at the end. I want to add up the IN rows and the OUT rows. And have you guys webhook me the numbers. Is that possible with your system?

    1. Hi Richard,
      Thanks for reaching out, our app does not offer any robust logic-based functions like addition of data inside of columns, sorry – if you have any questions please let us know at support@mailparser.io
      Best regards,
      Joshua Harris
      Mailparser Support

    1. Hi Asher,
      Thanks for reaching out, sorry for the late reply here – if you’re having trouble can you send in a query to support@mailparser.io and I’ll have a look at your issue?
      Best regards,
      Joshua Harris
      Mailparser Support

  6. Can you parse a Scanned PDF? Additionally, can you parse PDFs that may have handwritten text scanned? What about the security of the attachment.

    1. Hi Prabhash,
      Thanks for reaching out and for your interest in Mailparser!
      Our app can extract data from many invoices, though our sister app Docparser.com is better suited for PDF extraction – I would recommend creating a trial there and sending in a ticket to support@docparser.com if you get stuck 🙂
      Best regards,
      Joshua Harris
      Mailparser Support

  7. Scenario: we receive PDF invoices via emails and each PDF file needs to be extracted using a specific docparser template.
    Is it possible to setup parsing rules in mailparser so that based on the attached machinereadable PDF, specific docparser templates are used to extract the data from the PDF?

    1. Hi Ralf,
      Thanks for reaching out and for your interest in Mailparser!
      Mailparser was not built to send PDFs to Docparser, though this can be set up in Microsoft Flow: http://flow.microsoft.com
      Please be advised you can send PDFs via email to Docparser directly:
      https://support.docparser.com/article/1254-what-is-the-recommended-way-of-importing-uploading-documents-to-docparser
      If you have any questions please let me know at support@mailparser.io.
      Best regards,
      Joshua Harris
      Mailparser Support

  8. Any reason why I can’t just choose the last line of the csv or htm file, regardless of length? Seems to me I have to tell it how many rows to omit or which row to choose. I always want the bottom row, but don’t see a way to always choose the bottom row of data. Other than that, so far I love this program.

    1. Hi Joseph,
      Thanks for reaching out! You can use the start at>keep last line filter to accomplish this request.
      If you have any questions or this doesn’t work feel free to give me a shout at support@mailparser.io 🙂
      Best regards,
      Joshua Harris
      Mailparser Support

    1. Hi Drennen,
      Thanks for reaching out and sorry for the late reply here!
      Our app can extract data from multiple attachments in a single email, though this will require multiple parsing rules that look at each different document as the data source.
      I would recommend trying this during your trial and letting me know where you run into trouble at support@mailparser.io 🙂
      If you have any questions in the meantime please let me know!
      Best regards,
      Joshua Harris
      Mailparser Support

  9. Do you have a personal version? I need yo keep track of a large number of medical receipts for my family and this would be perfect.

    1. Hi Ana,
      Thanks for reaching out and sorry for the late reply here!
      I can confirm our app exists in the cloud only and can’t be downloaded to be used personally, sorry.
      If you have any questions please let me know.
      Best regards,
      Joshua Harris
      Mailparser Support

    1. Hi Sanjay,
      Thanks for reaching out! While word document parsing is something we plan to add we do not have an ETA for when it would be released.
      We will announce this release to all account holders that haven’t unsubscribed to our emails – if you have any questions please let us know at support@mailparser.io!

  10. Your data sources list .xls but can a Google Spreadsheet be used as well? If I pass a structured list via zapier to mailpaser can I add some pretty basic validation rules at a column or row basis. Basically define a set of rules for spreadsheet like data and have the list processed according to those rules and returened to user?

Leave a Reply

Your email address will not be published. Required fields are marked *

Hi there, I’m Joshua.
I oversee product development at Mailparser. This includes working with customers and overseeing new feature implementation.

Try Mailparser for free!
Save hours of time!

No credit card required.