Preview an import
POST/
Shows what a workflow exported from another automation tool would become, without making anything.
Needs an API token with the Read permission for workflows (workflow:read).
Parameters
Body
The exported file, as the other tool wrote it. Up to 5 MiB.
Why two installations can differ
The preview maps only to apps this installation can run. The same file can map further elsewhere.
A GoRunner export needs no preview: send it to Import a workflow, which explains the report’s fields.
Responses
- 200OK
The report, with
formatexternal(detected from the file). For a file that is not an export it reads,formatis empty,reportisnullandmessagesays why. - 403
FORBIDDENThe token lacks the Read permission for workflows.
The file names its format but can’t be read.
Something failed on GoRunner’s side. Try again.
GoRunner couldn’t check which apps this workspace may use. Nothing changed. Try again.
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/workflows/import/preview" \
-H "Authorization: Bearer $GORUNNER_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Order intake",
"nodes": [
{
"name": "Webhook",
"type": "webhook",
"parameters": {
"path": "orders"
}
}
],
"connections": {}
}'const GORUNNER = "https://api.gorunner.io";
const TOKEN = process.env.GORUNNER_TOKEN;
const res = await fetch(
`${GORUNNER}/api/workflows/import/preview`,
{
method: "POST",
headers: {
Authorization: `Bearer ${TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
name: "Order intake",
nodes: [
{
name: "Webhook",
type: "webhook",
parameters: { path: "orders" },
},
],
connections: {},
}),
},
);
const { data } = await res.json();import os, requests
GORUNNER = "https://api.gorunner.io"
TOKEN = os.environ["GORUNNER_TOKEN"]
res = requests.post(
f"{GORUNNER}/api/workflows/import/preview",
headers={"Authorization": f"Bearer {TOKEN}"},
json={
"name": "Order intake",
"nodes": [
{
"name": "Webhook",
"type": "webhook",
"parameters": {"path": "orders"},
},
],
"connections": {},
},
)
data = res.json()["data"]Response · 200 OK, shortened
{
"data": {
"format": "external",
"report": {
"format": "external",
"name": "Order intake",
"nodes": [
{
"sourceName": "Slack",
"sourceType": "slack",
"outcome": "mapped",
"pieceId": "slack",
"stepName": "slack",
"ready": false,
"note": "Choose a connection and check the fields.",
"leftovers": 2
}
],
"mappedCount": 1,
"substitutedCount": 0,
"parkedCount": 0,
"needsAttention": 1,
"stepsWithLeftovers": 1
}
}
}Every field
Body: object.
The exported file, verbatim, as the other tool wrote it.
Response · 200 OK
dataobjectformatstringDetected from the file:
externalfor another automation tool’s export, empty when the file is not an export this importer reads.One of
external,.reportobject or nullNull when
formatis empty.One of:
formatandnameandnodesandmappedCountandsubstitutedCountandparkedCountandneedsAttentionandstepsWithLeftoversandwarnings, or null.formatstringDetected from the file: always
external(another automation tool’s export).One of
external.namestringThe name the source file gave the workflow.
nodesarray of objectssourceNamestringWhat the source file called it, so a person can find it there.
sourceTypestringThe source node’s own short type, without the source tool’s package prefix, e.g.
slackorhttpRequest.outcomestringmapped— an app here does that job.substituted— no app for it, but a generic one does the same work.parked— nothing here does it, so the step is an invalid No Op carrying the original settings.One of
mapped,substituted,parked.pieceIdstringThe GoRunner app it became.
no-opon a parked step.stepNamestringIts name here — what an expression referencing it says.
readybooleanWhether the step runs as imported. False asks for a visit: a connector can be MAPPED and still need its fields, because a foreign node’s settings rarely mean the same thing here.
notestringThe honest sentence for this row.
leftoversintegerHow many of the source’s own settings are still on this node because there was no field for them. Present even when
readyis true — a step can run and still be unfinished.mappedCountintegersubstitutedCountintegerparkedCountintegerneedsAttentionintegerHow many steps cannot run as imported — the number that decides whether this is a draft to finish or a draft to publish.
stepsWithLeftoversintegerHow many nodes still hold settings the translation could not place, whether or not they can run. NOT the same question as needsAttention: a step can run exactly as imported and still be carrying settings the original had, so a flow can be fully valid and still have translation left in it.
warningsarray of stringsFile-level things the reader should know: a shape that had to be flattened (the source ran a fan-out in parallel, this product runs one chain), nodes nothing reached, comments left behind, expressions that need rewriting.
messagestringPresent only when the file is neither format.