On a schedule
Add expenses from a sheet into QuickBooks
Expenses your team lists in a Google Sheet are added to QuickBooks within the hour and marked as uploaded.
- Runs
- On a schedule
- Apps
- Google Sheets, QuickBooks
- AI
- Not needed
- Access
- accounting write; sheet editor
Send this to your assistant
Create a ClickRuntime automation: every hour, create a QuickBooks expense for each new row in my Expenses sheet and mark the row as uploaded.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
Staff spend on cards and cash all month: parking, software, client lunches. The easiest way for them to record it is a shared sheet, but someone then has to enter every line in QuickBooks, usually in a rush before the month closes.
Moving each row into QuickBooks as it's added keeps the books current and leaves the bookkeeper reviewing and categorising, not typing.
What you get out of it
Books stay current
Expenses reach QuickBooks within the hour, so profit and cash figures reflect what's actually been spent.
A simple way for staff to record spend
A sheet with date, payee, amount and category is something anyone can fill in on their phone.
No month-end backlog
The bookkeeper checks entries as they arrive instead of entering a month at once.
Nothing entered twice
Each row is marked once uploaded, so it can't be created again.
How it works
What happens, step by step
Every hour, ClickRuntime reads your Expenses sheet.
It picks out rows that aren't marked as uploaded.
It creates an expense in QuickBooks for each one, using the date, payee, amount and category in the row.
It marks the row as uploaded with the QuickBooks reference, so the expense is never added twice.
Before it runs live
- Connect your Google Sheets account and pick the spreadsheets it may use
- Connect QuickBooks
What you get
Build your own
Need it to work differently?
Your own rules
Conditions, thresholds, filters and exceptions, written the way you'd explain them to a colleague.
Any number of apps
One automation can read from one app and update several others. Over 248 apps are ready, and anything with an API works too.
AI where it helps
Summaries, classification, extraction and drafts use ClickRuntime's built-in AI, with no extra key.
On a schedule or on each event
Runs as often as every 5 minutes, or the moment an app sends an event, and keeps track of what it already handled.
Changes you can ask for
- Act only on the items that match your own rules, and skip the rest
- Add an AI step, for example to summarize, sort or draft a reply
- Add another app, for example also send it to Slack
- Combine it with other Google Sheets and QuickBooks steps into one automation
Under the hood
The code that runs this automation
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from clickruntime import on_trigger, credentials, http, report_fetched
SHEET_ID = "your-spreadsheet-id"
BANK_ACCOUNT = "35" # QuickBooks account the money is paid from
API = "https://quickbooks.api.intuit.com/v3/company/1234567890" # your QuickBooks company id
def qb(method, path, **kw):
r = http.request(method, API + path, params={"minorversion": 73, **kw.pop("params", {})}, **kw, headers={"Accept": "application/json", "Authorization": "Bearer " + credentials.connection("quickbooks", "company")})
return r.raise_for_status() or r.json()
@on_trigger
def run(event):
sheets = build("sheets", "v4", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False).spreadsheets()
rows = sheets.values().get(spreadsheetId=SHEET_ID, range="Expenses!A2:F").execute().get("values", [])
todo = [(i, r) for i, r in enumerate(rows, start=2) if len(r) >= 5 and (len(r) < 6 or not r[5])]
report_fetched(len(todo))
if not todo:
return {"summary": "Nothing new"}
accounts = {a["Name"]: a["Id"] for a in qb("GET", "/query", params={"query": "select * from Account where AccountType = 'Expense'"})["QueryResponse"]["Account"]}
for i, (day, payee, desc, amount, category, *_) in todo:
p = qb("POST", "/purchase", json={"PaymentType": "CreditCard", "AccountRef": {"value": BANK_ACCOUNT}, "TxnDate": day,
"PrivateNote": f"{payee}: {desc}", "Line": [{"Amount": float(amount), "DetailType": "AccountBasedExpenseLineDetail",
"AccountBasedExpenseLineDetail": {"AccountRef": {"value": accounts[category]}}}]})["Purchase"]
sheets.values().update(spreadsheetId=SHEET_ID, range=f"Expenses!F{i}", valueInputOption="RAW", body={"values": [[f"Uploaded {p['Id']}"]]}).execute()
return {"uploaded": len(todo)}FAQ
Common questions
Which account is the expense paid from?
How is the category chosen?
Can I attach receipts?
What permissions does it need?
Does it need AI?
How many runs does it use?
Can I change how it works?
Related
You might also like
Turn rows in a billing sheet into QuickBooks invoices
Each new row in your billing sheet becomes a QuickBooks invoice, and the invoice number is written back into the row.
See how it worksWelcome every new QuickBooks customer by email
Each customer you add to QuickBooks gets a welcome email from your Gmail, and is logged in a sheet so nobody is welcomed twice.
See how it worksLog emailed supplier invoices in a sheet and create bills once approved
Supplier invoices from your inbox are logged as rows in your payables sheet, and each one becomes a QuickBooks bill when you mark it Approved.
See how it worksKeep exploring
Set up “Add expenses from a sheet into QuickBooks” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.