PDF extraction

How to watch a Google Drive folder for new PDFs

Use Google Drive API change notifications, Zapier, Make, or n8n to upload new Drive PDFs into okraPDF for extraction.

May 18, 2026 3 min read okraPDF

Google Drive folder intake is a natural PDF workflow. A vendor, client, or teammate drops a PDF in a shared folder. The file should be uploaded to okraPDF, processed, and routed into Sheets, Slack, a CRM, or your product.

This is API-feasible today. The Google Drive API push notification guide supports notifications for Drive files and changes resources. Drive also treats folders as files with the folder MIME type, as described in the Drive files and folders overview. The production pattern is usually: watch changes, filter for files whose parent is the target folder, then download and upload matching PDFs.

Choose the Drive path

PathUse whenTradeoff
Zapier Drive triggerFastest no-code setupLimited control but easy
Make or n8n Drive nodesFlexible no-code setupMore setup work
Direct Drive APINative product connectorOAuth, watch renewal, change tracking

okraPDF’s direct Drive watch-folder connector is a native-product upgrade. The API path is available today through automation platforms or your own backend.

Direct API architecture

The direct Drive API flow:

  1. User connects Google Drive with OAuth.
  2. User selects a folder through Google Picker or your folder selector.
  3. Your backend stores the folder ID.
  4. Your backend starts a Drive changes watch channel.
  5. Drive sends a notification to your webhook.
  6. Your backend lists changes since the stored page token.
  7. Your backend filters for files with the watched folder as a parent.
  8. Your backend filters for PDFs.
  9. Your backend downloads the file.
  10. Your backend uploads it to okraPDF.
  11. okraPDF emits document.processed.

Drive notifications tell you to check what changed; they do not contain the whole file. You need to list changes and fetch the file content.

Folder filtering

Do not treat every Drive change as an intake candidate. Filter before upload.

Recommended checks:

  • The file is not trashed.
  • The MIME type is application/pdf.
  • The parent folder includes the selected folder ID.
  • The file ID has not already been processed.
  • The file size is within your upload limit.
  • The user still has permission to read the file.

Store the Drive file ID, modified time, and okraPDF document ID. If a user edits or replaces a file, decide whether that creates a new okraPDF document or updates the old one.

Zapier setup

  1. Trigger: Google Drive New File in Folder.
  2. Filter: file extension is PDF.
  3. Action: okraPDF Upload PDF.
  4. Second Zap trigger: okraPDF PDF Ready.
  5. Destination: Google Sheets, Slack, Airtable, or your app.

This is the fastest path for teams that already live in Zapier.

Make or n8n setup

Make and n8n can both watch Drive and call HTTP APIs. Use the same structure:

  1. Drive trigger for new files in a folder.
  2. Filter for PDFs.
  3. HTTP request to okraPDF upload.
  4. Webhook trigger for okraPDF ready events.
  5. Destination module for rows or notifications.

Keep the upload flow and ready flow separate. Upload creates the job. Ready means downstream data is safe to use.

OAuth and scope notes

Drive integrations can request broad access or file-scoped access. Prefer the narrowest workable scope. If customers select individual folders or files, design the UX around explicit consent and clear revocation.

For business-critical folders, add a reconnect state. OAuth tokens expire, permissions change, and shared drives can be reorganized. A Drive connector should show “last seen”, “last ingested”, and “last error” rather than failing quietly.

Failure handling

Create a skipped-file log. Good statuses are:

  • skipped_not_pdf
  • skipped_too_large
  • upload_failed
  • processing_failed
  • processed

This makes Drive intake explainable when a user asks why one PDF appeared in Sheets and another did not.