What This Workflow Does
Upload a document (PDF, PNG, JPEG) via a web form and let easybits Extractor classify it into one of your defined categories. Based on the classification result and a confidence score, the document is automatically sorted into the correct Google Drive folder. Low-confidence or unrecognized documents are flagged for manual review via Slack.
How It Works
- User uploads a file through the hosted web form
- The binary file is converted to base64 and sent to easybits
- easybits returns a document_type and confidence_score
- The classification result is merged with the original file binary
- If confidence > 0.5 → routed to the matching Google Drive folder
- If confidence ≤ 0.5 or no category match → uploaded to Needs Review folder + Slack alert
Supported categories:
medical_invoice · restaurant_invoice · hotel_invoice · trades_invoice · telecom_invoice
Setup Guide
1. Set Up Your easybits Extractor Pipeline
- Go to extractor.easybits.tech and create a new pipeline
- Add two fields to the mapping: document_class and confidence_score
- In each field's description, paste the corresponding classification or confidence prompt that tells the model how to analyze the document
- The classification prompt should return exactly one category label – or
null if uncertain
- The confidence prompt should return a decimal number between 0.0 and 1.0
- Save & test the pipeline, then copy your Pipeline ID and API Key
2. Set Up Google Drive
- Create a folder in Google Drive for each category: Medical, Restaurant, Hotel, Trades, Telecom, and Needs Review
- In n8n, go to Settings → Credentials and create a Google Drive OAuth2 credential
- This requires a Client ID and Client Secret from the Google Cloud Console (APIs & Services → Credentials → OAuth 2.0 Client ID)
- Make sure the Google Drive API is enabled in your Google Cloud project
- Open each of the 6 Google Drive upload nodes in this workflow and select the correct target folder
3. Set Up Slack
- In n8n, go to Settings → Credentials and create a Slack API credential
- You'll need a Slack Bot Token – create a Slack App at api.slack.com/apps, add the
chat:write scope, and install it to your workspace
- Create a channel for review notifications (e.g.
#n8n-invoice-review)
- Invite the bot to that channel
- Open the Review Message node and select the correct channel
4. Connect the easybits Node
- Open the easybits Extractor (Classification) node
- Replace the pipeline URL with your own:
https://extractor.easybits.tech/api/pipelines/YOUR_PIPELINE_ID
- Create a Bearer Auth credential using your easybits API Key and assign it to the node
5. Activate & Test
- Click Active in the top-right corner of n8n
- Open the form URL and upload a test document
- Check the execution log to verify the classification result
- Confirm the file lands in the correct Google Drive folder
- Test with an unrecognized document to verify the Slack notification fires