Inspire EMEA 2022 On-Demand is live! Watch now, and be sure to save the date for Inspire 2023 in Las Vegas next May.

Alteryx Designer Knowledge Base

Definitive answers from Designer experts.

Reading Outlook Emails and Email attachments with Alteryx

MargaritaW
Alteryx Alumni (Retired)
Created

Question

Can I read Outlook emails and attachments with Alteryx?

Answer

As our users are looking at automating their processes within Alteryx, the type of files they want to be able to read varies from your regular data file types. I was asked a few times if we could read outlook emails and/or attachments with Alteryx.

Reading Emails

One way to accomplish this is by linking the Outlook folder (s) to an Access database table (s) and then to read the Access database with Alteryx, since it is a link, the table(s) in the Access database will be updated with all the emails that are being moved into that Outlook folder.

This Link walks you step by step on how to link an Outlook folder to an Access database table http://www.fmsinc.com/microsoftaccess/email/linked/index.htm

Once the Access table(s) is linked to the Outlook folder(s) you are ready to read it into Alteryx. Go to Alteryx and bring an Input tool and browse to the Access database file. Most likely the table tab won’t be populated, go to the SQL Editor tab and write the query as shown below, where Training is the name of your table in Access, then click OK.

P1a1.png

P1.png

Upon workflow execution, you will retrieve all this information from your Outlook emails

P1a.pngP2.png

P3.png

Reading Email Attachments

A rule can be created in Outlook to automatically download attachments to a specified computer folder where Alteryx can pick them up. There is a good article that walks through the setting of this Outlook Rule.

Notice that the script is where the folder to download is specified, specific line is saveFolder = "c:\temp\"

As always, do a small test first with a controlled outlook folder.Once this rule is set, you would simply point to the file(s) with an Alteryx Input Data tool.

No ratings
Comments
dataMack
12 - Quasar
Good suggestion. Another approach is to setup a Sharepoint list that can receive incoming e-mails. Then you can connect straight to that list with Alteryx.
ClaudiaV
7 - Meteor

Hello

What if it's not an attachement but a Link to Download ?

The attachement is served in an external server and I have to click to downlaod it.

 

Thanks

Raghu_s
8 - Asteroid

Hey @MargaritaW and @dataMack

Thanks for this post!

Is it possible to extend this solution to set up something that can read the EMAIL BODY which has GRID REPORT i.e a traditional tabular grid and make use of information that is being communicated. I ask this because unfortunately some of our data partners doesn't have the infrastructure/sophistication to send as files or FTP it. But its very crucial that we make use of this data for daily reporting.

 

Any thought would be greatly appreciated as the solution that am looking for will save lot of man hours and increase accuracy.  

marcopeters
5 - Atom

@Raghu_s

 

This might not be a very elegant solution, but you could save emails as a html page and use RegEx to parse out data, like in this training video.

 

https://community.alteryx.com/t5/Live-Training/Live-Training-Parsing-with-Regular-Expressions/td-p/4...

 

 

 

 

I am trying to use the Email OutlookInputTool. But this currently has limited options for choosing the Exchange Server Version. The mailbox I am accessing uses 14.3.XXX.XXXX which doesn't suit the exchange versions in my input tool. Do you have any suggestions?

NeilR
Alteryx Community Team
Alteryx Community Team
laddaram
5 - Atom

where should I place the SqL query. Not sure if this is related to Alteryx version, but I donot see any place to right SqL query.

Sagarika_k
6 - Meteoroid

@MargaritaW - Please help! I have tried multiple ways but still can't access the linked Access Table

 

I have local admin rights on my company machine

 

https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Reading-Outlook-Email-using-Access-Db-...

 

 

MargaritaW
Alteryx Alumni (Retired)

Hi @Sagarika_k !

 

Sorry to hear you are not able to connect to your Access linked outlook table. Per Brandon answer to your post, you may want to try the Outlook input tool created by a community user rapugh, link here: 

https://community.alteryx.com/t5/Engine-Works-Blog/Outlook-Input-tool-Created-with-the-Alteryx-SDK/b...

As Brandon mentioned, this is not developed by Alteryx and therefore is community supported.

vaishalilambe17
8 - Asteroid

Is there a direct way of accessing outlook and read email and attachment in alteryx workflow just like email send functionality in alteryx?

MargaritaW
Alteryx Alumni (Retired)
Jeswantbabu
6 - Meteoroid

Hi Margarita,

 

I am trying to input my access database file which reads the data from Share point . i tried the above mentioned similar steps that was suggested but it shows me an error.

 

Error: Input Data (38): Error opening table: Microsoft JET Database Engine: The Microsoft Jet database engine cannot find the input table or query 'SELECT * FROM DATABASE2'. Make sure it exists and that its name is spelled correctly.\3078 = -524420377.

 

I am using .mdb version. could you share the steps to resolve this?

 

Thanks

 

JB

NidhinGD
7 - Meteor

 Hi @Raghu_s 

 

I am working on a similar requirement. Were you able to read table/grid data from email.

Can you please share the approach you followed.

 

 

@MargaritaW :I don't have an option to use the Outlook tool created by  

Is there any other approach I can try

 

Thanks in advance

 

Nidhin

 

 

 
 
 
KevinDW
6 - Meteoroid

Does anyone know if there is a way to automate Access scraping outlook on a daily basis?

mst3k
11 - Bolide

is there a way to access outlook emails from an alteryx server so you can schedule the workflow? or would this only work for manually running workflows locally? 

i suppose the way around that would be the server needs to have a copy of outlook on it, and access to some kind of service account? 

has anyone done this before, having a scheduled workflow on the server pick up attachments out of emails?