Extract Driver's License Data with n8n: Dropbox to Notion
Watch Dropbox license scans, call Cryvis POST /v1/documents/driver-license with required ISO alpha-3 country, and sync fields into Notion.
Driver's license OCR is country-specific. Cryvis requires a multipart country field (ISO 3166-1 alpha-3) alongside file so the correct schema runs — India vs USA vs UK are not the same JSON shape. This n8n tutorial watches a Dropbox folder, sends each scan with an explicit country code, and upserts a Notion database row.
PAN twin: Extract PAN card data. Multi-ID intake: Automate KYC. Hub: /blog/n8n.
Architecture
Dropbox /licenses/{COUNTRY}/scan.jpg
|
v
n8n: Watch files
derive country from folder name (IND, USA, ...)
|
v
POST https://api.cryvis.com/v1/documents/driver-license
-F file=@scan.jpg ($binary.data)
-F country=USA
-H "Authorization: Bearer ..."
|
v
Notion database: LicensesSupported countries
Pass exactly one of:
| Code | Country |
|---|---|
IND | India |
USA | United States |
VNM | Vietnam |
GBR | United Kingdom |
THA | Thailand |
IDN | Indonesia |
Anything else is rejected. Do not send US or IN — alpha-3 only.
Step 1: Dropbox layout
/licenses
/USA
/IND
/GBR
/VNM
/THA
/IDN
/_failed
/_doneFolder name = country parameter. This avoids a fragile manual mapping table inside n8n.
Step 2: Watch, download, and Set country
Dropbox Trigger on /licenses (or one trigger per country folder).
Dropbox → Download so bytes land in $binary.data.
Set node — compute country from path:
country = {{ $json.path.split('/')[2].toUpperCase() }}
# e.g. /licenses/USA/jane.jpg -> USAAdjust the path index to match how Dropbox returns path_display / path_lower in your node version. Prefer a dedicated Set field rather than inline string surgery in every expression.
IF node: country is one of IND, USA, VNM, GBR, THA, IDN. Else move to /_failed.
Step 3: Cryvis Driver License API
HTTP Request
| Setting | Value |
|---|---|
| Method | POST |
| URL | https://api.cryvis.com/v1/documents/driver-license |
| Authentication | Header Auth → Bearer |
| Body Content Type | Multipart Form-Data |
| Response Format | JSON |
| Part | Type | Required | Value |
|---|---|---|---|
file | Binary | yes | Input Binary Field = data |
country | Form Data (text) | yes | {{ $json.country }} |
cURL (USA example):
curl -X POST https://api.cryvis.com/v1/documents/driver-license \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "country=USA" \
-F "file=@drivers-license.jpg"Docs: /docs/api/extractDriverLicense · /apis/driver-license.
Step 4: USA response example
Shared identity/license fields plus US-specific extras:
{
"success": true,
"data": {
"full_name": "JANE DOE",
"date_of_birth": "1990-05-20",
"address": "123 Main St, Austin, TX 78701",
"license_number": "D1234567",
"issue_date": "2022-01-15",
"expiry_date": "2030-05-20",
"state": "TX",
"license_class": "C",
"restrictions": null,
"endorsements": null,
"sex": "F",
"height": "5-06",
"eye_color": "BRN"
}
}Always map common fields via {{ $json.data.full_name }}, date_of_birth, address, license_number, issue_date, expiry_date. Country extras when present:
| Country | Extra fields (examples) |
|---|---|
| USA | state, license_class, restrictions, endorsements, height, eye_color, sex |
| IND | vehicle_classes, blood_group, issuing_rto, father_name_or_guardian |
| GBR | categories, issuing_authority, sex, place_of_birth |
| VNM | license_class, place_of_issue |
| THA | license_type, national_id_number, blood_group, issuing_authority |
| IDN | license_type, blood_group, height, place_of_birth, issuing_authority |
Step 5: Notion + Switch
Notion properties: Name (title ← full_name), Country (select), License number, DOB, Address, Issue, Expiry, State/Region, Class, Restrictions, Endorsements, Sex, Height, Eye color, Dropbox path, Status.
Switch on country after HTTP so each output maps country-specific extras. Preserve country / dropbox_path in a Set before HTTP; after HTTP use {{ $('Set').item.json.country }}.
One Notion database with filtered views per country is enough — leave unused columns empty.
Step 6: Expiry, hygiene, errors
IF on expiry_date: expired / expiring_soon (< 90 days) / valid. Success → Move to /licenses/_done/{country}/. Error → /_failed/ + Notion Status error via Error Trigger. Omitting country → 400.
Multipart checklist
| Name | Type | Value |
|---|---|---|
country | Form Data | {{ $json.country }} |
file | n8n Binary File | Binary Property = data |
Both required. country=US is rejected — use USA. Without country subfolders, parse a filename suffix (jane_doe_USA.jpg) in Set, then IF-validate against the six codes.
Credits: 1 per PDF page or image.
Related reading
- Automate KYC multi-doc
- Extract PAN card data
- Convert PDFs to JSON
- Extract Indian vehicle RC
- /blog/n8n
CTA
Parse driver's licenses with country-aware schemas: /apis/driver-license. Docs: /docs/api/extractDriverLicense. From n8n, POST $binary.data as file plus text country (IND/USA/VNM/GBR/THA/IDN) to https://api.cryvis.com/v1/documents/driver-license with Bearer auth, then sync {{ $json.data.* }} into Notion.