Every 15 minutes
Read invoices saved to Dropbox and post the details
Each invoice PDF in the folder is read and its vendor, date, total and due date are posted for finance.
- Runs
- Every 15 minutes
- Apps
- Dropbox
- AI
- Yes, uses the built-in AI allowance
- Access
- files.content.read
Send this to your assistant
Create a ClickRuntime automation: when a PDF lands in my Dropbox /Invoices folder, pull out the vendor, invoice date, total and due date and post them to #finance in Slack.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A bookkeeper or office manager receives vendor invoices as PDFs dropped into a shared Dropbox folder, and someone has to open each one, find the vendor, invoice number, due date and total, and retype them into a tracker or tell the team. With thirty invoices a week, that is hours of typing, and a transposed digit in an amount or a missed due date turns into a late fee or an overpayment that is noticed only at reconciliation.
Every 15 minutes the automation detects new PDFs in the folder, downloads each one and uses ClickRuntime's built-in AI to extract the key fields, such as vendor, invoice number, due date and amount. It then posts those fields to Slack, so the person who approves payment can see the numbers without opening the file.
Small finance teams, agencies paying many suppliers and freelancers who handle their own bookkeeping benefit most.
What you get out of it
Due dates are seen the day invoices arrive
When the due date and amount appear in Slack within about fifteen minutes of upload, payment gets scheduled early. That avoids late fees and the awkward emails from suppliers asking why an invoice from last month is still open.
Less retyping, fewer typos
The fields are read straight from the document, so nobody types an invoice number or total by hand. A transposed digit in an amount can mean a wrong payment that takes weeks to untangle with the supplier.
Approvers do not need Dropbox access
The Slack post carries the facts an approver needs, so a manager can sign off from their phone without opening a folder. Decisions that used to wait for the bookkeeper to be at a desk happen the same afternoon.
Duplicate and unusual invoices stand out
Seeing every invoice in a stream makes it easier to notice the same number twice, an unexpected vendor or an amount far above normal. Those are the invoices that deserve a second look before any money leaves the account.
A running list of what has been received
The channel doubles as a log of incoming invoices with their key figures, so when a supplier asks whether you got their bill, the answer is a quick search rather than a hunt through the folder.
How it works
What happens, step by step
Every 15 minutes, ClickRuntime checks your Dropbox folder for new invoice PDFs.
It downloads each new invoice.
AI reads it and pulls out the vendor, invoice date, total and due date.
Those details are posted to your Slack channel.
Before it runs live
- Connect Dropbox
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
- Change what the AI looks for, or how it writes the result
- Add another app, for example also send it to Slack
- Combine it with other Dropbox steps into one automation
Under the hood
The code that runs this automation
import io, json
from pypdf import PdfReader
from clickruntime import on_trigger, report_fetched, state, notify, http, credentials, ai
SCHEMA = {"type": "object", "properties": {k: {"type": "string"} for k in ("vendor", "invoice_date", "total", "due_date")},
"required": ["vendor", "invoice_date", "total", "due_date"]}
@on_trigger
def run(event):
auth = {"Authorization": "Bearer " + credentials.connection("dropbox", "main")}
cursor = state.get("cursor") or http.post("https://api.dropboxapi.com/2/files/list_folder/get_latest_cursor", headers=auth, json={"path": "/Invoices"}).json()["cursor"]
page = http.post("https://api.dropboxapi.com/2/files/list_folder/continue", headers=auth, json={"cursor": cursor}).json()
pdfs = [e for e in page["entries"] if e[".tag"] == "file" and e["name"].lower().endswith(".pdf")]
report_fetched(len(pdfs))
if not pdfs:
return {"summary": "No new invoices"}
for f in pdfs:
raw = http.post("https://content.dropboxapi.com/2/files/download", headers={**auth, "Dropbox-API-Arg": json.dumps({"path": f["path_lower"]})}).content
text = "\n".join(p.extract_text() or "" for p in PdfReader(io.BytesIO(raw)).pages)[:8000]
x = ai.generate(f"Extract vendor, invoice date, total (with currency) and due date from this invoice.\n\n{text}", json_schema=SCHEMA, max_output_tokens=120).json
notify.slack(f"Invoice {f['name']}\nVendor: {x['vendor']} · Date: {x['invoice_date']} · Total: {x['total']} · Due: {x['due_date']}", channel="#finance")
state.set("cursor", page["cursor"])
return {"invoices": len(pdfs)}FAQ
Common questions
Which documents work best?
Which fields can be extracted?
What happens if a field cannot be found?
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
Get a summary of each new note or document
When a text, Markdown or PDF file is added, you get the key points by email.
See how it worksGet told when files land in a Dropbox folder
You get an email listing new files shortly after they show up in the folder.
See how it worksFile new uploads by year and month
Anything dropped in your inbox folder is moved into a dated archive folder, created when needed.
See how it worksKeep exploring
Set up “Read invoices saved to Dropbox and post the details” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.