This commit is contained in:
Typer_Body
2026-05-08 00:56:27 +08:00
parent eb9f38b102
commit 75fdfe6806
51 changed files with 1585 additions and 1643 deletions
+20 -20
View File
@@ -15,33 +15,33 @@ from ..node import WorkflowNode, workflow_node, NodePort, NodeConfig
class N8nWorkflowNode(WorkflowNode):
"""n8n workflow node - call n8n workflow API"""
type_name = "n8n_workflow"
category = "integration"
icon = "Workflow"
name = "n8n_workflow"
description = "n8n_workflow"
name_zh = "n8n 工作流"
name_en = "N8n Workflow"
description_zh = "通过 webhook 调用 n8n 工作流"
description_en = "Call an n8n workflow via webhook"
type_name = 'n8n_workflow'
category = 'integration'
icon = 'Workflow'
name = 'n8n_workflow'
description = 'n8n_workflow'
name_zh = 'n8n 工作流'
name_en = 'N8n Workflow'
description_zh = '通过 webhook 调用 n8n 工作流'
description_en = 'Call an n8n workflow via webhook'
inputs: ClassVar[list[NodePort]] = []
outputs: ClassVar[list[NodePort]] = []
config_schema: ClassVar[list[NodeConfig]] = []
async def execute(self, inputs: dict[str, Any], context: ExecutionContext) -> dict[str, Any]:
webhook_url = self.get_config("webhook_url", "")
auth_type = self.get_config("auth_type", "none")
timeout = self.get_config("timeout", 120)
payload = inputs.get("payload", {})
webhook_url = self.get_config('webhook_url', '')
auth_type = self.get_config('auth_type', 'none')
timeout = self.get_config('timeout', 120)
payload = inputs.get('payload', {})
return {
"result": None,
"success": False,
"_debug": {
"webhook_url": webhook_url,
"auth_type": auth_type,
"timeout": timeout,
"payload": payload,
'result': None,
'success': False,
'_debug': {
'webhook_url': webhook_url,
'auth_type': auth_type,
'timeout': timeout,
'payload': payload,
},
}