Collect last month's invoices from vendor portals with no API
On the 1st of every month we sign into each vendor portal, file last month's invoices in Google Drive, and flag any vendor that is missing one.
On the 1st of every month at 6am, collect last month's invoices from the vendor portals that have no API and no email delivery, so finance stops downloading them by hand. Use a cron trigger set to 06:00 on the 1st. The reporting period is always the previous calendar month, so a run on 1 August 2026 collects invoices dated July 2026.
Keep a configurable list of vendor portals at the top of the workflow. Each entry should hold the vendor name, the portal login URL, the path or link text that leads to the billing or invoices page, and a stable profile name such as invoices-acme. I want to add or remove a vendor by editing this list and nothing else.
For each vendor, use Kernel Create Profile once to make a persistent browser profile named for that vendor. Profiles are what make this workflow practical: they carry the logged-in state across runs, so we are not repeating passwords and MFA on every portal every month. If a profile with that name already exists, reuse it rather than creating a duplicate.
Make the setup notes say clearly that the first run for each portal needs a manual login. Create the browser session, open the live view URL that Kernel returns, and have a person sign in by hand including any two factor step. Because the session is attached to the profile with save_changes enabled, that logged-in state is written back to the profile and every later run starts already authenticated.
On each scheduled run, work through the vendors one at a time rather than in parallel, since concurrent browser sessions are plan-capped. For each vendor use Kernel Create Browser Session, attaching that vendor's profile by name with save_changes turned on so any refreshed session cookies are preserved for next month.
Drive the portal with Kernel Execute Playwright Code in Browser: navigate to the billing or invoices page, find the row for the target month, and click through to download the invoice PDF. Every portal is laid out differently, so inspect what is actually on the page and adapt, rather than assuming a fixed selector will work. While you are on the billing page, also capture the invoice number and the invoice total from the page itself, since that is usually more reliable than parsing them back out of the PDF.
If a portal shows a login screen instead of the billing page, the saved session has expired. Do not treat that as a missing invoice. Record the vendor as needing re-authentication and move on to the next one.
After triggering a download, use Kernel List Browser Files on the browser's download directory to see what actually landed, then Kernel Read Browser File to pull each PDF back. Confirm a file really arrived before recording that vendor as collected. When a vendor is finished, use Kernel Delete Browser Session to close the session, and do this even when that vendor failed, so sessions are never left running.
Once every vendor has been processed, use Google Drive Create Folder to create one folder named for the reporting month, for example 'Invoices 2026-07', inside a parent folder I will specify. Then use Google Drive Upload File (Multipart) to put each collected PDF into that folder, naming files as vendor, invoice number and month. Keep the shareable link Drive returns for each file. Multipart upload covers files up to 5MB, which is fine for ordinary invoice PDFs; if something comes back larger, flag it in the summary rather than dropping it silently.
Finish with a single Slack Send a Message to the finance channel. List every vendor that was collected with its invoice number, the amount, and the Drive link to its PDF. Then, in a clearly separate section, explicitly name every vendor where no invoice was found for the period, and every vendor that needs re-authentication. This missing section matters more than the happy path: a run that quietly skipped a vendor is worse than no automation, because silence gets read as paid. Include the Drive folder link and a count such as '9 of 11 invoices collected' so it is obvious at a glance whether the month is complete, and post the message even when nothing at all was collected.
What does this prompt do?
- Signs into each of your vendor portals using a saved login, so nobody has to redo passwords and two factor codes every month
- Finds last month's invoice on each billing page and downloads the PDF, adapting to however that particular portal is laid out
- Creates a Google Drive folder named for the month and files every invoice inside it
- Posts one Slack message listing each vendor with its invoice number, amount and Drive link, and explicitly names any vendor where no invoice was found
What do I need to use this?
- A Kernel account, which provides the cloud browsers that do the signing in and downloading
- A Google Drive account, plus the parent folder where you want each month's folder to be created
- A Slack workspace and the channel where finance should receive the summary
- The login page and billing page for each vendor portal you want covered
- One manual sign in per portal on the very first run. This is where you get past two factor, and it only has to happen once per portal.
How can I customize it?
- Change the schedule, for example run on the 5th instead of the 1st to give vendors time to issue invoices, or run weekly for high volume suppliers
- Add or remove vendor portals from the list as suppliers change
- Change the Drive folder naming and where the monthly folders live, for example 'July 2026' instead of '2026-07'
- Change who receives the summary, or route the missing invoice callouts to a different channel than the full list
FAQs
What happens the first time it runs?
Will this work on a vendor portal that has no API?
What if a vendor has not issued an invoice yet?
What happens if a saved login stops working?
Where are my portal passwords kept?
Related templates
When your flight moves, your calendar times get corrected automatically and you get a Slack note naming the meetings you're about to miss.
Every 15 minutes, forwarded phishing reports get traced back to the server that really sent them, with a verdict in Slack and the worst senders reported.
Every weekday at 7am, sign in to the tender portals you track, filter new notices against your bid criteria, and open a deal for the ones worth chasing.
Every Monday, rank the week's matches by expected demand, put the big ones on your venue calendar, and post a rota-ready summary to Slack.
Every Tuesday we pull your best new reviews, draft social captions, email testimonials and product page quotes, then stage them in Notion for approval.
Every weekday morning, unfulfilled orders get an address check: harmless typos fixed automatically, risky addresses held with a note to the customer.
Stop downloading vendor invoices by hand.
Set this up once and finance starts each month with last month's invoices already filed in Drive, and a Slack summary that names anything still outstanding.