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

Mapping files

A mapping file tells the importer how nodes of one n8n node type become a Tappet connector node. Built-in, protocol and AI nodes accept the n8n parameter shape unchanged and need no rules; SaaS connectors usually name and nest their parameters differently, so they need one mapping file per n8n node type: mappings/n8n/<n8n type>.yaml.

Who writes them, and from what

Mapping rules describe how another product’s parameters correspond to ours. To keep the project clean of that product’s source and documentation, mapping files are written only from parity fixtures: workflows we author, run in a pinned n8n container as a black box, and capture (node parameters as exported, and the HTTP requests the node actually sent). The fixture team records findings as behavior notes in parity/notes/ in their own words. Connector authors do not write mapping rules from memory or from reading other code.

A rule may be added before a fixture exists, but then it carries no evidence: and every node it maps is reported as PARAM_UNVERIFIED. It can never produce NATIVE_EXACT.

Format

n8n_type: n8n-nodes-base.slack
connector: slack
credentials:                    # n8n credential type -> auth alternative id
  slackApi: bot_token
  slackOAuth2Api: oauth2
versions:
  - range: ">=2 <3"             # semver-style range over typeVersion
    rules:
      - match: { resource: message, operation: post }
        to: message.post        # resource.operation in the connector
        params:
          channel: { from: channelId, resource_locator: true }
          text: { from: text }
          thread_ts: { from: otherOptions.thread_ts.replyValues.thread_ts }
        defaults: {}            # observed defaults for parameters absent from the export
        unsupported: [otherOptions.sendAsUser]
        evidence: [slack-v2-message-post-001, slack-v2-message-post-002]
  - range: ">=1 <2"
    rules: [ ... ]
KeyDescription
n8n_typeFull node type from the export.
connectorTarget connector ID. The node becomes connector.<id> (or connector.<id>_trigger for trigger types).
credentialsMaps credential type names in the export to auth alternatives, so imported placeholders are created with the right kind.
versions[].rangeVersion range, for example ">=2 <3" or ">=4.2". Ranges must not overlap.
rules[].matchParameter values that select this rule (usually resource and operation).
rules[].toTarget operation.
rules[].paramsTarget parameter name to source path. from is a dot path into the exported parameters; resource_locator: true unwraps locator objects.
rules[].defaultsValues for parameters the export omitted because they were at their default. Only values observed in fixtures.
rules[].unsupportedSource paths that have no equivalent. If set in a workflow, the node gets PARAM_UNSUPPORTED for that path.
rules[].evidenceParity fixture IDs that verify this rule.

How the importer applies a mapping

  1. Find the mapping file for the node’s type. None: UNSUPPORTED_NODE.
  2. Pick the version range containing the node’s typeVersion. If the version is above every range, use the nearest lower range and add TYPEVERSION_UNVERIFIED. If it is below the lowest range: UNSUPPORTED_NODE.
  3. Pick the first rule whose match values all equal the node’s parameters.
  4. Build the target parameters from params, then fill absent ones from defaults. Nested collections in the export (option groups, repeatable groups) are flattened by the from paths.
  5. Report PARAM_UNSUPPORTED for every unsupported path that is set, and PARAM_UNVERIFIED for every used parameter when the rule has no evidence.
  6. The node is NATIVE_EXACT only when the rule has evidence covering this version and every used parameter.

Verifying

tappet lint provenance                    # evidence IDs exist, connectors have provenance
tappet parity run --connector slack       # replay fixtures through the importer and the connector

parity run imports each fixture workflow, runs it against the recorded mock responses, and compares the outbound requests with those the reference run sent. A mismatch means the mapping or the connector is wrong; fix whichever differs from the recorded behavior.