Logo
Apdf tutorials July 2026 4 min read

How to Log Every PDF View in a Google Sheet

Dashboards are great until you need the data your way: filtered by client, pivoted by week, shared with someone who will never log into another tool. For most teams, that place is a spreadsheet.

In this tutorial you'll build a living view log: every time someone opens one of your PDFs, a new row appears in Google Sheets — who opened what, and when. Zero code.

What you'll build
A spreadsheet that fills itself. Each document open becomes a row with timestamp, document and reader — ready for filters, pivots and formulas: 2026-07-23 09:14 · Q3 Services Proposal · Alex Moreau · alex@clientco.example
Free plan for tracking ยท automations need Pro (14-day trial, no card)
1

Share your PDFs through recipient links

The log is only useful if rows carry names. Upload your document and mint a link per recipient — via the dashboard, or two calls:

curl -X POST https://apdf.io/api/docs \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json" \
  -d file="https://your-server.com/q3-services-proposal.pdf" \
  -d name="Q3 Services Proposal"

curl -X POST https://apdf.io/api/docs/4352c-99928-25aa1/links \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json" \
  -d name="Alex Moreau" \
  -d email="alex@clientco.example"
2

Create a catch hook in Zapier

  1. Create a new Zap and pick the trigger Webhooks by Zapier → Catch Hook.
  2. Copy the generated webhook URL — it's where every view event will land.
3

Point an automation at the hook

  1. In the Apdf dashboard, go to Automations and click New Automation.
  2. Under “When this happens…” pick Document Opened. Scope it to all documents — one log for everything.
  3. Under “Then do this…” paste the Zapier hook URL as the Webhook URL and save.
Plan note: Automations are a Pro feature. Every new account can trial Pro for 14 days — no credit card — which covers everything in this tutorial.

Open one of your links once, and Zapier's “test trigger” will find this waiting for it:

{
    "automation": {
        "id": "35412-b8718-6f9a3",
        "name": "Log views to the sheet"
    },
    "document": {
        "doc_id": "4352c-99928-25aa1",
        "name": "Q3 Services Proposal",
        "viewer_url": "https://docs.apdf.io/studio/4352c-99928-25aa1",
        "file_pages": 3
    },
    "trigger": {
        "matched_event": "document:loaded",
        "conditions_evaluated": false
    },
    "event": {
        "session_id": "zLog4Sheet0View1",
        "viewer_id": "aMxV3nKj9qLp2wSe",
        "recipient": {
            "name": "Alex Moreau",
            "email": "alex@clientco.example"
        },
        "data": null
    },
    "session": {
        "total_duration_ms": 0,
        "pages_viewed": 0,
        "completion_rate": 0
    },
    "timestamp": "2026-07-23T07:14:01+00:00"
}
4

Map the fields to a sheet row

  1. Add the action Google Sheets → Create Spreadsheet Row and pick a sheet with the columns Time, Document, Reader, Email.
  2. Map the payload fields onto the columns: Timestamp, Document Name, Event Recipient Name, Event Recipient Email.
  3. Turn the Zap on. From now on, every open writes its own row.

And because it's a spreadsheet, the log doubles as a mini-dashboard — opens per person and their most recent visit are one formula each:

=COUNTIF(D:D, "alex@clientco.example")          # opens per reader
=MAX(FILTER(A:A, D:D = "alex@clientco.example")) # their latest visit

Where to go from here

A view log is the raw feed — the same signals can also act on their own.

Ready to see who reads?