PDF security blog

PDF Tamper Check in Zapier, Make and n8n via HTTP Request

HTPBE Team··14 min read
PDF Tamper Check in Zapier, Make and n8n via HTTP Request

This article is a snapshot – content was accurate as of November 2026 (code examples tested against the API as of October 2026). The product evolves actively; specific counts, examples, and detection rules may have changed since publication – see the changelog for the current state.

Your workflow already catches the PDFs: a form submission, an email attachment, a new file in a storage folder. You can add a PDF tamper check to it with two HTTP request steps: one sends the file’s link to the HTPBE? API, the next reads the result: intact, modified or inconclusive. A branch after them sends the document to the right human action. The check looks at the file, not at the person who sent it or at whether its contents are true.

HTPBE? has no Zapier, Make or n8n app. You use the generic HTTP request step each of these tools already has.

What the workflow needs

  • An API key. Start with a test key (htpbe_test_…); it returns synthetic results and costs nothing. Switch to a live key once the workflow behaves.
  • A link to the PDF. The API takes a URL, not a file upload. It must be a direct link to the PDF bytes over http or https, open without a login, with no user:pass@ in it and no redirect in front of it. A share page from Google Drive or Dropbox is not a direct link. The file can be up to 10 MB. If your files sit in private storage, send a short-lived signed link; checking PDFs in a private bucket covers how.
  • A way to branch on the result: Paths in Zapier, a Router in Make, a Switch node in n8n.

A header is a labelled line sent alongside the request, outside its main content; that is where the API key goes. JSON is the curly-brace text format the request body is written in. The key in Idempotency-Key is just a label you choose; it is unrelated to the API key.

The request

Two calls do the whole job. The first submits the link:

POST https://api.htpbe.tech/v1/analyze
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
Idempotency-Key: attachment-84213

{
  "url": "https://files.example.com/uploads/3f6c1e2a.pdf",
  "original_filename": "bank-statement.pdf"
}

original_filename is optional. If you send it, keep it neutral: a document type, not an applicant’s name. If you leave it out, the file name at the end of the link is stored instead, so the same applies to how your links are named.

The answer is 201 with the check ID in the body:

HTTP/1.1 201 Created

{ "id": "506a6b1b-1360-48a2-b389-abb346f85d04" }

Read id from the body. The analysis has already finished when the 201 arrives, so there is no wait or polling step. The second call reads the result straight away, with the same Authorization header:

GET https://api.htpbe.tech/v1/result/506a6b1b-1360-48a2-b389-abb346f85d04
Authorization: Bearer YOUR_API_KEY

The Idempotency-Key header makes a re-run safe. If the same key arrives again with the same url, the API returns the original id without analysing the file again and without using another credit. The value can be any string up to 255 characters. Use one key per document submission: the ID your trigger gives this attachment, form entry or file event. Reuse it only when you re-run that same submission.

Two tempting shortcuts break this:

  • One key per customer record. When the second document for the same application arrives, the same key comes with a different url, and the API rejects it with 422 idempotency_key_fingerprint_mismatch.
  • A key built from the URL or filename. If a new file is later saved under the same path, the same key and the same url return the old result, and the new file is never checked. If a different file arrives under the same name at a different link, the same key is rejected with 422 idempotency_key_fingerprint_mismatch.

Zapier

Use Webhooks by Zapier. Check that your plan includes it before you build; Zapier’s Webhooks help page lists the plans. Branching uses Paths or a Filter; check those too.

Step 1, submit the file. Add a Webhooks by Zapier action with the event POST:

  • URL: https://api.htpbe.tech/v1/analyze
  • Payload Type: JSON
  • Data: one row, key url, value mapped from your trigger’s file link. Add original_filename as a second row if you want it.
  • Headers: Authorization = Bearer YOUR_API_KEY; Content-Type = application/json (set it yourself); Idempotency-Key = the attachment or event ID from your trigger.

Fill in Data. If you leave it blank, Zapier sends every field from the previous step, not just the link.

Step 2, read the result. Add another Webhooks by Zapier action with the event GET. The URL is https://api.htpbe.tech/v1/result/ followed by the id mapped from step 1. Add the same Authorization header.

Webhooks by Zapier has no separate credential field, so the key sits as plain text in the step’s Headers, and you should assume it also shows in Zap history. Limit who can open the Zap and its history.

Make

Use the HTTP app’s Make a request module.

Module 1, submit the file:

  • URL: https://api.htpbe.tech/v1/analyze, method POST.
  • Authentication type: API key. Create the credential in Make’s keychain: Key = Bearer YOUR_API_KEY (the full value, prefix included), placement header, parameter name Authorization. Make’s module page says to define authentication in the Credentials field, not in Headers.
  • Headers: Idempotency-Key = the attachment or event ID from your trigger.
  • Body content type: application/JSON. Body input method: Data structure. Add url (mapped from the trigger) and, if you want it, original_filename. Data structure escapes special characters in the mapped values for you.
  • Parse response: Yes, so the next module can map id.
  • Return error if HTTP request fails: Yes (under Advanced settings). It stops the scenario on a 4xx or 5xx response instead of letting the error body pass on as data.
  • Timeout: leave room for the file download and the analysis. If the module times out anyway, re-run with the same Idempotency-Key.

Module 2, read the result: another Make a request with method GET, URL https://api.htpbe.tech/v1/result/ plus the mapped id, the same keychain credential, and Parse response on.

n8n

Use the HTTP Request node.

Node 1, submit the file:

  • Method: POST. URL: https://api.htpbe.tech/v1/analyze
  • Authentication: a generic credential type, Header Auth. In the credential, Name = Authorization, Value = Bearer YOUR_API_KEY.
  • Send Headers: on, with Idempotency-Key = the attachment or event ID from your trigger.
  • Send Body: on. Body Content Type: JSON. Add url and, if you want it, original_filename as body fields.
  • Options: add Timeout and leave room for the download and the analysis.

Node 2, read the result: another HTTP Request node, GET, URL https://api.htpbe.tech/v1/result/ plus the id from node 1, same credential.

Two points on sharing. An exported workflow’s JSON includes credential names and IDs, but not the secret itself as long as it lives in a credential. Importing a request from cURL can put the Authorization header straight into the node, so move it into a credential and delete it from the node before you share or export the workflow.

Each tool keeps a run history that can include the data your steps sent and received: the file link, the check ID and the result. Limit who can open it: a signed file link in it opens the document until it expires. If an API key was ever exposed, in any of the three tools, delete it under API keys in your HTPBE? dashboard and create a new one.

Read the result

An abridged result from the clean.pdf test scenario:

{
  "id": "00000000-0000-4000-8000-000000000001",
  "status": "intact",
  "modification_markers": [],
  "usage_caution": {
    "safe_for_automated_adverse_decision": false,
    "recommended_action": "no_action"
  }
}

The fields a workflow needs:

  • status: intact, modified or inconclusive. This is the field to branch on.
  • status_reason: present only when status is inconclusive, saying why. Put it in the issuer request or case note; don’t build a branch per reason.
  • modification_markers: a list of HTPBE_… marker IDs, non-empty only for modified. Put them in the review task so the reviewer sees what was found.
  • usage_caution.recommended_action: route_to_human_review for modified, request_from_issuer for inconclusive, no_action for intact. You can branch on this instead of status; it maps one to one.
  • usage_caution.safe_for_automated_adverse_decision: always false.
  • filename: the name you sent as original_filename. If you didn’t send one, it is the last part of the link’s path when that ends in .pdf, otherwise document.pdf. With a test key it is always the scenario name, such as clean.pdf. Note the different field name in the response.

Branch on the verdict

Four routes, plus a separate error path:

  1. modified → a human review task. Create a task or ticket for a reviewer with the filename, the check id and the markers. In Slack, email or ticket steps, map these fields, not the whole request or response. Never an automatic rejection.
  2. inconclusive → ask the issuer for the document. One path for every reason. Inconclusive means the check could not confirm the file is unchanged. It is not an adverse signal, so don’t decline, flag or penalise anyone on it; request the document directly from the bank, employer or other issuer instead.
  3. intact → the normal process continues. The document goes on through your existing steps, human checks included. intact means no modification was detected, not that the document is genuine, so don’t let it auto-approve anything either.
  4. Fallback → human review. Anything that doesn’t match the three values above lands here. In Zapier, set one path as the Fallback. In Make, mark one Router route as the fallback. In n8n, turn on the Switch node’s Fallback Output option and choose Extra Output.

Match on status or recommended_action, never on the wording of usage_caution.message or of an error’s error or details.

The error path is separate from all four. An error response is not a verdict, and it must never reach the branches above as though it were one. Each tool needs its own guard. In Make, set Return error if HTTP request fails to Yes. In n8n, leave Never Error off, which is the default: the HTTP Request node then treats anything other than a 2xx response as a failure. In Zapier, don’t rely on the Webhooks step to stop on an error: add a Filter or Paths step straight after the submit step that continues only when id has a value, and send everything else to your error handling. The guide to handling verdicts in code covers the full verdict rules.

Retries, errors and double charges

Errors come back as JSON with an error message, a code and sometimes details. Decide what to do from code.

ResponseRetry?
409 idempotency_key_in_progressYes, after Retry-After, with the same key
429 server_at_capacityYes, after Retry-After, same key
500 internal_errorYes, same key
422 analysis_timeoutWait, then retry once or twice with the same key
400, e.g. download_failedNo, in general. Fix the link; a redirect ends up here. A Network error or Download timed out in details can be transient, so one manual re-run is reasonable
401No. Check the key
402 payment_requiredNo. The account is out of credits. If this was a re-run, look for the first attempt’s result with GET /v1/checks (live keys, filter by from_date) before submitting again; if it is not there, add credits and re-run with the same key
403, e.g. test_url_requiredNo. A test key was sent a real link; other 403 codes mean an account problem, so contact support
404 not_found (on the GET)No. Both steps must use the same key, and the id must be mapped from step 1’s response
413 file_too_largeNo. The file is over 10 MB
Any other 422No

The API reference sets the billing rule: every check that returns a result uses one credit or quota unit, and ‘a request that ends in an error and returns no result uses nothing’. Each call draws from one pool shared by API calls and web uploads, subscription quota first, then any one-time credit packs.

So the Idempotency-Key is what prevents a double charge:

  • Re-running the same submission with the same key and link returns the original id and uses no credit if the first request completed. If it is still running you get 409; if it failed, the retry runs as a new request.
  • Reading a result again with GET /v1/result/{id} never uses a credit, so a later step can read it as often as it needs.
  • Submitting the file again with no key or a new key is a new analysis and may use another credit.

If your workflow signs a fresh link on every run, a re-run with the old key gets 422 idempotency_key_fingerprint_mismatch; the presigned-URL guide covers how to handle it.

Build it with a test key first

Put a test key in the header and use the test URLs as your file link. Test keys accept only https://api.htpbe.tech/v1/test/<name>.pdf:

  • clean.pdf → intact
  • modified-high.pdf → modified
  • inconclusive.pdf → inconclusive
  • scanned-document.pdf → inconclusive
  • trigger-402.pdf → 402 payment_required from the POST

Run each through the workflow and check where it lands. Both inconclusive scenarios should take the same route; trigger-402.pdf exercises the error path. The IDs are fixed, so clean.pdf always gives 00000000-0000-4000-8000-000000000001.

Three limits. Test keys ignore Idempotency-Key, so your retry setup only meets reality on a live key. A test key never downloads anything, so a share link, a redirect, a login page or a file over 10 MB only shows up as an error once you switch to a live key, and filename is always the scenario name rather than your original_filename. And a test key sent any real link returns 403 test_url_required. The results are synthetic: they show your routing works, not what the analysis would say about your own documents. Testing with test keys covers the scenarios in depth.

When a workflow tool is no longer enough

A workflow tool suits this while documents arrive one at a time and a person handles each flagged result. Once volume grows, or you need a queue, controlled retries and your own record of every check, the same two calls move into a small service of your own. The event-driven pipeline guide shows that build: upload event, queue, worker, and a callback into your review system.

What this check does not tell you

HTPBE? checks whether a PDF’s structure shows signs of editing after it was created. It does not check who sent the document, whether the issuer’s records match, or whether the figures in it are true, and it does not detect every fabricated document. A modified result is a fact about the file, not proof of fraud or of anyone’s intent, and an inconclusive result says nothing against the person who sent it. That is why no route above declines or approves anyone automatically. The check sits alongside your identity checks and review process, not in place of them.

Frequently asked questions

Is there an HTPBE? app for Zapier, Make or n8n?

No. HTPBE? has no app in Zapier, Make or n8n. You call the API with the generic HTTP request step each tool already has, exactly as this guide shows.

Can I send the PDF itself instead of a link?

No. The API accepts only a URL, and it has to be a direct link to the PDF that opens without a login. Share-page links from Google Drive or Dropbox are not direct links. For files in private storage, send a short-lived signed link.

Will this reject customers whose documents are flagged?

No. Nothing in this workflow declines anyone on its own, and it should not: every result carries safe_for_automated_adverse_decision set to false. A modified result goes to a person and an inconclusive one leads to a request to the issuer.

What does it cost to build and run?

Building with a test key costs nothing. On a live key, every check that returns a result uses one credit or quota unit, and a request that ends in an error uses nothing. Current plans and credit packs are on the pricing page.

Start with a test key and the test URLs above; the API reference has everything else.

Share this article

Found this article helpful? Share it with others to spread knowledge about PDF security and fraud detection.

https://htpbe.tech/blog/pdf-tamper-check-no-code-workflow-http-request

Secure your workflow

Create your account – check PDFs on the web or with an API key, both ready on signup.
No sales call. Cancel any time.