We clean our rooms, we clean out the garage, we even have Spring cleaning, but how many of us can say that we keep a clean inbox? It’s not that we don’t want to keep things in order, but in today’s technical age, we face an endless stream of invites, attachments, and internal and external messages, and because of this, things are bound to get lost. Have no fear though, Pragmatic Works is here with hope!
Using the Email Source within Task Factory, we can easily scrape through our inbox, targeting different attachments and emails to or from specific individuals, allowing us to quickly and accurately pull exactly what we want from our Inbox, Outbox, or any specified folder.
In this video demo, I will show you from start to finish how to use the Email Source to do just that.
- In my example, using the data flow named Retrieve Attachment for Email, this task will utilize the Connection Manager to target my Outlook 365 and grab all attachments and put them into a directory.
- From here, I can then filter which columns I want to grab and the columns I interact with will populate a query.
- This query will look for the iterations where my chosen columns are inside the title and in which attachments exist.
- I then execute the task in the package and it targets my Outlook and will put inside folders for All Attachments, 2 Excel files and one PowerPoint. Once finished, I see in the folder that it will populate, so each attachment gets its own folder.
- It will also populate a folder for any images or items with a signature. I don’t want these, but I don’t want to go through each attachment file to remove any I don’t need, such as unwanted images.
- Using native SSIS components, I can create a ForEach Loop and set up a ForEach Loop Enumerator to do this.
- Once the task is complete, I go to File System Task and I can move the files I wanted to capture and move them from the All Attachment folder to a folder I created (I called my folder Attachments That I Want).
- You can also add a step that will purge the items you no longer want, automatically.
This barely scratches the surface of what we can accomplish with the Task Factory Mail Source, and this video only consisted of connecting to Outlook. I encourage you to download your free trial of Task Factory today and see which email providers you can connect to and find new and exciting ways to improve your SSIS, simplify your daily routine and start keeping a clean Inbox!