Extract PAN Card Data with Zapier: Google Drive to Google Sheets
Watch an India-KYC Drive folder, call Cryvis POST /v1/documents/pan with multipart file via Custom Request, and append PAN number, name, and holder type to Google Sheets.
Indian KYC packs often land as PAN card scans in a shared Drive folder before anyone opens a CRM. This Zap watches an India-KYC folder, posts each new file to Cryvis POST /v1/documents/pan, and appends structured rows to Google Sheets — including holder_type and pan_structure fields you can use for Individual vs Company routing.
Multi-document HubSpot flow: Automate KYC. Driver's license companion: Extract driver's license data. Hub: /blog/zapier.
Architecture
Google Drive
/India-KYC/pan-inbox/
|
v (New File in Folder)
Zapier
|
v
Webhooks: Custom Request
POST https://api.cryvis.com/v1/documents/pan
-F file=@scan.jpg
-H "Authorization: Bearer ..."
|
v
Google Sheets
pan_number | full_name | father_name | dob | holder_type | ...Prerequisites
- Cryvis API key (console)
- Google Drive folder dedicated to PAN uploads (isolate from Aadhaar/passport)
- Google Sheet with a header row
- Zapier Google Drive + Sheets + Webhooks by Zapier
Step 1: Folder and Sheet schema
Drive path example: India-KYC / pan-inbox. Optionally move processed files to pan-done to avoid re-processing.
Sheet columns:
| Column | Cryvis data field |
|---|---|
| A processed_at | Zapier {{zap_meta_human_now}} |
| B drive_file_id | Drive trigger |
| C file_name | Drive trigger |
| D pan_number | pan_number |
| E full_name | full_name |
| F father_name | father_name |
| G date_of_birth | date_of_birth |
| H holder_type_code | holder_type_code |
| I holder_type | holder_type |
| J series | pan_structure.series |
| K name_initial | pan_structure.name_initial |
| L sequence | pan_structure.sequence |
| M check_digit | pan_structure.check_digit |
| N status | ok / error |
Step 2: Watch Drive
Google Drive → New File in Folder
- Folder:
pan-inbox - Include file contents if your Drive action exposes binary for the next step
If the trigger only returns metadata, add Google Drive → Upload File is wrong here — you need the existing file's content. Use Google Drive → Get File / download-style action so Zapier has binary for multipart. Watching metadata alone is not enough.
Step 3: Call Cryvis PAN
Webhooks by Zapier → Custom Request
| Setting | Value |
|---|---|
| Method | POST |
| URL | https://api.cryvis.com/v1/documents/pan |
| Data Pass-Through? | No |
| Headers | Authorization: Bearer YOUR_API_KEY |
| Payload Type | Form / multipart |
| Form field | Value |
|---|---|
file | File from Drive (required) — map the binary, not a URL string |
Supported types: PDF, JPEG, PNG, WebP.
cURL equivalent:
curl -X POST https://api.cryvis.com/v1/documents/pan \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "file=@pan-card.jpg"Step 4: Response fields
{
"success": true,
"data": {
"pan_number": "ABCPS1234F",
"full_name": "RAHUL SHARMA",
"father_name": "SURESH SHARMA",
"date_of_birth": "1992-08-14",
"holder_type_code": "P",
"holder_type": "Individual",
"pan_structure": {
"series": "ABC",
"holder_type_code": "P",
"holder_type": "Individual",
"name_initial": "S",
"sequence": "1234",
"check_digit": "F"
}
},
"meta": {
"request_id": "req_pan_01hxyz"
}
}holder_type_code is the 4th character semantics (e.g. P = Individual, C = Company). Use holder_type for human-readable Sheets filters.
Docs: /docs/api/extractPan · Product: /apis/pan.
Step 5: Filter then append to Sheets
Filter by Zapier — only continue if success (Text) Exactly matches true (or your Custom Request exposes it as boolean true).
Google Sheets → Create Spreadsheet Row
Map each column from Step 1. For nested structure:
series = data__pan_structure__series
name_initial = data__pan_structure__name_initial
sequence = data__pan_structure__sequence
check_digit = data__pan_structure__check_digitZapier flattens nested JSON with double underscores depending on the step; pick the fields Zapier shows after a test run. Set status = ok on the success path.
Step 6: Paths by holder type
Add Paths by Zapier after a successful extract:
| Path | Rule | Action |
|---|---|---|
| Individual | holder_type_code (Text) Exactly matches P | Optional Slack “retail KYC” |
| Company | holder_type_code Exactly matches C | Flag for entity KYC pack |
| Other | Always / Fallback | Ops review |
You are not calling another Cryvis endpoint here — only branching on returned enums.
Step 7: Move processed files
Google Drive → Move File from pan-inbox → pan-done. Prevents the New File trigger from re-ingesting the same scan.
Step 8: Errors
On Custom Request failure (or Filter false):
- Write a Sheets row with
status=error,pan_numberblank,file_nameset. - Move the file to
pan-failedinstead ofpan-done. - Alert Slack with Drive link only — not the image bytes.
Common issues:
- Wrong field name (
documentinstead offile) - HEIC uploads (convert before Cryvis, or reject in Filter)
- Multi-page PDF of an entire KYC pack — prefer a cropped PAN-only file for higher accuracy
Validation tips without inventing APIs
Cryvis returns structured pan_structure. You can add Filters such as:
pan_number(Text) Exactly matches length 10 (use Formatter → Text → Length, then Filter)- Normalize to uppercase before compare with Formatter
Do not claim a separate “PAN verification against NSDL” step unless you integrate that yourself — this Zap is extraction, not government verification.
Deduping PAN rows
Before Create Spreadsheet Row, optionally Google Sheets → Lookup Spreadsheet Row where pan_number equals data.pan_number:
- Found → Update Spreadsheet Row
- Not found → Create Spreadsheet Row
Paths: “Found” vs “Not found” after Lookup.
Credits and throughput
PAN extraction is 1 credit per PDF page or image (Credits). A single JPEG PAN is one credit. A multi-page PDF of an entire KYC pack still bills per page — crop to the PAN page before upload when possible.
Sample timeline
T0 File lands in pan-inbox
T1 New File in Folder fires
T2 Custom Request → Cryvis (~few seconds)
T3 Sheets row written; file moved to pan-done
T4 Path notifies Slack if holder_type_code = CRelated reading
- Automate KYC (Paths + HubSpot)
- Extract driver's license (country required)
- Convert PDFs to JSON (custom extractors)
- Extract Indian vehicle RC
- /blog/zapier
CTA
Extract Indian PAN cards to JSON with Cryvis: /apis/pan. Docs: /docs/api/extractPan. From Zapier, POST file via Custom Request to https://api.cryvis.com/v1/documents/pan with Bearer auth and append data.pan_number, data.full_name, and data.holder_type to Sheets.