← Back to blog

Extract Aadhaar Data with Zapier and Cryvis

Upload Aadhaar (1–2 multipart file parts) to Cryvis, write Google Sheets rows, and handle is_masked PII safely.

Aadhaar shows up as KYC uploads with one or two JPEG/PDF sides. This Zap sends them to Cryvis POST /v1/documents/aadhaar and writes structured fields to Google Sheets — with explicit handling for is_masked and PII hygiene.

Passport twin (two differently named parts): Extract passport data. Multipart reference: Send multipart form data. Hub: Zapier + Cryvis.

Why masking matters

Cryvis returns whatever is printed: full UID or masked (e.g. XXXX XXXX 9012) plus is_masked: true|false. Treat that flag as a control for storage and Slack notifications — not an afterthought.

Architecture

Source
  Drive New File  OR  Forms file upload(s)
        |
        v
Filter: 1–2 supported images/PDFs
        |
        v
Webhooks by Zapier: Custom Request
  POST https://api.cryvis.com/v1/documents/aadhaar
  multipart: file  [, file]
  Authorization: Bearer <API_KEY>
        |
        v
Filter: success is true
        |
        v
Google Sheets: Create Spreadsheet Row
  + is_masked column
  + restricted access on the Sheet

Prerequisites

  • Cryvis API key — Aadhaar API
  • Zapier + Google Sheets (and Drive or Forms for intake)
  • Sample Aadhaar front (and optionally back) image/PDF

Credits: 1 per PDF page or imageCredits.

Multipart: both parts named file

Cryvis accepts 1–2 files, same part name file. Do not use front / back (those are for Indian vehicle RC) or first_page / last_page (passport).

# One side
part: file = aadhaar-front.jpg

# Front + back
part: file = aadhaar-front.jpg
part: file = aadhaar-back.jpg

cURL equivalent:

curl -X POST https://api.cryvis.com/v1/documents/aadhaar \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "file=@aadhaar-front.jpg" \
  -F "file=@aadhaar-back.jpg"

Create the Zap

  1. Google Drive — New File or Forms — New Submission with file field(s)
  2. Filter — MIME / extension
  3. Webhooks by Zapier — Custom Request
  4. Filtersuccess is true
  5. Google Sheets — Create Spreadsheet Row
  6. Optional Paths: is_masked true vs false → different Slack channels or Sheet tabs

Instruct uploaders: front only, back only, or front+back. Cap at two images; ignore extras.

Cryvis HTTP

PieceValue
MethodPOST
URLhttps://api.cryvis.com/v1/documents/aadhaar
HeaderAuthorization: Bearer <API_KEY>
Bodymultipart/form-data
Partsone or two parts named file

Docs: extractAadhaar.

Example response

{
  "success": true,
  "data": {
    "aadhaar_number": "XXXX XXXX 9012",
    "full_name": "RAHUL SHARMA",
    "date_of_birth": "1992-08-14",
    "gender": "Male",
    "address": "12 MG Road, Bengaluru, Karnataka 560001",
    "pincode": "560001",
    "is_masked": true
  },
  "meta": {}
}
FieldNotes
aadhaar_numberFull or masked string as printed
full_namePrinted name
date_of_birthMay be null on YOB-only cards
genderAs printed
address / pincodeOften stronger when back image is included
is_maskedBoolean — drive storage policy

Sheets mapping

Prefer a Sheet with restricted sharing (KYC ops only). Headers:

Aadhaar Number | Full Name | DOB | Gender | Address | Pincode | Is Masked | Source File | Processed At

ColumnSource
Aadhaar Numberdata.aadhaar_number
Full Namedata.full_name
DOBdata.date_of_birth
Genderdata.gender
Addressdata.address
Pincodedata.pincode
Is Maskeddata.is_masked
Source FileDrive/Forms filename
Processed Atcurrent timestamp

Paths (optional):

Path A: is_masked is true
  → write row; Slack “masked UID OK for storage policy”
Path B: is_masked is false
  → write row to a higher-restriction tab; alert compliance

Your policy decides whether unmasked UIDs are allowed in Sheets at all. Cryvis does not mask for you — it reports what the document shows.

Errors and testing

CaseAction
401Fix API key
400 / missing filePart not named file, or zero files
Blank addressBack side missing — send second file part
Full UID in Sheet against policyReject Path B or redact with Formatter before write

Testing checklist

  1. One clear front JPEG → success: true, name populated.
  2. Front + back → address/pincode more complete when printed on back.
  3. Masked card → is_masked: true, number looks like XXXX ….
  4. Wrong part names (front/back) → failure — rename to file.

Troubleshooting

SymptomLikely causeFix
Missing fileUsed passport/RC part namesBoth parts must be file
Empty Sheets rowMapped outside dataUse data.full_name, etc.
Duplicate rowsDrive re-triggerMove/archive after success
Two credits unexpectedlyTwo imagesExpected — Credits

Production notes

  • Restrict Sheet access; Aadhaar is sensitive PII.
  • Prefer masked documents when your process allows it.
  • Do not post full UIDs to public Slack channels — map is_masked and name only in notifications.
  • Archive source files after success; do not leave unmasked scans in a shared Drive inbox.