ezeep Blog

Automate Print Invoicing for Coworking Spaces

Written by Clara Salomon | August 24, 2023

Automating print invoicing in coworking spaces simplifies operations and ensures fair cost recovery. This guide shows how to easily set up an automated system using ezeep, Google Sheets, and PayPal, freeing up valuable administrative time.

How to Prepare Your Google Sheets for Invoicing

Before beginning the invoicing process, organize your print data in Google Sheets. This involves setting up three distinct spreadsheets to manage calculations, import raw data, and aggregate costs per user.

1. Calculation Sheet

Use this sheet to define the printing costs per page. This creates transparency and ensures consistency for all users:

Paper SizePrice Per Page
Letter/A4$0.05
Tabloid/A3$0.10

Check these costs regularly and adjust them as needed to cover your coworking space’s operating expenses.

2. CSV Data Import

You can export print data from ezeep as a CSV sheet monthly. Create a dedicated sheet in Google Sheets to import this data. Such a sheet might look like this:

UserE-MailPaper SizeNumber of PagesCO2 Footprint
Maxmax@example.comLetter/A450250 g
Annaanna@sample.comTabloid/A330300 g

3. Aggregated Sheet

This sheet consolidates data from the CSV file and calculates the total cost per user. The query could look like the following:

=QUERY(CSV-Tabelle!A:D, "SELECT A, B, C, SUM(D) WHERE A != '' GROUP BY A, B, C ORDER BY A")

The result is a clear overview of the printing costs per user:

UserE-MailTotal Cost
Maxmax@example.com$2.50
Annaanna@sample.com$3.00

How to Automate Invoicing with Google Apps Script

Once your data is organized in Google Sheets, use Google Apps Script to automate the invoicing process, generating and sending payment links to users.

1. Open the Script Editor: In Google Sheets, find the Script Editor in Extensions > Apps Script.

2. Add script: Copy the following sample code and paste it into the Script Editor:

function sendPaymentLinks() { var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Aggregated Sheet"); var data = sheet.getDataRange().getValues(); for (var i = 1; i < data.length; i++) { var user = data[i][0]; var email = data[i][1]; var totalCost = data[i][2]; var paymentLink = createPaypalLink(email, totalCost); MailApp.sendEmail(email, “Payment for Printing Costs”, “Hello ” + user + “,
Here is the payment link for your printing costs: ” + paymentLink); }
}
function createPaypalLink(email, totalCost) { // Here you need to create the PayPal payment link based on the email and the total cost. // For example, you can use PayPal's “create payment” API.
// Alternatively, you can also create the payment link using string operations.
}

3. Permissions and run: Ensure you have all required permissions and run the script to send payment links to the users.

Summary

Managing a coworking space includes handling services like printing, which can be complex to invoice. An automated workflow combining ezeep, Google Sheets, and PayPal simplifies this process and ensures members pay their fair share.

Simplify print invoicing and free up administrative resources. Learn more about ezeep print management.