Heather Kobeck's profile

Power of Powershell

The Power of PowerShell:
CSV to Email
The purpose of this script is to pull data fields from a CSV file and place them in a custom template. This grants the user the benefit of quickly writing custom emails or other similarly formatted documents. This cuts down on the time spent copying, pasting, and filling out the documents. It also eliminates the chance for human error of misplaced data. This script has been programmed to handle emails. It will open Microsoft Outlook and place the email body in a draft. 
The first part of the script walks the user through the interface above. It asks for the user's name to add a signature at the bottom of emails. Then is asks for the user to provide it the CSV file path and lastly where the user would like to store backups of the produced email text.
The program reads in the template file and replaces the tags with the corresponding field data from the given CSV file. It loops through each row of the CSV and creates a text file for each of them.
The second stage of the script produces a folder in the given destination path called "emails". It then stores the filled in text files by name field given by the csv file. These act as a backup in case the user needs a copy of the documents later on.

Once the text files are made, the program will loop through and place each filled out text form into a draft in Outlook. It gives a custom subject line and places the created text into the email's body. From there, the user can look over the draft and send it. 



​​​​​​​
Code can be viewed at: https://github.com/Heather-Kobeck/Hackathon.git

Power of Powershell
Published:

Power of Powershell

Published: