Preview saving a template
POST/
Shows what saving a workflow as a template would leave out, without saving.
Needs an API token with the Read permission for workflows (workflow:read).
Parameters
Body
workflowIdRequired · UUIDThe workflow you would save.
Read it
blanked: values the copy leaves out, by step and field. bound: values that travel but arrive blank in another workspace, such as a choice filled from this account. scope: who would get the template.
Responses
- 200OK
What would be left out.
The body isn’t JSON, or
workflowIdisn’t a UUID.- 403
FORBIDDENThe token lacks the Read permission for workflows.
- 404
NOT_FOUNDNo workflow with this ID in the workspace.
The workflow couldn’t be read, so saving it would fail too.
Any call can also answer: 401 UNAUTHORIZED · 401 TOKEN_ENDED · 403 TOKEN_SURFACE_OFF · 403 FEATURE_OFF · 403 EMBED_NOT_ALLOWED · 403 EMBED_NOT_AVAILABLE · 403 ACCOUNT_SUSPENDED · 413 PAYLOAD_TOO_LARGE · 415 INVALID_CONTENT_TYPE · 429 RATE_LIMITED · 503 BUSY · 503 PAUSED · 503 SERVICE_UNAVAILABLE. See Errors.
Request
GORUNNER="https://api.gorunner.io"
GORUNNER_TOKEN="grt_…" # needs Read for workflows
curl -X POST "$GORUNNER/api/templates/save-preview" \
-H "Authorization: Bearer $GORUNNER_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"workflowId": "3b1e5c2a-7d4f-4e8b-a1c6-5f2d9b0e7a31"
}'const GORUNNER = "https://api.gorunner.io";
const TOKEN = process.env.GORUNNER_TOKEN;
const res = await fetch(
`${GORUNNER}/api/templates/save-preview`,
{
method: "POST",
headers: {
Authorization: `Bearer ${TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
workflowId: "3b1e5c2a-7d4f-4e8b-a1c6-5f2d9b0e7a31",
}),
},
);
const { data } = await res.json();import os, requests
GORUNNER = "https://api.gorunner.io"
TOKEN = os.environ["GORUNNER_TOKEN"]
res = requests.post(
f"{GORUNNER}/api/templates/save-preview",
headers={"Authorization": f"Bearer {TOKEN}"},
json={
"workflowId": "3b1e5c2a-7d4f-4e8b-a1c6-5f2d9b0e7a31",
},
)
data = res.json()["data"]Response · 200 OK
{
"data": {
"scope": "org",
"blanked": [
{
"step": "forward",
"stepLabel": "Forward to fulfilment",
"field": "auth_token",
"fieldLabel": "Bearer Token"
}
],
"bound": []
}
}Every field
Body
workflowIdRequired · UUID
Response · 200 OK
dataobjectscopestringWho would get it.
One of
org,workspace.blankedarray of objectsEach value saving would leave out.
stepstringThe step’s name (the trigger’s own name for the trigger).
stepLabelstringThe step as the canvas names it.
fieldstringThe top-level input key.
fieldLabelstringThe app’s title for the input.
boundarray of objectsValues that travel but arrive blank in any other workspace.
The same fields as
data.blankedabove.