On this page
Sommatic Docs
Open portal

Check Consent

Checks if User has consented to activity.

View as Markdown
Open in
Identity Experimental consent.check Version 1.0.0 Execution: async

Placeholder consent check: it validates that user_id is set and always answers yes with consented: true. No consent platform is queried and purpose is not evaluated.

How it works

  1. Resolves the config: expressions in user_id and purpose are evaluated against the run.
  2. Leaves through error with user_id is required when user_id is empty.
  3. Does not look up any consent record: the decision is hard-coded to consented.
  4. Returns { consented: true, timestamp } on yes, where timestamp is the evaluation time in ISO 8601.

In a workflow

The node as it appears in a workflow file (draft_nodes[]), and the envelope of a successful run.

{
  "node_id": "node-check-consent",
  "label": "Check marketing consent",
  "operator_slug": "consent.check",
  "operator_version": "1.0.0",
  "config": {
    "user_id": "{{ $json.customer_id }}",
    "purpose": "marketing_email"
  }
}

Configuration

user_id string Required
purpose string Required

Behaviour in the code

What the implementation does with these keys beyond what the schema says.

purpose
Required by the schema but ignored at runtime: the answer is the same for every purpose.

Output ports

yes default

Always, once user_id is set.

Data
{
  "consented": true,
  "timestamp": "2026-11-26T15:04:05.000Z"
}
no

Never emitted: the worker has no path that denies consent.

error

user_id is empty.

Data
{
  "error": "user_id is required"
}

In expressions

What a later node can read from this node's output with $("Check Consent").item.json.<path> (write your node's label instead of Check Consent). Editor marks the paths the workflow editor suggests under Previous Nodes (the output contract); Worker marks the paths the worker really returns through yes, from the output shown in Ports.

ExpressionEditorWorker
$("Check Consent").item.json.consentedboolean= true
$("Check Consent").item.json.timestampstring= "2026-11-26T15:04:05.000Z"

Errors

Message Port Cause and fix
user_id is required error user_id is empty or its expression resolved to an empty value. Check the expression against the input item.

Input contract

user_id string Required
purpose string Required

Output contract

consented boolean Optional
timestamp string Optional

Contracts (JSON Schema)

The definition exactly as the orchestrator declares it. All is the whole *.definition.js; compare it with the sections above to spot differences between the documentation and the schema. Use it to validate a node before you publish.

{
  "slug": "consent.check",
  "name": "Check Consent",
  "category": "identity",
  "version": "1.0.0",
  "description": "Checks if User has consented to activity.",
  "capabilities": [
    "privacy",
    "consent"
  ],
  "config_schema": {
    "type": "object",
    "properties": {
      "user_id": {
        "type": "string"
      },
      "purpose": {
        "type": "string"
      }
    },
    "required": [
      "user_id",
      "purpose"
    ]
  },
  "input_contract_schema": {
    "type": "object",
    "properties": {
      "user_id": {
        "type": "string"
      },
      "purpose": {
        "type": "string"
      }
    },
    "required": [
      "user_id",
      "purpose"
    ]
  },
  "output_contract_schema": {
    "type": "object",
    "properties": {
      "consented": {
        "type": "boolean"
      },
      "timestamp": {
        "type": "string"
      }
    }
  },
  "ports": [
    {
      "port_id": "yes",
      "label": "Consented",
      "description": "User agreed",
      "is_default": true,
      "supports_condition": true
    },
    {
      "port_id": "no",
      "label": "Not Consented",
      "description": "User did not agree",
      "is_default": false,
      "supports_condition": true
    },
    {
      "port_id": "error",
      "label": "Error",
      "description": "Check failed",
      "is_default": false,
      "supports_condition": false
    }
  ],
  "execution_mode": "async",
  "required_resources": [],
  "compatible_worker_pools": [
    "identity-worker"
  ],
  "tags": [
    "privacy",
    "gdpr"
  ],
  "is_stateful": false,
  "publisher": {
    "identity": "org_veripass",
    "profile": {
      "name": "Veripass",
      "verified": true,
      "url": "https://me.veripass.com/veripass",
      "logo_url": null
    }
  }
}

Execution

Execution
async
Stateful
No
Capabilities
privacyconsent
Tags
privacygdpr

Notes and limits

  • Do not rely on this node to enforce consent: it never routes to no. Until a real consent source is connected, check consent with an explicit call (for example io.http) and a flow.if.
  • Leaving through error does not fail the run: the engine follows the edges wired to error, and if there are none the branch simply ends.

Reviewed against the orchestrator code · 31e874b · 2026-11-26

Install agent tools

Give your coding agent the official Sommatic AI docs: skills, the docs MCP server and Markdown pages, so it never has to scrape the site.

Skills only. They do not update by themselves; run it again to refresh.

npx skills add https://docs.sommatic.ai
How agents read these docs