Skip to main content
npayload is launching soon.
npayloadDocs
PipesConcepts

Node types

Triggers, logic nodes, action nodes, and AI agent nodes that compose Pipes workflows

Every Pipes workflow is a directed graph of nodes. Each node has a single responsibility: receive input, process it, and pass output to the next node. Nodes are grouped into four categories.

Trigger nodes

Triggers start a workflow execution. Every workflow needs exactly one trigger.

NodeDescriptionUse case
EventFires when a message is published to a channelReact to business events
ScheduleFires on a cron schedule or fixed intervalPeriodic batch processing
WebhookFires when an HTTP request is receivedExternal system integration
ManualFires when triggered by a user or API callOn-demand processing
FormFires when a form submission is receivedUser input workflows
npayloadFires on internal npayload events (subscription, DLQ)Platform automation
nthreadFires on agent session eventsAI agent orchestration

Example: event trigger

const workflow = await npayload.pipes.create({
  name: 'order-processor',
  trigger: {
    type: 'event',
    channel: 'orders',
    filter: { event: 'order.created' },
  },
});

Example: schedule trigger

const workflow = await npayload.pipes.create({
  name: 'daily-report',
  trigger: {
    type: 'schedule',
    cron: '0 9 * * *', // Every day at 9 AM
  },
});

Logic nodes

Logic nodes control flow, transform data, and make decisions.

NodeDescriptionUse case
ConditionIf/else branching based on expressionsRoute by event type
SwitchMulti-way branching (like switch/case)Route by category
LoopIterate over arrays or repeat until conditionBatch processing
DelayWait for a duration before continuingRate limiting, scheduling
ParallelExecute multiple branches simultaneouslyFan-out processing
MergeWait for multiple branches to completeFan-in aggregation
FilterDrop messages that do not match criteriaNoise reduction
TransformReshape, map, or enrich payloadsData normalization

Example: condition node

workflow.addNode({
  type: 'condition',
  expression: '{{ payload.amount > 1000 }}',
  trueBranch: 'fraud-check',
  falseBranch: 'process-payment',
});

Action nodes

Action nodes interact with external systems and services.

NodeDescriptionUse case
HTTPMake HTTP requests to any APICall external services
CodeRun custom JavaScript/TypeScriptComplex transformations
LogWrite to the workflow execution logDebugging, audit trail

Example: HTTP action

workflow.addNode({
  type: 'http',
  method: 'POST',
  url: 'https://api.fulfillment.com/orders',
  body: '{{ payload }}',
  headers: { Authorization: 'Bearer {{ secrets.FULFILLMENT_KEY }}' },
});

AI nodes

AI nodes bring intelligence into workflows as first-class citizens.

NodeDescriptionUse case
AgentAutonomous AI agent with tool accessComplex reasoning tasks
ClassifyCategorize input into predefined labelsIntent detection, routing
GenerateProduce text, summaries, or responsesContent creation, replies
ExtractPull structured data from unstructured inputEntity extraction, parsing

Example: classify node

workflow.addNode({
  type: 'classify',
  labels: ['support', 'sales', 'billing', 'urgent'],
  input: '{{ payload.message }}',
  outputField: 'category',
});

Example: agent node

workflow.addNode({
  type: 'agent',
  model: 'claude-sonnet-4-20250514',
  systemPrompt: 'You are a customer support agent...',
  tools: ['lookup-order', 'check-inventory', 'create-ticket'],
  input: '{{ payload }}',
});

Primitive nodes

Low-level nodes for direct data operations within your npayload instance.

NodeDescriptionUse case
QueryRead data from your instance databaseLookup, enrichment
MutationWrite data to your instance databaseState updates
PublishPublish a message to a channelEvent chaining
SubscribeCreate or update a subscriptionDynamic routing
BatchExecute multiple operations atomicallyTransactional updates

Next steps

Was this page helpful?

On this page