Skip to main content

Example: PDF Forms at Scale

Scenario: You have a government form, application, or standard document that needs to be filled out many times with data from different source documents.

Overview​

Upload 100 source documents → Parse all →
Fill the same PDF form 100 times → Download each filled form

Manual approach (slow)​

  1. Upload a source document → parse it
  2. Open the PDF form → auto-detect mappings → download
  3. Repeat 100 times

This works, but it's manual. For large volumes, use a workflow.

Automated approach (fast)​

Step 1: Prepare your PDF form template​

  1. Go to PDF Forms in the sidebar
  2. Upload your fillable PDF form
  3. Test it with one source document to verify the mappings work

Step 2: Prepare your extraction template​

Create an extraction template matching the fields your PDF form needs. Test it on a few source documents.

Step 3: Build a batch workflow​

  1. Create a new workflow with a Webhook trigger
  2. Add a Parse Document node (with your extraction template)
  3. Add a Fill Template node (select your PDF form)
  4. Add a Send Email node or Upload to Drive node

Step 4: Trigger for each document​

Call the webhook for each source document:

for file in documents/*.pdf; do
curl -X POST https://api.qomplement.com/api/webhooks/trigger/YOUR_TOKEN \
-F "file=@$file"
done

Each document is parsed and the PDF form is filled automatically.

Tips​

  • Test on 5 documents first — verify both extraction and form filling before processing hundreds
  • Use clear extraction fields — the clearer your extraction template, the better the form fills
  • Check form field types — checkboxes, dropdowns, and text fields all need appropriate values
  • Monitor the workflow — check for failures during batch runs