kind: tool-call

agentRole: orchestrator

toolName: build-workflow-with-agent

task:
Build a workflow with:
1. A Manual Trigger node
2. A Wait node set to 1 second
3. A Set node named "running state test"

Connect them in order: Manual Trigger → Wait (1 second) → Set node ("running state test")

conversationContext: User wants a simple 3-node workflow: Manual Trigger → Wait (1 second) → Set node named "running state test". After building, they want to run it.

result: Workflow build started (task: build-6LEDNgVD). Reply with one short sentence — e.g. name what's being built. Do NOT summarize the plan or list details.


agentRole: workflow-builder

toolName: nodes

query: Wait

description: Wait before continue with execution

description: Sends data to Discord

description: Sends an email using SMTP protocol

description: Consume Google Chat API

description: Consume the Gmail API

description: Merges data of multiple streams once data from both is available

inputs:
={{((parameters) => {
    return Array.from({ length: parameters.numberInputs || 2 }, (_, i) => ({
        type: 'main',
        displayName: `Input ${(i + 1).toString()}`,
    }));
})($parameter)}}

description: Consume Microsoft Outlook API

message

operations: delete get get_all move reply send send_and_wait update

description: Consume Microsoft Teams API

description: Consume Slack API

channel

operations: archive close create get get_all history invite join kick leave member open rename replies set_purpose set_topic unarchive

message

operations: delete get_permalink post search send_and_wait update

description: Sends data to Telegram

chat

operations: administrators get leave member set_description set_title

description: Send a message into the chat

inputs:
={{ ((parameters) => {
    const inputs = [
        {
            type: 'main',
        },
    ];
    if (parameters.options?.memoryConnection) {
        return [
            ...inputs,
            {
                type: 'ai_memory',
                displayName: 'Memory',
                maxConnections: 1,
            },
        ];
    }
    return inputs;
})($parameter) }}

description: Access WhatsApp API

description: Request human approval for tools

description: Sends data to AWS Transcribe

description: Writes a binary file to disk

description: Write a tool in JS or Python

description: Work with your data in a Weaviate Cluster

inputs:
={{
			((parameters) => {
				const mode = parameters?.mode;
				const useReranker = parameters?.useReranker;
				const inputs = [{ displayName: "Embedding", type: "ai_embedding", required: true, maxConnections: 1}]

				if (['load', 'retrieve', 'retrieve-as-tool'].includes(mode) && useReranker) {
					inputs.push({ displayName: "Reranker", type: "ai_reranker", required: true, maxConnections: 1})
				}

				if (mode === 'retrieve-as-tool') {
					return inputs;
				}

				if (['insert', 'load', 'update'].includes(mode)) {
					inputs.push({ displayName: "", type: "main"})
				}

				if (['insert'].includes(mode)) {
					inputs.push({ displayName: "Document", type: "ai_document", required: true, maxConnections: 1})
				}
				return inputs
			})($parameter)
		}}

outputs:
={{
			((parameters) => {
				const mode = parameters?.mode ?? 'retrieve';

				if (mode === 'retrieve-as-tool') {
					return [{ displayName: "Tool", type: "ai_tool"}]
				}

				if (mode === 'retrieve') {
					return [{ displayName: "Vector Store", type: "ai_vectorStore"}]
				}
				return [{ displayName: "", type: "main"}]
			})($parameter)
		}}

description: Throw an error in the workflow

description: Work with your data in Azure AI Search Vector Store

inputs:
={{
			((parameters) => {
				const mode = parameters?.mode;
				const useReranker = parameters?.useReranker;
				const inputs = [{ displayName: "Embedding", type: "ai_embedding", required: true, maxConnections: 1}]

				if (['load', 'retrieve', 'retrieve-as-tool'].includes(mode) && useReranker) {
					inputs.push({ displayName: "Reranker", type: "ai_reranker", required: true, maxConnections: 1})
				}

				if (mode === 'retrieve-as-tool') {
					return inputs;
				}

				if (['insert', 'load', 'update'].includes(mode)) {
					inputs.push({ displayName: "", type: "main"})
				}

				if (['insert'].includes(mode)) {
					inputs.push({ displayName: "Document", type: "ai_document", required: true, maxConnections: 1})
				}
				return inputs
			})($parameter)
		}}

outputs:
={{
			((parameters) => {
				const mode = parameters?.mode ?? 'retrieve';

				if (mode === 'retrieve-as-tool') {
					return [{ displayName: "Tool", type: "ai_tool"}]
				}

				if (mode === 'retrieve') {
					return [{ displayName: "Vector Store", type: "ai_vectorStore"}]
				}
				return [{ displayName: "", type: "main"}]
			})($parameter)
		}}

description: Work with your data in Zep Vector Store

inputs:
={{
			((parameters) => {
				const mode = parameters?.mode;
				const useReranker = parameters?.useReranker;
				const inputs = [{ displayName: "Embedding", type: "ai_embedding", required: true, maxConnections: 1}]

				if (['load', 'retrieve', 'retrieve-as-tool'].includes(mode) && useReranker) {
					inputs.push({ displayName: "Reranker", type: "ai_reranker", required: true, maxConnections: 1})
				}

				if (mode === 'retrieve-as-tool') {
					return inputs;
				}

				if (['insert', 'load', 'update'].includes(mode)) {
					inputs.push({ displayName: "", type: "main"})
				}

				if (['insert'].includes(mode)) {
					inputs.push({ displayName: "Document", type: "ai_document", required: true, maxConnections: 1})
				}
				return inputs
			})($parameter)
		}}

outputs:
={{
			((parameters) => {
				const mode = parameters?.mode ?? 'retrieve';

				if (mode === 'retrieve-as-tool') {
					return [{ displayName: "Tool", type: "ai_tool"}]
				}

				if (mode === 'retrieve') {
					return [{ displayName: "Vector Store", type: "ai_vectorStore"}]
				}
				return [{ displayName: "", type: "main"}]
			})($parameter)
		}}


description: Wait before continue with execution

resume

description: Determines the waiting mode to use before the workflow continues

incomingAuthentication

description: If and how incoming resume-webhook-requests to $execution.resumeFormUrl should be authenticated for additional security

description: If and how incoming resume-webhook-requests to $execution.resumeUrl should be authenticated for additional security

dateTime

description: The date and time to wait for before continuing

amount

description: The time to wait

description: The time to wait

unit

description: The time unit of the Wait Amount value

description: The time unit of the Wait Amount value

webhookNotice

displayName: The webhook URL will be generated at run time. It can be referenced with the $execution.resumeUrl variable. Send it somewhere before getting to this node. More info

formNotice

displayName: The form url will be generated at run time. It can be referenced with the $execution.resumeFormUrl variable. Send it somewhere before getting to this node. More info

formTitle

description: Shown at the top of the form

formDescription

description: Shown underneath the Form Title. Can be used to prompt the user on how to complete the form. Accepts HTML. Does not accept <script>, <style> or <input> tags.

responseMode

description: When to respond to the form submission

httpMethod

description: The HTTP method of the Webhook call

responseCode

description: The HTTP Response code to return

responseMode

description: When and how to respond to the webhook

responseData

description: What data should be returned. If it should return all items as an array or only the first item as object.

responseBinaryPropertyName

description: Name of the binary property to return

limitWaitTime

description: Whether to limit the time this node should wait for a user response before execution resumes

limitType

description: Sets the condition for the execution to resume. Can be a specified date or after some time.

resumeAmount

description: The time to wait

resumeUnit

description: Unit of the interval value

maxDateAndTime

description: Continue execution after the specified date and time

default

responseCode:
={{((parameters) => {
    if (parameters.responseCode) {
        return parameters.responseCode;
    }
    const responseCodeOptions = parameters.options;
    if (responseCodeOptions?.responseCode?.values) {
        const { responseCode, customCode } = responseCodeOptions.responseCode.values;
        if (customCode) {
            return customCode;
        }
        return responseCode;
    }
    return 200;
})($parameter)}}

responseData: ={{$parameter["responseMode"] === "lastNode" ? "noData" : undefined}}


toolName: workflows

query: running state test


toolName: build-workflow

Manual Trigger - Wait - Set

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

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

const waitNode = node({
  type: 'n8n-nodes-base.wait',
  version: 1.1,
  config: {
    name: 'Wait',
    parameters: {
      resume: 'timeInterval',
      amount: 1,
      unit: 'seconds'
    }
  }
});

const setNode = node({
  type: 'n8n-nodes-base.set',
  version: 3.4,
  config: {
    name: 'running state test',
    parameters: {}
  }
});

export default workflow('running-state-test', 'Manual Trigger - Wait - Set')
  .add(manualTrigger)
  .to(waitNode)
  .to(setNode);


kind: tool-resume

toolName: executions

Manual Trigger:
<untrusted_data source="execution-output" label="node:Manual Trigger">
[
  {}
]
</untrusted_data>

Wait:
<untrusted_data source="execution-output" label="node:Wait">
[
  {}
]
</untrusted_data>