Webhook - Output Component

Webhook - Output Component

Webhook Step

Send automated HTTP requests (GET, POST, PUT, DELETE) from within a workflow job to external systems such as MIS, REST APIs, or notification services.

Where: Workflow → add step Webhook. Configure URL, method, headers, and body with optional placeholders.

1. What it does

  • Sends a web request (GET, POST, PUT, or DELETE) to a specified URL when the step executes.
  • Variables such as job name, barcode, date/time, or custom keys are substituted into the URL, headers, and body.
  • Captures and logs the HTTP response (up to 8 KB) in the job journal for traceability.

2. Fields

FieldDescription
URLThe destination endpoint. Supports variable placeholders (see below).
MethodHTTP verb: GETPOSTPUT, or DELETE.
HeadersOptional key/value pairs such as Content-Type. A default header is automatically added based on your selected content type (JSON, XML, or Text).
BodyFor POST and PUT methods, the payload sent in the request. Can include placeholders like {JobName} or {DateTime}.

3. Placeholders

You can include dynamic variables in the URL, headers, or body. These are replaced at runtime based on the job’s properties.

PlaceholderMeaning
{JobName}Current job’s name.
{DocumentName}First document’s name in the job.
{Barcode}Job barcode, auto-generated if not present.
{DateTime}Current local date and time (YYYY-MM-DD HH:MM:SS).
{JobGuid}Job’s unique GUID.
{MediaType}Media type value from job settings.
{MediaSize}Media size or sheet format name.
{PrintDeadline}Earliest deadline among all parts.
{Key:YourKey}Any custom key defined in the workflow.

4. Example

Method: POST
URL: https://api.example.com/job/update?barcode={Barcode}
Headers:
Content-Type: application/json;charset=UTF-8
Body:
{
"jobName": "{JobName}",
"guid": "{JobGuid}",
"deadline": "{PrintDeadline}",
"media": "{MediaType}"
}

5. Response handling

  • Webhook captures responses up to 8 KB; larger payloads are truncated with a warning.
  • HTTP status 200–208 is treated as success; other codes trigger a logged error message.
  • Responses appear in the job’s workflow journal and job log for auditing.

6. Tips

  • Use the keyword selector in the dialog to insert placeholders quickly.
  • Test endpoints with simple GET first before enabling POST payloads.
  • For authentication, add headers such as Authorization: Bearer {Key:Token}.
  • Webhook can connect to MIS, RIP automation servers, Slack webhooks, or PrintFactory Cloud endpoints.
© PrintFactory — Knowledge Base