Python script that automates the generation and sending of receipts from orders data written in a Google Sheets.
It was initially designed for the student association CSDesign.
- 📥 It first reads the receipts data from Google Sheets,
- 📄 Then, it generates the receipts it can deal with,
- 📨 Next, the created receipts are all sent by email to the corresponding clients,
- ✏️ Finally, the online spreadsheet is updated.
- Add the following files to the root folder (*):
- .env containing the same variables as described in example.env.
- associations_addresses.json containing the same variables as described in example.associations_addresses.json.
- A .png image of your association's logo in the current directory and call it logo.png. The image will be resized.
- credentials.json which is provided by Google Cloud when requesting an access to Google Sheets API.
- Install the required packages by running
pip install -r requirements.txt
in a terminal (at the same level as the requirements.txt file) - Run the script
process_all_orders.py
. This will first show you a summary of what will be done and ask for your confirmation. It will then process all the receipts for which it is possible.
(*) If you are a member of CSDesign, you can ask a previous tresurer to send you those files.
Here is a high-level visualization of the working of this program.