Skip to content

Automate your Proposals and Offers Part 2

You can only do this once you've created the templates and script with the help of clearxx Assistant and the clearxx Agent & Build Workspace & Cline. See the article Automate Your Proposal Creation Part 1 for that part.

Folder Structure

Locally on you computer, create a folder, e.g. YourFirstName_LastName.

Underneath it, create two folders: 1. Offers 2. Template

In the Template folder, save these files from the clearxx Agent & Build Workspace (in the EXPLORER, what Cline created):

  1. generate_proposal.py
  2. Template_Proposal_EN.docx
  3. start_mac.command (for Mac users)
  4. start.bat (for Windows users)
  5. Variables_Input_Template_EN.xlsx
  6. requirements.txt
  7. README_Universal (this file)

In the Offers folder, proceed as follows:

  1. Every time you create a new offer, create a folder with the customer name and date. E.g. "CustomerName_dd.mm.yyyy" (an underscore follows "CustomerName")
  2. In this customer folder, copy the empty Variables_Input_Template_EN.xlsx
  3. Give the Excel file the same name as the folder, but add "Input_" in front, so the file name is "Input_CustomerName_dd.mm.yyyy" (an underscore follows "Input")
  4. Fill in the Excel file

screenshot

Running the start.bat or start_mac.command file:

  1. Windows users In the Template folder, double-click start.bat A window with a security question may appear. E.g.: "The publisher could not be verified. Do you want to run this software?" Uncheck "Always ask before opening this file". Then click "Run". A black terminal window will briefly open. You don't need to do anything.
  2. Mac users In the Template folder, double-click start_mac.command
  3. The very first time you double-click start_mac.command: macOS may ask whether the file is allowed to open ("cannot be opened because it is from an unidentified developer"). If this happens: right-click start_mac.command → select "Open", then confirm "Open" again in the dialog. This is only necessary the first time.
  4. The script runs automatically.

Result:

  1. Go to your customer folder
  2. There you'll find a Word document titled Proposal_CustomerName_dd.mm.yyyy — all values have been filled in correctly.

screenshot

One-Time Setup on Windows PC so the Script Can Run Locally on the Computer

Before first use: install Python and openpyxl and set up the required packages.

Instructions for Windows, all via the Command Prompt

  1. Open the Command Prompt: press Windows key, type cmd, press Enter. A window with a black background opens (Command Prompt). You'll see the prompt:
  2. C:\Users\YourUsername
  3. After the > you can enter commands.
  4. Check whether Python is already installed. Type this in, always without the ' and ': python --version If a version number appears, skip to step 4. If an error message appears ("'python' is not recognized as an internal or external command"), continue to step 3.
  5. Install Python. Type this in (here and below always without ' and ' at the start and end) and press Enter: winget install Python.Python.3.12 If a security prompt appears asking to allow the installer to make changes, click "Yes". Text will scroll by — wait until a new line with a blinking cursor appears again (done).
  6. Close the Command Prompt and reopen it (press Windows key, type cmd, press Enter) — this is needed so Windows recognizes the newly installed Python.
  7. Check that the installation worked. Type in: python --version A version number should appear (e.g. "Python 3.12.x"). If an error message appears instead, repeat step 3.
  8. Change into the Template folder:
  9. In the Command Prompt, type: cd (cd, then a space, don't press Enter yet).
  10. In File Explorer, navigate to the Template folder (the folder that contains generate_proposal.py and requirements.txt).
  11. Drag the Template folder directly from the File Explorer window into the Command Prompt window (drag & drop) — the full path will automatically appear after cd.
  12. Press Enter.
  13. Now install the required packages. Type this command in and press Enter: pip install -r requirements.txt Text will scroll by — wait until a new line with a blinking cursor appears again (done).
  14. Close the Command Prompt window.

One-Time Setup on MacBook so the Script Can Run Locally on the Computer

Before first use: install Python and openpyxl and set up the required packages.

Instructions for macOS, all via the Terminal command line

  1. Open Terminal: press Cmd + Space, type Terminal, press Enter. A window with a white/black background opens (Terminal). You'll then see the prompt:
  2. YourMacBook ~ % (or possibly YourMacBook: yourname$ if the MacBook is older than 2019)
  3. after the % sign you can enter commands.
  4. Check whether Homebrew is already installed. Type this in, always without the ' and ': brew --version If a version number appears, skip to step 4. If an error message appears ("command not found"), continue to step 3.
  5. Install Homebrew. Type this in (here and below always without ' and ' at the start and end) and press Enter: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" It may ask for the Mac password — type it in (nothing will be displayed as you type, that's normal) and press Enter. At the end the Terminal will show two to three lines starting with echo or export — copy these exactly as shown and paste them into the Terminal one at a time, confirming each with Enter. This adds Homebrew to the system.
  6. Close Terminal and reopen it (Cmd + Space, Terminal, Enter) — necessary so Homebrew is recognized.
  7. Install Python. Type this in and press Enter: brew install python Text will scroll by — wait until a new line with a blinking cursor appears again (done).
  8. Check that the installation worked. Type in: python3 --version A version number should appear (e.g. "Python 3.12.x"). If an error message appears instead, repeat step 5.
  9. Change into the Template folder:
  10. In Terminal, type: cd (cd, then a space, don't press Enter yet).
  11. In Finder, navigate to the Template folder (the folder that contains generate_proposal.py and requirements.txt).
  12. Drag the Template folder directly from the Finder window into the Terminal window (drag & drop) — the full path will automatically appear after cd.
  13. Press Enter.
  14. Now install the required packages. Type this command in and press Enter: pip3 install -r requirements.txt Text will scroll by — wait until a new line with a blinking cursor appears again (done).
  15. Close the Terminal window.

Travel Costs — Two Options

In the input file, there are two ways to specify travel costs:

  • Calculated: fill in travel_hours (round-trip travel time combined, in hours). The travel cost is then calculated from travel_hourly_rate × travel_hours.
  • Flat rate: fill in travel_flat_rate, leave travel_hours empty. The entered amount is used directly.

If both fields are left empty, the travel cost line is omitted entirely from the proposal.

Important

  • If only 1 session is specified, the subtotal line "Total cost (net)" is omitted and the final line reads only "Total cost (gross)" instead of "Total cost for X sessions (gross)".
  • Before sending, open the finished proposal in Word and check whether all placeholders were correctly replaced (no {{...}} and no blue text visible anymore).
  • The hourly rate (Hourly_Rate) and the VAT rate (VAT_Rate) are semi-fixed — adjust them directly in the copy of the input file for the respective proposal if needed.