fix: content type of webhook (#25032)

This commit is contained in:
非法操作
2025-09-03 15:13:01 +08:00
committed by GitHub
parent 5ce7b2d98d
commit 7120c6414c
3 changed files with 111 additions and 20 deletions

View File

@ -7,7 +7,7 @@ from core.workflow.nodes.base import BaseNode
from core.workflow.nodes.base.entities import BaseNodeData, RetryConfig
from core.workflow.nodes.enums import ErrorStrategy, NodeType
from .entities import WebhookData
from .entities import ContentType, WebhookData
class TriggerWebhookNode(BaseNode):
@ -104,6 +104,11 @@ class TriggerWebhookNode(BaseNode):
param_name = body_param.name
param_type = body_param.type
if self._node_data.content_type == ContentType.TEXT:
# For text/plain, the entire body is a single string parameter
outputs[param_name] = str(webhook_data.get("body", {}).get("raw", ""))
continue
if param_type == "file":
# Get File object (already processed by webhook controller)
file_obj = webhook_data.get("files", {}).get(param_name)