kind: tool-call

agentRole: orchestrator

toolName: build-workflow-with-agent

task: Build a simple workflow named "artifact click test" with a Manual Trigger node connected to a Set node. The Set node can be left with default/empty settings.

conversationContext: User wants a simple workflow named "artifact click test" with a Manual Trigger and a Set node.

reason: New simple workflow with manual trigger and set node as requested by user.

result: Error: `bypassPlan: true` is for edits to an EXISTING workflow and requires a `workflowId`. New workflow builds must go through `plan` so an orchestrator-run verification checkpoint is scheduled. Call `plan` with a `build-workflow` task instead.


agentRole: planner

toolName: add-plan-item

summary: Build a simple two-node workflow named 'artifact click test' with a manual trigger and a Set node.

assumptions: The Set node will contain a sample static field as a placeholder (e.g. a 'message' field with a test value)

artifact click test

purpose: A minimal workflow with a manual trigger connected to a Set node. Used for testing artifact click behavior. The Set node can hold any sample fields as needed.

result: Added: Build 'artifact click test' workflow (1 item total)


title: Verify 'artifact click test' workflow runs without errors

instructions: Use verify-built-workflow with the work item ID from the build outcome for workflow 'artifact click test'. Confirm the run completes without errors and the Set node produces output.

result: Added: Verify 'artifact click test' workflow runs without errors (2 items total)


kind: tool-suspend

toolName: submit-plan

message: Review the plan (2 tasks) before execution starts.

description: Build 'artifact click test' workflow

description: Verify 'artifact click test' workflow runs without errors

title: Build 'artifact click test' workflow

spec:
A minimal workflow with a manual trigger connected to a Set node. Used for testing artifact click behavior. The Set node can hold any sample fields as needed.
Trigger: Manual trigger

Assumptions:
- The Set node will contain a sample static field as a placeholder (e.g. a 'message' field with a test value)

title: Verify 'artifact click test' workflow runs without errors

spec: Use verify-built-workflow with the work item ID from the build outcome for workflow 'artifact click test'. Confirm the run completes without errors and the Set node produces output.

severity: info

inputType: plan-review

description: Build 'artifact click test' workflow

status: todo

description: Verify 'artifact click test' workflow runs without errors

title: Build 'artifact click test' workflow

kind: build-workflow

spec:
A minimal workflow with a manual trigger connected to a Set node. Used for testing artifact click behavior. The Set node can hold any sample fields as needed.
Trigger: Manual trigger

Assumptions:
- The Set node will contain a sample static field as a placeholder (e.g. a 'message' field with a test value)

kind: checkpoint

spec: Use verify-built-workflow with the work item ID from the build outcome for workflow 'artifact click test'. Confirm the run completes without errors and the Set node produces output.


agentRole: workflow-builder

toolName: build-workflow

code:
import { workflow, node, trigger, expr } from '@n8n/workflow-sdk';

const manualTrigger = trigger({
  type: 'n8n-nodes-base.manualTrigger',
  version: 1,
  config: { name: 'Manual Trigger' }
});

const setNode = node({
  type: 'n8n-nodes-base.set',
  version: 3.4,
  config: {
    name: 'Set Sample Fields',
    parameters: {
      mode: 'manual',
      includeOtherFields: false,
      assignments: {
        assignments: [
          {
            id: 'field-message',
            name: 'message',
            value: 'Hello, this is a test value!',
            type: 'string'
          }
        ]
      }
    }
  }
});

export default workflow('wf-artifact-click-test', 'artifact click test')
  .add(manualTrigger)
  .to(setNode);