A complete client file, built automatically after each client signs

When 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.

Client: Fundwell AdvisoryBusiness funding consulting

CreditDesigned and built by our founder, as lead developer for a partner agency.

Follow two clients

Two clients sign, and each gets a separate file

Both runs start from the same blank template, but each client's details go into their own new sheet.

From signature to file
Master funding sheetBlank template · nothing writes to it
Client AAgreement signed
Funding sheet

Cedar Works

Client
Client A
Intake
4 tabs filled
New sheet IDfile-A
PDF linked Email sent
Client BAgreement signed
Funding sheet

Willow Studio

Client
Client B
Intake
4 tabs filled
New sheet IDfile-B
PDF linked Email sent

Each run writes only to its own new sheet.

About Fundwell Advisory

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.

Client
Fundwell AdvisoryA US business-funding consultancy
Industry
Business funding · United States
How they sell
An intake form, then a signed agreement

The problem

The old process could put one client's details in another client's file

  • Client details went into the wrong sheet

    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 PDF needed reformatting by hand

    The intake form produced a messy PDF. Someone had to reformat it before it could go to a bank.

  • Every client meant the same manual work

    Each client needed a sheet copied, filled in, named and filed. The automation meant to do this had stopped working.

  • Changing the form broke the automation

    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 client's file is filled in before the team opens it

  • A PDF ready for the bank

    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 sheet is filled in from the intake form

    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 drafts, and a person checks

    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.

  • The client gets their sheet link

    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

If the email does not match, the run stops and tells the team

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.

  • Each run keeps its own file. The new sheet's ID is used only inside that run. The master template is protected, so nothing writes to it.
  • The signing notice is checked. A notice from PandaDoc, the e-signature tool, is rejected if its signature is not valid. No work starts until it passes.
  • Some industry codes need a person to review them. Risky codes are marked red, and AI failures are marked orange. The file still finishes, and the marked code waits for a person to review it.
  • Failures are recorded. The dashboard shows which step each run has reached. After three failed attempts, the team gets an email alert.

For technical readers

How the system works

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.

Agreement signedPandaDoc → n8n relay
Check and find clientSignature + matching email
Prepare the detailsIntake + AI business profile
Create a new sheetCopy, fill and name
PDF and emailSave PDF; send sheet link

In more detail

Technology used (9 parts)Each part of the system, and why it was chosen.
LayerTechnologyWhy it was chosen
WorkflowTrigger.dev v4, TypeScriptOne task runs the 10 steps, records progress and retries failures.
SigningPandaDoc webhook, n8n relayAn n8n relay passes the signing notice to the task, which checks the signature itself.
Client dataGoHighLevel REST APIFinds the client by email in GoHighLevel and reads the intake answers by field name.
FilesGoogle Sheets and Drive APIsCopies the template sheet, fills nine sections in one go and saves the PDF.
PDFpdf-libLays out the PDF in code, so the text wrapping, page breaks and attached ID and company documents come out right.
AIGemini 3 Pro via OpenRouterDrafts a business description and suggests a North American Industry Classification System (NAICS) code.
ValidationZodChecks the signing notice, the client data and the AI's answer before they are used.
HostingTrigger.dev cloud · 1 vCPU / 2 GBGives enough memory to build PDFs and allows at most three runs at the same time.
ChecksVitest, MSW, Biome, TypeScript strictAutomated tests use simulated services. Twelve integration scripts test the real services.
5 engineering decisions that matteredThe problem, what was done, and what it changed.
  1. Each run uses only its own sheet

    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.

  2. Form fields are matched by exact name

    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.

  3. AI failures are shown, not hidden

    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.

  4. A retry starts again from the beginning

    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.

  5. Extra pages appear only when needed

    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.

Testing and build recordHow it was tested, and the build by the numbers.

Quality and reliability

  • The build record reports 227 automated tests across 8 files, covering client lookup, field mapping, email, AI, Drive, PDF, sheet writes and the full workflow.
  • Specific tests check that each run gets its own sheet ID and that nothing writes to the master template.
  • Twelve integration scripts test the real services. A test with three clients at once is listed on the release checklist; this source records no result.
  • Each run is limited to 10 minutes. No more than three runs happen at once, to limit the load on outside services.
  • The signing notice's HMAC signature is checked with a timing-safe comparison, which helps prevent the check's response time from revealing signature details. Types, lint and formatting are checked after changes.

By the numbers (build)

  • 124 commits from 15 January to 18 February 2026, about 5 weeks.
  • About 6,200 lines of TypeScript outside tests, with a 613-line main task and 7 service modules.
  • 227 automated tests across 8 files; 12 integration scripts.
  • 9 sections of data across 4 sheet tabs, plus 1 cell for the PDF link.

Is it a fit?

Could this work for your team?

  • You prepare files for lenders. Funding, mortgage and insurance teams often collect the same details more than once.
  • You handle several clients at once. Each client's documents need their own place, even when two clients sign at the same time.
  • Your team keeps reformatting paperwork. A standard sheet and PDF can be filled in from the intake form you already use.
  • You use different tools. We can change the signing tool, the customer system and the document layout. You decide which steps need a person.

What happens after your client signs?

Conducted by Apurva · Not a sales call