Cedar Works
- Client
- Client A
- Intake
- 4 tabs filled
file-AWhen a client signs, the software fills in a new funding sheet for them, makes a PDF ready to send to a bank and emails the client. Each client gets a new sheet of their own, instead of a shared file where details could get mixed up.
CreditDesigned and built by our founder, as lead developer for a partner agency.
Follow two clients
Both runs start from the same blank template, but each client's details go into their own new sheet.
file-Afile-BEach run writes only to its own new sheet.
After each client signed, someone still had to copy, fill in and file their funding sheet by hand.
Fundwell Advisory helps US businesses prepare funding applications. Clients submit their details, ID and company documents, then sign an agreement. The team needs that information in a standard funding sheet and in a tidy PDF it can send to a bank.
The problem
When two clients signed close together, the old setup, built with Zapier to move data between tools, could write one client's details into the other client's sheet.
The intake form produced a messy PDF. Someone had to reformat it before it could go to a bank.
Each client needed a sheet copied, filled in, named and filed. The automation meant to do this had stopped working.
The intake form was rebuilt several times, so the same question had different field IDs. The old links between the form and the sheet kept breaking.
What was built
The PDF brings together personal and business details, a short business description and the uploaded documents, in up to 5 pages. Social Security and bank numbers are hidden on the page.
The client's answers come from GoHighLevel, the team's customer system. Fields are matched by name, and any field that cannot be matched is logged for review.
AI writes the business description and suggests an industry code. Codes that lenders see as risky, and any failed AI step, are marked for a person to review.
An email sends the new sheet link to the client, with the team copied. If a run fails three times, the team gets the client's name and the reason.
Control and safety
The client must use the same email on the intake form and on the signed agreement. If the client cannot be found, the run stops and alerts the team instead of building a half-empty file.
For technical readers
One background task checks the signed agreement and finds the client's intake answers. It writes the business profile, copies the master into a new sheet, builds the PDF and sends the email. Each run keeps its own data and sheet ID.
| Layer | Technology | Why it was chosen |
|---|---|---|
| Workflow | Trigger.dev v4, TypeScript | One task runs the 10 steps, records progress and retries failures. |
| Signing | PandaDoc webhook, n8n relay | An n8n relay passes the signing notice to the task, which checks the signature itself. |
| Client data | GoHighLevel REST API | Finds the client by email in GoHighLevel and reads the intake answers by field name. |
| Files | Google Sheets and Drive APIs | Copies the template sheet, fills nine sections in one go and saves the PDF. |
| pdf-lib | Lays out the PDF in code, so the text wrapping, page breaks and attached ID and company documents come out right. | |
| AI | Gemini 3 Pro via OpenRouter | Drafts a business description and suggests a North American Industry Classification System (NAICS) code. |
| Validation | Zod | Checks the signing notice, the client data and the AI's answer before they are used. |
| Hosting | Trigger.dev cloud · 1 vCPU / 2 GB | Gives enough memory to build PDFs and allows at most three runs at the same time. |
| Checks | Vitest, MSW, Biome, TypeScript strict | Automated tests use simulated services. Twelve integration scripts test the real services. |
The old automation could mix data when two clients signed close together. Now each run takes the new sheet's ID from its own copy step. Nothing is shared between runs, and a test checks that nothing can write to the master.
Three versions of the form had left 51 fixed IDs for 26 fields. The run now reads all 214 custom fields and finds the 26 it needs by name. It ignores differences in punctuation and keeps a saved list as a backup. A field it cannot match is logged, because a loose guess could put sensitive data in the wrong place.
The AI's answer is checked against a fixed format. Risky industry codes stay in the sheet, marked red for review. When the AI step fails, the code 000000 is marked orange. The file can still be finished, and the decision is left to a person.
Each attempt starts from the signing notice and creates a fresh sheet. Up to three attempts run, with a longer wait before each one. If the last one fails, an alert names the client and the step that failed. Retrying does not guarantee that only one file is created.
The PDF generator measures the text so it wraps correctly. Pages 4 and 5 appear only when ID or company documents were uploaded, so the file has no empty pages.
Is it a fit?
Conducted by Apurva · Not a sales call
Or write to care@brownmind.com