Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
RESUELTAS

How to define a moving pattern in outlook message file

joesparty
Asteroide

Hi Community,

 

I’m struggling to find a way to capture messages in an outlook message file, .eml.  In the attached workflow I’m able to flag some fields; Date, Subject, From, and To.  Where it gets tricky is that the message part is different based on if there is an attachment and encoding, so far I’ve identified 3 in my population:

  1. Content-Transfer-Encoding: 7bit
  2. Content-Transfer-Encoding: quoted-printable
  3. Content-Transfer-Encoding: base64

 

Based on these types the message will be in different locations such as:

  1. Example 1
    • Content-Transfer-Encoding: 7bit
    • MIME-Version: 1.0
    •  
    • Approved
  2. Example 2
    • Content-Transfer-Encoding: quoted-printable
    • MIME-Version: 1.0
    •  
    • Regarding our hope for a dashboard- Are you able to get the AD =
    • listing? I haven't heard back on the OT listing but I think is =
    • reaching out on that one.
  3. Example 3
    • MIME-Version: 1.0
    •  
    • ----_NmP-90e4a698bc387d49-Part_1
    • Content-Type: text/plain
    • Content-Transfer-Encoding: 7bit
    •  
    • can you guess which folder
    •  
    • ----_NmP-90e4a698bc387d49-Part_1
    • Content-Type: image/png; name=981a50e7-ae12-4c29-a86c-55c837336631.PNG
    • Content-Transfer-Encoding: base64
    • Content-Disposition: attachment;
    •  filename=981a50e7-ae12-4c29-a86c-55c837336631.PNG

My goal is to create a batch macro to extract the following fields of the messages; Date, Subject, From, To, Message, and Attachment name (if found).

 

Can you help figure out how to capture that moving target ‘Message’ field?  In the zip file, rename the files with a .eml extension.

4 RESPUESTAS 4
joesparty
Asteroide

Another approach I attempted was to summarize and combine to 1 line.  I tried text to columns with ‘:’, but that still makes it hard to find the message.  Same issue with RegEx, the order of fields changes.

 

How could I dynamically extract records after Date: in the file when it could be on line 6-12?

 

Any and all suggestions welcomed! 

ddiesel
13 - Pulsar
13 - Pulsar

Hi @joesparty 

This is a fun one!

 

I don't think a macro is required in this case. Please try the attached workflow, and let us know if it works for you.

 

Capture2.JPG

 

Capture.JPG

 

This should be a dynamic solution as long as each field name is identified in Text Input (14). I expect the logic may need some small modifications once you test it on a larger set of non-dummy data. 

 

Let us know if this helps!

 

Thanks,
Deb

 

 

joesparty
Asteroide

Wow @ddiesel ! Such a better approach then the path I was going down.  There is so much for me to learn from your example, thank you!  I was able to test your workflow using 600 messages and using the browse tool the message column looks clean!

ddiesel
13 - Pulsar
13 - Pulsar

@joesparty, Happy to help!

Etiquetas
Autores con mayor cantidad de soluciones