Skip to main content

HTTP File-In

Overview

The HTTP File-In trigger starts a workflow iteration when an external client uploads one or more files with an HTTP multipart/form-data POST request.

Purpose

Use this trigger when an external system, script, webhook, or web application needs to send files directly into a B2Win Suite workflow.

Configuration

FieldDescription
Log RequestCaptures standard HTTP request metadata and form/query values as properties.
Read file content to propertyWhen checked, the uploaded file content is loaded into HTTP_FILE_IN_CONTENT where supported by the file type.

Outputs

OutputData TypeCollectionDescription
OutputFileNodeFileFalseThe trigger outputs a NodeFile for each uploaded file. If multiple files are sent in one request, they are processed sequentially.

Properties

PropertyFlowDataTypeDescription
REQUEST_CONTENT_TYPEStringRequest content type.
REQUEST_HEADERSJsonNodeRequest headers as JSON.
REQUEST_QUERY_STRINGJsonNodeQuery string values as JSON.
REQUEST_SECUREDBoolean
REQUEST_VERSIONString
REQUEST_REMOTE_ADDRESSString
REQUEST_METHODStringHTTP method used for the request.
REQUEST_PATHString
REQUEST_HOSTString
REQUEST_BODYString
HTTP_FILE_IN_FILEJsonNodeUploaded file metadata.
HTTP_FILE_IN_CONTENTJsonNodeFile content when Read file content to property is enabled.

Processing Logic

The trigger expects multipart/form-data. It reads uploaded file parts, copies each file to the trigger working directory, rejects restricted file extensions, loads the file into a NodeFile, and emits an iteration for each file.

Restricted extensions are exe, class, java, dll, bat, and sh.

Examples

Trigger URL Format

The node dialog shows the generated URL. The backend trigger endpoint uses this format:

http://<ServerAddress>:<Port>/trigger/<WorkflowID>/<Environment>/<TriggerID>
  • <ServerAddress>: Your B2Win Suite server hostname.
  • <Port>: The server HTTP port.
  • <WorkflowID>: The workflow id.
  • <Environment>: DEV for development or PROD for production.
  • <TriggerID>: The HTTP File-In node id.

Sending a File

Use an HTTP POST request with multipart/form-data encoding to send a file to the generated URL:

curl -X POST \
"http://your-server:9000/trigger/<WorkflowID>/PROD/<TriggerID>" \
-F "file=@/path/to/your/file.pdf"

You can also pass additional data as query parameters or form fields:

curl -X POST \
"http://your-server:9000/trigger/<WorkflowID>/PROD/<TriggerID>?invoiceId=12345&company=Acme" \
-F "file=@invoice.pdf"

This creates properties invoiceId = "12345" and company = "Acme" on the resulting iteration, which downstream nodes can read using ${invoiceId} and ${company}.

Notes / Limitations

  • The request must be multipart/form-data.
  • At least one file part is required.
  • Each uploaded file creates its own emitted output.
  • Use HTTP Trigger for requests that do not upload files.