No internet connection
  1. Home
  2. General

Requesting help with extracting from email attachments.

By @jayjay
    2021-12-03 00:38:23.827Z

    Hello,

    I have been using Thinkautomation 4.2 for a few years now, but only for some pretty simple tasks like processing emails from an IMAP connection, extracting data, setting variables and so forth.

    Now I need to receive an email and extract data from an HTML attachment and set the extracted data as a variable. I have been reading through the manual and help text and so far I have not had any luck.

    Can TA 4.2 extract data from an attachment?

    Can someone please provide some general steps on how to accomplish this? My scripting skills are pretty weak, but if I have a general idea on how to do this I might be able to figure it out.

    Thanks in advance for any help with this.

    • 1 replies
    1. L
      Liam @liam
        2021-12-03 14:00:28.008Z

        Hi Jay

        There are probably a few options for you here.
        The most obvious that comes to mind is:

        1. use the Process Attachments action to save the HTML attachment to a directory.
        2. use the Read/Write Text file action read the contents of the HTML file and then assign this to a variable inside TA.
        3. use the Pass Value to Trigger action to pass this variable onto another trigger for processing.
        4. In this other trigger you can then configure all the Extracted fields etc as if it were an ordinary email, just bear in mind that you are extracting HTML content and not regular text so keep in mind all the HTML tags that you may need to navigate.

        I hope this helps