Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Writing connectors

A connector teaches Tappet how to talk to one SaaS API. Most connectors are a single YAML file that declares authentication, operations, pagination, dropdown lookups and triggers. The connector runtime turns that file into workflow nodes (connector.<id> for actions and connector.<id>_trigger for triggers) with the HTTP client, retries, rate limiting, credential refresh, egress policy and secret redaction already handled.

When an API needs something YAML cannot express (an unusual signing scheme, a streaming protocol, client-side encryption), a connector can call a named native hook written in Rust for that one operation. The goal is that at least 80 percent of connectors are pure YAML. If more than half of a connector’s operations need native hooks, the format is reviewed, not the connector.

Layout

connectors/
  acme_tasks/
    connector.yaml                  # the connector
    tests/
      task_create.cassette.yaml     # one or more cassette tests per operation
      task_list_paginated.cassette.yaml
      trigger_task_event.cassette.yaml
mappings/n8n/
  n8n-nodes-base.acmeTasks.yaml     # optional: import rules for the equivalent n8n node

Connector IDs are lowercase snake_case vendor names: slack, google_sheets, microsoft_outlook, monday. The full list of IDs reserved for connectors that map from n8n node types is in Node type mapping.

Authoring workflow

  1. Read the vendor’s documentation only. Use the vendor’s API reference, OpenAPI spec and authentication guide. Record every URL you used under provenance:. Do not look at other automation tools’ source code or documentation for the same service; see the provenance rules in CONTRIBUTING.md.
  2. Scaffold and write the file.
    tappet connector new acme_tasks
    $EDITOR connectors/acme_tasks/connector.yaml
    tappet connector lint acme_tasks
    
    Lint checks the schema, every template’s syntax, references between params, lookups, steps and auth alternatives, URL patterns, and the presence of provenance:.
  3. Add cassette tests. At least one per operation, lookup and trigger, plus the error cases that matter (bad credentials, not found, rate limited). See Cassette tests.
    tappet connector test acme_tasks
    
  4. Try it for real. Run Tappet with TAPPET_CONNECTORS_DIR=./connectors so your working copy overrides the embedded catalog, create a credential, and run each operation from the editor.
  5. Mapping files (only if an n8n node exists for the service) are written by the fixture team from parity captures, not from the connector author’s assumptions. See Mapping files.
  6. Parity. tappet parity run --connector acme_tasks must pass before imported nodes of this service can be reported as exact.

Pages in this section

PageWhat it covers
TutorialBuilding a complete connector step by step: auth, CRUD operations, pagination, lookups, an upload, a poll trigger, a webhook trigger, and tests
File format referenceEvery key of connector.yaml, the template language and its scope
AuthenticationAll auth kinds with examples, credential fields, test requests
Pagination and lookupsPagination strategies, return_all / limit, dropdowns, resource locators, URL patterns
Multi-step operations and uploadssteps:, for_each, resumable and chunked uploads
TriggersPoll triggers, vendor webhooks, signature verification, handshakes
Native hooksWriting a Rust hook for one operation or a custom signer
Cassette testsThe test format and how to record good cassettes
Mapping filesHow n8n node parameters map onto connector operations

The normative description of the file format, maintained with the connector runtime, is Connector file format. Every connector that ships with Tappet is listed, with its operations and authentication, in the connector reference.

Review checklist

Reviewers check every new connector for:

  • provenance: lists the vendor pages actually used, and nothing else.
  • Display names and descriptions are written fresh, in sentence case, and describe what the operation does for the user (“Send a message”), not the endpoint name.
  • Every operation that changes data has side_effect: true.
  • Secret credential fields have secret: true.
  • List operations paginate and expose return_all / limit.
  • Error messages come from the vendor’s error body (errors.message), not a generic string.
  • Every operation has a cassette; error paths have cassettes too.
  • No hard-coded account IDs, tokens or personal data in cassettes.
  • Icons are from simple-icons or the vendor’s brand kit.