Skip to Content
MCPRecipesRun a canvas workflow

Run a canvas workflow

Goal. Build a reusable image workflow once, with the product shot pinned as a default, then run it repeatedly changing only the background description.

Tools used. canvas_create or canvas_list, save_image_to_canvas, create_canvas_workflow, run_canvas_workflow, get_canvas_workflow_run, and run_snapshot for side-effect-free checks.

Requires. A full-access connection. Building needs canvas:read and canvas:write. Running additionally needs asset:read, image:generate, and job:manage.

The workflow tools are not listed by default. They answer to their exact name on a connection with no profile, and ?profile=advanced lists them. A ?profile=creative connection can run a workflow card but cannot call create_canvas_workflow. Reusable workflows are kept for compatibility while the Recipe interface is unavailable in production; for one-off images, generate_image_in_canvas is simpler and needs no workflow.

run_canvas_workflow can incur provider cost. Building the workflow is free; running it is not. Get explicit approval in the current turn before the run, and never re-call it after a failure or a timeout.


Part 1 — Build it (free)

Choose the task’s canvas

Use the canvas the person points at, or create one for the task with canvas_create and keep its handle. Every call below names that same canvas.

Save the fixed images first

Anything that stays the same on every run should be a durable node before the workflow exists. See Save an image and use it.

{ "name": "save_image_to_canvas", "arguments": { "imageUrl": "https://example.com/product-hero.png", "destination": "canvas:abc123:product-shots", "title": "Product hero — locked", "idempotencyKey": "product-hero-2026-10-05-01" } }

Keep the returned handle — say node:img8q4.

Getting the order wrong here is the mistake that costs the most later. A workflow built without pinned defaults makes every run re-supply the product shot.

Create the workflow

{ "name": "create_canvas_workflow", "arguments": { "destination": "canvas:abc123:product-shots", "name": "Product on seasonal backgrounds", "description": "Same product shot, new background per run.", "category": "Product Visualization", "tags": ["product", "seasonal"], "inputs": [ { "key": "product", "label": "Product shot", "description": "Locked. Do not substitute.", "type": "image", "referenceRole": "identity", "sourceNodeId": "node:img8q4", "useAsDefault": true }, { "key": "background", "label": "Background direction", "description": "Surface, colour, and light for this run.", "type": "text", "value": "matte cream, soft window light", "useAsDefault": false } ], "outputs": [ { "key": "hero", "label": "Hero image", "type": "image", "prompt": "Place the exact connected product on the described background. Preserve the product precisely — do not substitute, restyle, or redraw it.", "inputKeys": ["product", "background"], "size": "1024x1024" } ], "idempotencyKey": "seasonal-workflow-2026-10-05-01" } }

Things to notice:

  • useAsDefault: true on product is what lets later runs omit it.
  • Image inputs use sourceNodeId, never value. value is for text and sticky inputs only. An image input may also declare referenceRole (identity or style).
  • The output prompt says “preserve the exact connected product”. Otherwise the model treats the product as a suggestion.
  • An output may declare composition (single-frame, comparison, or grid) for panels inside each image.

category is one of Brand & Visual Design, Product Visualization, Marketing & Ads, or Content Package. Limits: 1–16 inputs, 1–8 outputs, and every inputKeys entry must name an input you declared. The schema is strict, so an unknown key is rejected.

Check: the response gives you the workflow with its workflowNodeId and a browser url.

Keep workflowNodeId. It is what run_canvas_workflow takes. And note what just happened: a workflow exists and nothing has generated. That separation is the point — you can build this on request without spending anything.

Stop

Building is done. Unless the person asked to run it in this message, the turn ends here:

Created “Product on seasonal backgrounds” as node:wf7k2m on canvas:abc123:product-shots. The product shot is pinned as a default, so a run only needs a background direction. I have not run it — running generates an image and uses your provider. Want me to?


Part 2 — Run it (paid)

Get explicit approval

The person must ask to run it, in the current conversation. Not “build me a workflow”, not a node labelled “hero image” sitting empty. Name what it will do:

This will generate 1 image using your connected provider. Run it?

Read the canvas

{ "name": "canvas_get", "arguments": { "canvasId": "canvas:abc123:product-shots" } }

Confirm the workflow card is still there and unchanged. A run can pin the version it expects and the canvas baseRevision; if the stored workflow changed, inspect it again before running.

Run with only what changes

{ "name": "run_canvas_workflow", "arguments": { "destination": "canvas:abc123:product-shots", "workflowNodeId": "node:wf7k2m", "inputs": { "background": "matte terracotta, low autumn sun, long soft shadows" }, "outputMode": "append", "idempotencyKey": "terracotta-run-2026-10-05-01", "waitSeconds": 45 } }

product is absent because it is a stored default. inputs accepts up to 16 entries, each value 1–8,000 characters, keyed by input key, exact portNodeId, or label. Image values must be node: or asset: handles. destination must be the canvas the workflow card lives on.

outputMode decides what happens to earlier results: reuse refills the workflow’s existing output slots and is the default on a connection with no profile; append creates fresh outputs and keeps earlier runs. A ?profile=creative connection defaults to append. Choose append unless the person wants the previous output replaced.

Check the response’s status. One of two things happened.

If it finished

You get the completed run with its outputs. Image outputs are resolved to their canvas nodes and come back with previews the model can inspect. Note the output node handles and skip to the last step.

If the wait ran out

You get the queued run back, with its status, the destination, the workflowNodeId, and a nextAction naming get_canvas_workflow_run.

This is not a failure, and it is the most dangerous moment in the recipe. Do not call run_canvas_workflow again. That starts a second paid run. The first one is still going.

Check on it instead. To look without side effects:

{ "name": "run_snapshot", "arguments": { "runId": "run:9f3a2b" } }

To reconcile and advance it:

{ "name": "get_canvas_workflow_run", "arguments": { "runId": "run:9f3a2b" } }

get_canvas_workflow_run is not a pure read: it synchronizes canvas state and submits the run’s remaining already-authorized image steps. It never starts anything the run did not already include. run_snapshot only reads, so it can lag the provider. Both are free, and both accept the run: handle or the recipeRunId a canvas node carries.

waitSeconds accepts 1–50 and defaults to 45. Raising it does not make the work faster.

Verify delivery

A run reporting success is not the same as delivered canvas content:

{ "name": "canvas_validate", "arguments": { "canvasId": "canvas:abc123:product-shots", "nodeIds": ["node:out5y6"] } }

Check: completionReview.doneClaimAllowed is true. Report what the server actually returned; do not describe a queued run as a finished image.

Run run:9f3a2b succeeded. Output image is node:out5y6 on canvas:abc123:product-shots. Review it here: https://app.gavana.ai/…

Use the workflow’s url, or the url from canvas_get.


Running it again

Each subsequent run needs a new idempotency key — different inputs, different intent, different key — and its own approval. One yes is one run.

{ "name": "run_canvas_workflow", "arguments": { "destination": "canvas:abc123:product-shots", "workflowNodeId": "node:wf7k2m", "inputs": { "background": "wet slate, blue hour, hard rim light" }, "outputMode": "append", "idempotencyKey": "slate-run-2026-10-05-02" } }

When it fails

SymptomCauseFix
400 “not a reusable workflow card on this canvas”workflowNodeId is a plain node, or destination points at another canvasPoint destination at the canvas holding the card.
409 “missing its Recipe identity”The card lost its Recipe provenanceRecreate the workflow. Do not retry the run.
toolset_not_enabled on create_canvas_workflowA creative-profile connection, or the URL excluded itUse a connection with no profile or ?profile=advanced.
Strict schema rejection on createAn unknown key, or an image input carrying valueImages use sourceNodeId.
Returns while still queuedThe wait ran outCheck with run_snapshot or get_canvas_workflow_run. Never re-run.
400 on get_canvas_workflow_runThe handle is an image run or a video jobUse the run: handle the workflow returned.
403 insufficient_scopeRunning needs five permissionsMost often job:manage, without which you can start work but not observe it.
Terminal provider failureThe provider rejected or failed the jobReport it and stop. Ask before any new attempt.

Common mistakes

MistakeWhy it hurts
Running because you just built itBuilding is not authorization. Two separate decisions.
Re-calling run_canvas_workflow after a timeoutA second paid run. The most expensive mistake on this page.
Leaving outputMode at its default when earlier results matterreuse refills the existing slots. Pass append to keep them.
Creating the workflow before saving the fixed imagesNo node handles to pin, so every run re-supplies the product.
Reusing one idempotency key across runsOne key, one intended payload.
Reporting a queued run as a finished imageCheck completionReview.doneClaimAllowed before claiming delivery.
Last updated on