POST JSON to a webhook
POST a JSON payload to an arbitrary webhook URL, with an optional Authorization header read from a Kubernetes Secret.
Install v1.0.1
Installs the template into your Argo namespace. The URL is pinned to this version.
kubectl apply -n argo -f https://catalog.dagweave.com/api/v1/items/webhook-post/1.0.1/template.yaml
Or with the Argo CLI:
argo template create -n argo https://catalog.dagweave.com/api/v1/items/webhook-post/1.0.1/template.yaml
Facts
- Category
- HTTP
- Tags
- curl http
- Entrypoint
post- Template SHA-256
2cafc788a8a4868c921dde72043bb1026fba58867e65ed336a9f7a1ab708205c- Source
- webhook-post at catalog commit 67458f7
- API
- item document, latest template.yaml
Images and provenance
Every image is pinned by digest, so a rebuilt tag can never change what this version runs.
| Repository | Tag | Digest |
|---|---|---|
curlimages/curl | 8.23.0 | sha256:3fb7e13e5d179a845c97d78204f3f1064d1907037f26a3ebf91710571151fd93 |
Parameters
| Name | Description | Default |
|---|---|---|
json-body required |
The raw JSON payload to send as the request body. Example {"event":"deploy","status":"ok"} |
none |
url required |
Absolute webhook URL to POST the JSON payload to. Example https://hooks.example.com/services/T000/B000/XXXX |
none |
auth-secret-key |
Key within the Secret that holds the Authorization header value. | authorization |
auth-secret-name |
Name of the Kubernetes Secret holding an optional Authorization header value (e.g. "Bearer abc123"). If the Secret is absent the header is omitted. | webhook-auth |
WorkflowTemplate
apiVersion: argoproj.io/v1alpha1
kind: WorkflowTemplate
metadata:
name: webhook-post
labels:
dagweave.io/catalog-item: webhook-post
annotations:
# The catalog semver this manifest was authored at. The dagweave app records
# (catalog-item-id, semver) -> content-hash -> base-vN when it mints the tenant
# cluster name via ResolveOrMint. Keep in sync with metadata.yaml `version`.
dagweave.io/catalog-version: "1.0.1"
dagweave.io/catalog-category: "HTTP"
spec:
entrypoint: post
templates:
- name: post
inputs:
parameters:
# Absolute webhook URL to POST the JSON payload to.
- name: url
# The raw JSON payload to send as the request body.
- name: json-body
# Name/key of a Kubernetes Secret holding an Authorization header value
# (e.g. "Bearer abc123"). Optional: if the Secret or key is absent the
# Authorization header is simply omitted.
- name: auth-secret-name
default: webhook-auth
- name: auth-secret-key
default: authorization
container:
# Pinned by digest per the catalog convention: an image rebuild can never
# silently change the behaviour of an already-released item version.
# curlimages/curl:8.23.0
image: curlimages/curl@sha256:3fb7e13e5d179a845c97d78204f3f1064d1907037f26a3ebf91710571151fd93
command: [sh, -c]
# Values are passed as env vars (below), never interpolated into the shell,
# so a payload containing quotes or shell metacharacters is safe. The
# optional Authorization header is appended via positional params so a blank
# value never leaks a stray flag into the curl invocation.
args:
- |
set -eu
if [ -n "${AUTH_HEADER:-}" ]; then
set -- -H "Authorization: ${AUTH_HEADER}"
else
set --
fi
curl -sSf -X POST "${URL}" \
-H "Content-Type: application/json" \
--data-raw "${JSON_BODY}" \
"$@"
env:
- name: URL
value: "{{inputs.parameters.url}}"
- name: JSON_BODY
value: "{{inputs.parameters.json-body}}"
- name: AUTH_HEADER
valueFrom:
secretKeyRef:
name: "{{inputs.parameters.auth-secret-name}}"
key: "{{inputs.parameters.auth-secret-key}}"
optional: true
Version history
Read from the item's changelog. Each version has its own JSON document; the pinned catalogue vendors the manifest of the latest one, so that is the version that installs.
-
1.0.1 latest 2026-08-02
Move curlimages/curl from 8.11.1 to 8.21.0. Fixable CRITICAL/HIGH drops from 26 to 1.
kubectl apply -n argo -f https://catalog.dagweave.com/api/v1/items/webhook-post/1.0.1/template.yamlargo template create -n argo https://catalog.dagweave.com/api/v1/items/webhook-post/1.0.1/template.yaml -
1.0.0 2026-07-17
Initial release.
This release is documented, but its manifest is not vendored here, so it has no install command. Version document
Run it once
After installing, from the command line.
argo submit -n argo --from workflowtemplate/webhook-post \
-p json-body='{"event":"deploy","status":"ok"}' \
-p url=https://hooks.example.com/services/T000/B000/XXXX
Workflow that references it
A Workflow with the required parameters filled from the examples.
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: webhook-post-
spec:
workflowTemplateRef:
name: webhook-post
arguments:
parameters:
- name: json-body
value: "{\"event\":\"deploy\",\"status\":\"ok\"}"
- name: url
value: "https://hooks.example.com/services/T000/B000/XXXX"
As a step of a larger workflow
steps:
- - name: webhook-post
templateRef:
name: webhook-post
template: post