- Documentation
- Use cases
- Look up which templates ship with your account
Look up which templates ship with your account
A new account ships with no starter templates. Reference the template scopes, the variable types a template can declare, and their constraints.
What you start with
A brand-new account has an empty templates list. No starter or sample templates are installed when you sign up.
Open Templates in the account sidebar on a fresh account and you see the empty state:
No templates yet Author your first template from a published workflow.
Templates in TaskJuice are something you create, not something you browse. The path to your first reusable template is to publish a workflow, then save that published workflow as a template. See Save a workflow as a template for the full procedure.
TaskJuice does not ship a gallery of ready-made automations you can install with one click. The
/templates list shows only templates your own account has authored. The /marketplace page is a
separate, unreleased partner directory, not a template gallery.
Where templates come from
Every template in your list has one of two scopes, shown as a badge on the templates table and the template detail header.
| Scope badge | Who authored it | Re-publishable by you |
|---|---|---|
| Tenant | Your account, by saving a published workflow as a template | Yes |
| Platform | TaskJuice, shipped to every account | No |
Today, only Tenant templates exist in practice, because they are the ones you create. Platform templates are described below for completeness, but none are installed on any account yet.
Platform templates (not yet available)
TaskJuice defines three platform-scope templates internally, but they are not installed on accounts and do not appear in your list. They are listed here so you know what the names mean if you see them referenced elsewhere. Do not plan around them; treat them as not-yet-available.
| Template | Trigger style | Declared variable | Variable type |
|---|---|---|---|
| Onboarding email sequence | Webhook (new customer signs up) | fromAddress (From address) | string, required |
| Lead qualifier | Webhook (inbound lead) | qualificationThreshold (Qualification threshold) | number, integer, 0 to 100, required |
| Status digest | Scheduled (daily) | digestChannel (Digest channel) | channel-ref (Slack), required |
Each of these defines a single placeholder graph node and a single variable. When platform templates become available, they will appear in every account's list with a Platform badge and cannot be re-published or edited from your account.
Template variables reference
The interesting part of "what a template ships with" is its variables. When you apply a template, TaskJuice reads the variable definitions from the template's latest revision and renders a form. You fill in a value for each one, and that value is available inside the cloned workflow as $vars.<key> in any JSONata expression.
A template revision can declare up to 50 variables.
Variable definition fields
Every variable in a template revision has these fields.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
key | string | Yes | None | The $vars.<key> name. Must match ^[a-z_]\w{0,79}$ (case-insensitive), 1 to 80 characters. |
label | string | Yes | None | Display name in the form, 1 to 60 characters. |
description | string | No | None | Helper text under the field, up to 280 characters. |
required | boolean | Yes | None | Whether the field must be filled before the template can be applied. |
defaultValue | any | No | None | Value pre-filled in the form. |
type | object | Yes | None | The variable kind and its constraints. See the next table. |
Variable kinds
The type field is one of seven kinds. Each renders a dedicated field in the apply form.
kind | Form field | Constraints |
|---|---|---|
string | Text input | minLength and maxLength (each 0 to 8192), pattern (regex string, up to 512 characters) |
number | Number input | min, max, integer (boolean) |
boolean | Toggle | None |
enum | Select | values: 1 to 50 entries of { label, value } (label up to 60 chars, value up to 120 chars) |
connection-ref | Connection picker | provider: an app slug matching ^[a-z][a-z0-9-]{0,63}$; narrows to that provider's connections in the target workspace |
channel-ref | Channel picker | channelKind: one of slack, discord, teams |
expression | Expression editor | resultSchema: a JSON Schema object describing the expected result |
A connection-ref variable narrows the picker to a single provider. If the target workspace has no connection for that provider, the field shows:
No {provider} connections in this workspace yet. Add one in the workspace integrations settings, then return to this template.
Example: a template variable list
This is what a two-variable definition looks like, using the same field shape TaskJuice validates against.
[
{
"key": "fromAddress",
"label": "From address",
"description": "Sender address shown on outbound onboarding emails.",
"required": true,
"type": { "kind": "string", "maxLength": 320 }
},
{
"key": "qualificationThreshold",
"label": "Qualification threshold",
"description": "Minimum score (0-100) that routes a lead as hot.",
"required": true,
"type": { "kind": "number", "integer": true, "min": 0, "max": 100 }
}
]When you apply a template with variables
The template detail page shows an Apply template button once the template has at least one published revision. Applying it opens a dialog that first asks you to pick a target workspace, then renders the variable form if the latest revision declares any variables.
Required fields show a red asterisk. If you leave one empty and try to continue, you get a client-side toast:
Missing required variable Fill in "{label}" before continuing.
On success, TaskJuice clones the template's graph into a new, independent workflow in the workspace you chose and opens it in the editor. The values you entered are bound as $vars.<key>.
Failure cases
These errors surface when a variable value or a template reference is rejected by the server.
| Code | HTTP | When it happens |
|---|---|---|
template.variable.invalid | 422 | A variable value fails its declared constraints (wrong type, out of range, fails the regex pattern). |
template.variable.cross_workspace_connection | 403 | A connection-ref value points at a connection that belongs to a different workspace than the one you are applying into. |
template.not_found | 404 | The template you tried to apply has no published revision yet, or does not exist. |
template.variable.schema_evolution_unsupported | 422 | A later revision changed a variable's type. Detach the instance and re-apply the template instead. |
Invalid request bodies return HTTP 422 with a fieldErrors array, where each entry is { field, code, message } so you can map the error back to the offending field.
Related
- Find and apply a template walks through applying a template end to end.
- Save a workflow as a template is how every template in your list gets created.
- Expressions explains the
$varsalias and JSONata syntax that variables feed into.