Zapier Integration
PyHall WCP — Zapier Governance Gate
Add a pyhall governance check to any Zap. Any step that calls an AI worker, writes records, or
moves sensitive data should route through pyhall first. If the decision comes back denied: true,
use a Zapier Filter or Paths step to halt or redirect the Zap.
What you can do
- Gate any Zap step — insert a governance checkpoint before AI agent actions, database writes, or notification sends
- Branch on policy — use the
deniedfield with Zapier Paths or Filter to allow/block downstream steps - Capture audit records — every pyhall decision returns a
decision_idyou can log to a spreadsheet, Airtable base, or Slack channel - Enforce data labels — pass
data_labelfrom your trigger payload to enforce PUBLIC / INTERNAL / CONFIDENTIAL / RESTRICTED policies at the routing layer
Step 1 — Store credentials in Zapier
In your Zapier account go to My Apps → Zapier Manager → Environment Variables (or use Zapier’s Secret Manager if on a Teams/Enterprise plan). Add:
HALL_SESSION_TOKEN = <your Hall Server session token>PYHALL_API_KEY = <your pyhall registry API key>For a self-hosted Hall Server, also store:
PYHALL_HALL_URL = http://your-hall-host:8765Reference these as {{zap_meta.bundle.environment.HALL_SESSION_TOKEN}} in your Zap steps.
Step 2 — Add the governance check step
Insert a Webhooks by Zapier action (choose action event: POST) at the point in your Zap where governance should fire.
Zap step configuration
| Field | Value |
|---|---|
| URL | http://your-hall-host:8765/api/route |
| Payload Type | json |
| Headers | Authorization: Bearer {{zap_meta.bundle.environment.HALL_SESSION_TOKEN}} |
| Data (JSON body) | see below |
JSON body — map fields from your trigger or earlier Zap steps:
{ "capability_id": "cap.data.write.v1", "worker_id": "{{1.worker_id}}", "env": "prod", "data_label": "{{1.data_label}}", "tenant_id": "org.acme"}Replace {{1.worker_id}} and {{1.data_label}} with the field mappings from your trigger step.
If your trigger does not carry a worker_id, use a fixed registered worker ID that represents the
Zapier integration (e.g., wrk_zapier_acme_prod).
Field reference
| Field | Required | Description |
|---|---|---|
capability_id | Yes | WCP capability being requested, e.g. cap.data.write.v1 |
worker_id | Yes | Registered pyhall worker ID making the request |
env | Yes | dev or prod |
data_label | No | PUBLIC, INTERNAL, CONFIDENTIAL, or RESTRICTED |
tenant_id | No | Org namespace, e.g. org.acme |
Response fields
Zapier will parse the JSON response. Key fields available in subsequent steps:
| Field | Type | Description |
|---|---|---|
decision_id | string | Immutable audit record ID |
denied | boolean | true = blocked, false = allowed |
selected_worker_species_id | string | Matched worker species from WCP taxonomy |
artifact_hash | string | Cryptographic proof of the decision |
reason | string | Human-readable denial reason (only present when denied: true) |
Step 3 — Branch on the denied field
Option A — Filter (halt the Zap)
After the Webhooks step, add a Filter by Zapier step:
- Only continue if:
(Webhooks) deniedExactly Matchesfalse
This stops the Zap silently when the worker is denied.
Option B — Paths (branch allowed vs. denied)
After the Webhooks step, add a Paths by Zapier step with two paths:
Path A — Allowed:
- Condition:
(Webhooks) deniedExactly Matchesfalse - Continue with downstream actions (write record, send notification, etc.)
Path B — Denied:
- Condition:
(Webhooks) deniedExactly Matchestrue - Send a Slack alert, log to a spreadsheet, or create a task:
Subject: Governance denial — {{(Webhooks) decision_id}}Body: Worker {{1.worker_id}} denied for {{cap.data.write.v1}}Reason: {{(Webhooks) reason}}
Step 4 — Log decision_id for audit
Add a Google Sheets or Airtable action in both paths to write:
decision_id {{(Webhooks) decision_id}}worker_id {{1.worker_id}}capability_id cap.data.write.v1denied {{(Webhooks) denied}}artifact_hash {{(Webhooks) artifact_hash}}timestamp {{zap_meta.human_now}}This gives you a full audit trail tied to immutable pyhall decision records.
Common capability IDs
cap.data.read.v1 Read structured datacap.data.write.v1 Write or mutate recordscap.notify.send.v1 Send notifications or messagescap.report.generate.v1 Generate and deliver reportscap.auth.verify.v1 Identity/auth operationscap.workflow.trigger.v1 Trigger downstream workflowsFull taxonomy: https://pyhall.dev/workers/taxonomy/
Environment variables
HALL_SESSION_TOKEN # Required — Hall Server session token (local or hosted)PYHALL_API_KEY # Required — pyhall registry API keyPYHALL_HALL_URL # Optional — defaults to http://localhost:8765PYHALL_REGISTRY # Optional — defaults to https://api.pyhall.devGetting started
pip install pyhall-wcpornpm install -g @pyhall/clipyhall auth login— authenticatepyhall worker register— register a worker to represent your Zapier integration- Store
HALL_SESSION_TOKENin Zapier’s Secret Manager or environment variables - Add a Webhooks by Zapier → POST step to your Zap pointing at
/api/route - Add a Filter or Paths step branching on
denied
Full documentation: https://pyhall.dev/introduction/ WCP specification: https://workerclassprotocol.dev/spec/ Registry API: https://api.pyhall.dev