# Set Up Citation with Zapier Build private Zaps that create research drafts, save source metadata, format references, and poll for document or source changes. ## Before you connect Private app source. Follow the installation steps for this package; it is not a public marketplace listing. Use the address shown in Citation settings and a reachable HTTPS server for cloud platforms. For a self hosted deployment, the operator must configure the MCP address and apply the MCP and automation database migrations. A localhost address works only for software on that computer. Each token grants access to one workspace for 1 to 90 days. Read permissions are selected initially. Choose writing and exporting only if your workflow needs them. Save credentials in the platform credential store. - [Download setup package](/api/automation/templates/zapier) ## Set up Zapier 1. Download the private app source. Run npm install and npx zapier-platform validate in its directory. Register and upload the app through your own Zapier developer account. Keep it private while testing. 2. Create a workspace token in Citation automation settings. Select the permissions your Zap needs. The connection form accepts the exact HTTPS Citation origin and the token in its password field. 3. Use Create Draft, Add Source and Format References. Map document_id from the first step into the next steps. Map a stable request UUID from your original event into each write. Source metadata and editor content fields accept JSON objects as text. 4. Choose Document Created, Document Updated, Source Created or Source Updated for polling. Create a disposable draft in Citation and verify its event. Zapier uses the event ID for deduplication and retrieves subsequent pages with its cursor API. The private app provides twelve actions and four polling triggers. Search Documents and List Sources return bounded results. Your Zapier account determines the polling schedule. Configure and connect the private app in your developer account before enabling a Zap. - [Official Zapier documentation](https://docs.zapier.com/integrations/build-cli/overview) ## Supported operations Find and read documents, create drafts, and save edits using the version you read. Find, read, add, or update saved sources. Format references, check citation metadata, and export saved text or references as TXT, BibTeX, or RIS. Each action requires its corresponding permission. The package includes an OpenAPI contract with input and output schemas. Send HTTP actions with POST to the corresponding relative path: Create draft endpoint ``` /api/automation/v1/actions/create_draft ``` Create draft request ```json { "request_id": "REPLACE_WITH_A_STABLE_UUID", "title": "Research intake", "text": "Evidence to review." } ``` Use read_document with include_content before changing a draft. Sending text replaces formatting and citation nodes. ## Events and retries The separate HTTP event feed reports document creation, document updates, source creation, and source updates. Events are saved with the same database transaction as the change. A retried request returns the same event IDs. History is retained for 30 days or 100,000 events per workspace, whichever is smaller. Use after for ascending pages and before for descending pages. Keep the same workspace, event type and order. Save the final checkpoint only after all pages and downstream actions succeed. A 410 error requires resynchronization. This integration does not send outbound webhooks. Reuse the same request UUID and exact input after an uncertain save. A 409 error means the version or request input changed. Read and review before making a new request. A 429 response includes a retry interval. Expired or revoked tokens return 401. ## Manage access Test API access in Citation settings, then test the connection inside your platform. A successful API test confirms Citation access only. Replace a token to invalidate its previous value while keeping its retry history. Update the platform credential before resuming. Revoke the connection to stop access. - [Automation overview](/docs/automation)