Workflow steps

tools.convert

type: "tools.convert"

Converts a document between formats inside a chain. The pair is checked when the workflow is saved.

1 creditfrom and to requiredthe pair is validated
Using Python?

Switch any code block to Python: the choice applies to every page. Python SDK guide and resource reference.

fromstringrequired

The source format.

tostringrequired

The target. The pair is checked on save.

urlstring

Fetch the source from there.

contentstring

The source as text.

base64string

The source as bytes.

One of url, content and base64 is required — none of them, and the definition is refused.

{ id: "pdf", type: "tools.convert", config: {
    from: "markdown", to: "pdf", content: "{{steps.write.output.text}}" } }
{"id": "pdf", "type": "tools.convert", "config": {
    "from": "markdown", "to": "pdf", "content": "{{steps.write.output.text}}"}}

An impossible pair never reaches a run

Checked against the real matrix, on save

244 pairs exist. A conversion that is not one of them is refused where you are reading the message, rather than failing on the fifth step of a scheduled run.

Output

{{steps.pdf.output.base64}}       // binary targets
{{steps.pdf.output.content}}      // text targets
{{steps.pdf.output.mimeType}}
"{{steps.pdf.output.base64}}"      # binary targets
"{{steps.pdf.output.content}}"     # text targets
"{{steps.pdf.output.mimeType}}"

Saving it

Pass base64 straight to a file.save step as contentBase64 — that is how a drafted report becomes a PDF in a bucket.