We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Need Sample workflow which uses Outlook Connector

EN6924
10 - Fireball

Hi Folks,

 

I have installed Outlook connector in Alteryx Server. 

 

The next thing I need to do is set up a Alteryx workflow that will use the Outlook connection to retrieve excel attachments from the mailbox and put them in a network folder. The workflow needs to pull the most recent attachments from mail and is scheduled to execute every day. Scheduling part I will take care of it from Gallery.

 

Mails will be coming on a daily basis, and for 30 days we want to keep all daily files in a new folder on the requested network drive. I'll setup the DCM connections.

 

I am able to fetch mail attachments but not able to save in my desired location. Could someone please provide me a sample workflow? Please. 

1 REPLY 1
Alafiya
Alteryx
Alteryx

@EN6924 

Thanks for posting, we are happy to help with solution. I understand that you want to retrieve Excel attachments from your Outlook mailbox and save them to a network folder, with a new folder created for each day's attachments, and you want to keep all daily files for 30 days. here is what tools which will help you.

  • The Date Time Now tool : gets the current date and time.
  • The Formula tool : creates the dynamic path for the attachments.
  • The Sort tool: sorts the attachments by date.
  • The Filter tool : filters the files based on their date, and only keeps the files that are within the last 30 days.
  • The Blob Output tool : saves the attachments to the specified path.

Step by step for your workflow (Reference the workflow attached)

You can use the Outlook 365 connector to retrieve attachments from your Outlook mailbox.

A Formula tool (Tool ID 2) that creates the dynamic path. The formula in Tool ID 2 is: \\\\network_drive\\folder\\" + DateTimeFormat(DateTimeToday(),"%Y%m%d") + "\\" + [FileName]

You also have a Blob Output tool (Tool ID 3) that saves the attachments to the specified path.

To make sure that only the most recent attachments are saved, you have a Sort tool (Tool ID 5) to sort the attachments by date before saving them.

To keep all daily files for 30 days, you can add a Filter tool to filter the files based on their date and only keep the files that are within the last 30 days.

Use the  formula in the Filter tool (Tool ID 7) is: DateTimeDiff(DateTimeToday(),[AttachmentDate],"days") <= 30

Now, the workflow will sort the attachments by date, filter the files based on their date, and only keep the files that are within the last 30 days, and save the most recent attachments to the network folder. To schedule the workflow to execute every day, you can use the Alteryx Scheduler.

 

Attached is the workflow for your reference, you can edit it according to your needs.

Is there anything else I can help you with?

Labels
Top Solution Authors