Python Automation

Email Sales Report

Posted by August 30, 2021 · 1 min read

Project:

Here is the step-by-step python script to send an automatic email. A specific case is a Sales Report, but you can create any data report type.

Dataset.

First Step:

Do your analyses. This case creates some groups by filtering mall revenue, quantity, and average ticket.

group-by
Click here to see my Python Project.

Second step:

This specific library is more familiar to work with Outlook applications. If it is not working with Gmail, Yahoo or others emails packages check possible alternatives as Yagmail.

report-email

If you create your script as pynb(jupter) you need to save/download the document as python exec file (py).
File>> Download as>> Python(.py)

Last Step:

To automate your process you need to open Task Scheduler.

For our proposal, you can "create basic task..."

task-email

Now you can create the frequency of the trigger.

task-email

Because we create one exec python file, you will select "start a program".

task-email

Now to start the program, you need to select python exec location as the "program/script".

"the argument" will be the name of your py file.

"Start in" will be the location where your py file is.

task-email

    Programming Language:

  • Python
  • Pandas
  • win32
  • OutPutKey
  • TaskSchedule