Form Hook icon

Form Hook

接收表单数据,支持文字和图片输入

Overview

This node implements a webhook that receives form data submissions, supporting both text and image inputs. It provides a user-friendly HTML form for GET requests to submit text and upload images, and processes POST requests to capture the submitted data. The node is useful for scenarios where users need to collect form inputs via a webhook, such as feedback forms, image uploads, or simple data collection from external sources.

Use Case Examples

  1. Collecting user feedback with optional image attachments.
  2. Uploading images along with descriptive text for processing in a workflow.
  3. Receiving JSON or multipart form data submissions from external applications.

Properties

Name Meaning
路径 The path of the webhook endpoint where the form data is submitted.
响应模式 Determines how the webhook response is handled: either by using a response node or returning immediately after the last node.

Output

JSON

  • text - The submitted text content from the form.
  • timestamp - The ISO timestamp when the data was received.
  • image
    • data - Base64-encoded image data if an image was uploaded.
    • mimeType - MIME type of the uploaded image.
    • fileName - Original file name of the uploaded image.

Dependencies

  • No external API dependencies, but the node requires a webhook URL to receive HTTP requests.

Troubleshooting

  • Ensure the webhook path matches the configured '路径' property to receive requests correctly.
  • If image uploads fail, verify that the content-type of the request is 'multipart/form-data' or 'application/json' with proper encoding.
  • For GET requests, the node serves an HTML form; ensure the client supports HTML rendering.
  • If the response mode is set to 'lastNode', the webhook returns immediately; ensure downstream nodes handle the response appropriately.

Discussion