Skip to content

Start from workflow/starter.json (upload, PDF text, rule classifier) or your finished lesson workflow.

Exercise 1: Notify the office

Task: Replace Notify Office (Exercise 1) with an email or Slack message for review cases and failed uploads, with the reason and (for reviews) the Drive link of the file in Needs Review.

Done when: uploading assets/samples/letter.pdf produces a "please review" message.

Hint

{{ $json.needs_review ? 'Please review: ' + $json.review_reason : 'Upload failed: ' + $json.upload_error }} plus {{ $json.file_link }}.

Exercise 2: Intake from email

Task: Process PDF attachments sent to a dedicated address (e.g. docs@yourfirm.com) automatically.

Done when: emailing the sample invoice to that inbox files it in the Invoices folder.

Hint

Gmail Trigger (Simplify off, Download Attachments on, filter by to:) → one item per PDF attachment → the same chain. The Has PDF? and Attach File logic already looks up the PDF by mime type; point them at the trigger instead of the webhook.

Exercise 3: Scanned documents

Task: When the PDF has no text layer, use a vision model to read it instead of sending it straight to review.

Done when: a scanned/photographed invoice is classified instead of landing in review with "no text layer".

Hint

After Rule Classifier, IF text_length < 20 → OpenAI node Analyze Image / document input with the binary → feed the returned text into the AI Classify step.

Exercise 4: Log every document

Task: Append a row per document to a Google Sheet: received at, original name, new name, type, confidence, method, counterparty, amount, folder, Drive link.

Done when: the sheet has one row per processed document, including review cases.