Skip to main content

Custom apps

A custom app describes an HTTP API that isn't in the Apps catalogue: where requests go, how a connection signs in, which headers every request needs, the actions the app offers in workflows and the polling triggers that start them. Once saved, it works like an official app. You connect to it from its app page, its actions appear in the editor's toolbox as App Action nodes, and its triggers as App Trigger nodes.

Custom apps belong to a project. Creating and editing them needs the ConnectionsWrite permission. To use one in other projects, or let other workspaces use it, publish it to your workspace or the community.

:::note Formerly "connection definitions" Custom apps replace the Connections → Definitions page. The old URLs /connections/definitions and /connections/definitions/[id] redirect to /apps/custom and /apps/custom/[id]. :::

Create a custom app​

  1. Go to Apps and click Custom app, or open /apps/custom. The Custom apps page lists your custom apps together with the official apps and templates (marked Official), which you can open read-only.
  2. Click New custom app.
  3. In Start from, pick an existing HTTP app or template (only HTTP apps are listed). Its sign-in setup, base URL, headers, allowed domains, description, icon and actions are copied into the new app. For a typical REST API, start from a generic template such as API Key or Bearer Token.
  4. Enter a Name (for example Acme CRM) and click Create. The app's page opens.

To draft the sign-in setup from the provider's docs, open the arrow next to New custom app and choose Generate with AI.

Custom apps are HTTP APIs only. To connect a PostgreSQL, MySQL, SQL Server, SFTP, IMAP or SMTP server, use the official app of that kind (see Non-HTTP connections). An older custom app of one of those kinds opens read-only, and its existing connections keep working.

:::tip Starting from an official app Starting from an official app such as GitHub copies its actions and triggers too, which is a quick way to extend it. Official one-click OAuth variants use Blokkio's own OAuth app, and a copy doesn't. Start from the token variant instead, or add client_id and client_secret parameters to the copy's sign-in. :::

The app page​

The page at /apps/custom/[id] has five sections. Click Save at the top to store your changes. Nothing is saved until you do.

General​

FieldDescription
NameShown in the catalogue, on connections and in the toolbox.
KindREST API (HTTP), shown for information only: custom apps are HTTP APIs.
CategoryGroups the app in the catalogue, for example Developer tools. At most 64 characters. Empty means the app is listed under Custom.
Docs URLAbsolute http:// or https:// URL of the provider's API docs, for example https://docs.example.com/api. Shown as a link on the app page.
DescriptionShown on the catalogue card and the app page. At most 1000 characters.
IconSVG markup (starting with <svg) or an https:// image URL, at most 64 KB. Paste the markup, or click Upload .svg to read a file. Clear removes the icon. A preview is shown next to the field.

The icon is sanitized when you save. Scripts, event handlers, foreignObject, elements and attributes outside a safe SVG set, and references to anything other than a fragment in the same file (#id) are removed. Markup that isn't a valid SVG document is rejected.

Requests​

FieldDescription
Base URLAbsolute https:// (or http://) URL, for example https://api.example.com/v1. Action and trigger paths are relative to it, and so are the URLs of HTTP Request nodes that use a connection of this app (see Base URL and default headers). A trailing / is removed.
Test requestA method (GET, HEAD or POST) and a path relative to the base URL, for example GET /me, or a full URL. Test connection calls it with the connection's credentials; a 2xx response means the connection works. A relative path needs a base URL. A POST test request sends the JSON body from the app's manifest, for example one copied from an official app such as Linear; the builder keeps that body when you save but has no field to edit it.
Default headersName and value pairs added to every request made with a connection of this app. Headers set on the request win. At most 50. Host, Content-Length, Transfer-Encoding, Connection, Upgrade, Proxy-Authorization, TE, Trailer and Keep-Alive aren't allowed, and values must be one line. Don't put credentials here.
Allowed domainsHosts that credentials may be sent to, one per line, for example api.example.com. Use *.example.com for subdomains. Leave it empty to allow any host, which isn't recommended.

Sign-in​

Pick the Auth strategy: OAuth 2.0, API Key, Bearer Token, Basic Auth, AI Provider or No authentication (for public APIs). Below it, edit the parameters a user fills in when connecting. Switching the strategy resets the parameters.

The parameters work the same way as in the auth guides: OAuth 2.0, API Key, Bearer Token, Basic Auth and AI Provider. Generate sign-in with AI drafts them from a description of the API. Review the result before you save.

A custom OAuth 2.0 app always uses your own OAuth client: users enter the client id and secret when they connect. One-click sign-in is only for official apps.

Actions​

The actions editor has a Form view and a JSON view, switched at the top right.

Form view. The list on the left shows each action's name, method and path. Click Add action to add one, or select an action to edit it:

FieldDescription
NameShown in the toolbox and on the node. Required. When the key is still the default, leaving the field fills the key from the name (Create contact becomes create_contact).
KeyThe action's id. Lowercase letters, digits and _, at most 64 characters, unique within the app. Workflows store it, so don't change it once the action is in use.
DescriptionOptional help text.
MethodGET, POST, PUT, PATCH or DELETE.
PathRelative to the base URL, starting with /, for example /contacts/{contact_id}. You can also enter a full https:// URL. When you leave the field, every {placeholder} without an input gets a required path input.
InputsA table with one row per input: Key, Label, Type, Sent in and Required. Every input needs a label: leaving an empty Label after typing the key fills it from the key (contact_id becomes Contact id). For the select type, a second box under the label takes the options, comma-separated, as value or value:Label (open, closed:Closed). The arrow at the end of a row opens the input's other settings (see below). Click Add input to add a row.
Body pathShown when an input is sent in body. An optional dot path that nests the body inputs: data.attributes sends { "data": { "attributes": { ... } } }. Empty means the top level of the JSON body.

Input types: string, text, number, boolean, array, object, select, datetime and file (a file from an earlier step). Sent in: path, query, header, body (not for GET), email (a field of the email the action builds, see below) or not sent (local: only used by other settings, such as lookups, {input} placeholders and file names). See Inputs for how each type is converted and where each location puts the value.

More settings of an input (the arrow at the end of its row): the name the API uses when it differs from the key, help and example text, a default value, when left empty, use another input's value (valueFrom), and for body fields the place in the body (its own body path), add to the list instead of replacing it (append), turn each value into an object (wrap, for example { "email": "$" }) and, for files in a JSON body, the property names of the attachment objects (fileFields).

Advanced (under the inputs; leave it closed unless the API needs it):

  • Fixed request parts and body format: query parameters and headers sent every time ({input} placeholders are filled; the entry is left out when the input is empty), a fixed JSON body, the body format (JSON, form fields, form with file uploads, upload with details (related), one input is the whole body (raw), the file itself is the body (binary)) and send the fields in a header (argsHeader, e.g. Dropbox).
  • Send an email message: builds an email from the inputs sent in email and puts it, encoded, in the body (message, Gmail style).
  • Look something up first: a GET request sent before the action whose answer fills inputs left empty (prefetch).
  • Shape the result: keep only part of the response (output.select), name a downloaded file after an input (output.fileName), read an email in the response (output.message), turn spreadsheet rows into objects with an optional match filter (output.table) and the result fields (output.schema, which feeds the expression picker).
  • More pages of results: paging (pagination).

Fields the builder doesn't show are kept exactly as they are when you save, so an official manifest copied into a custom app saves back unchanged.

Delete action removes the selected action.

JSON view. Shows the whole action list as a JSON array that you can edit directly, for example to paste actions from another app.

Each action needs key, name, method and path, and inputs (when present) must be an array. Switching back to Form applies the JSON, or shows why it can't. The full format is in the App manifest reference.

Triggers​

A trigger polls an endpoint that lists items and starts a workflow run for each new item. The triggers editor works like the actions editor, with a Form view, a JSON view and Add trigger.

FieldDescription
NameShown in the toolbox and on the node. Required. Leaving the field fills a default key from the name.
KeyThe trigger's id. Same rules as an action key, unique among the app's triggers.
DescriptionOptional help text.
MethodGET or POST.
PathAn endpoint that lists items, ideally newest first, for example /repos/{owner}/issues. {placeholder}s become required path inputs, as for actions.
Query parametersFixed name and value pairs sent with every poll, for example sort = created. Query inputs with the same name override them.
InputsSame table as for actions (no file type). Sent in is path, query, header or not sent, plus body when the method is POST.
Items pathWhere the list is in the response: $ when the response is the array, or a dot path such as data.items.
Item id fieldDot path of a field that identifies an item, for example id. Required. Each id starts at most one run.
Order field (optional)A date or number that grows with newer items, for example created_at. Runs start oldest first, and items older than the newest one seen are never emitted again.
Newest items areOn the first page (newest first), or On the last page (oldest first, Link header) for APIs that list oldest first and send a Link header.
Skip items that have (optional)Comma-separated fields. Items where any of them is set are ignored, for example pull_request.

Trigger inputs are fixed values chosen on the node. Polling runs outside a workflow execution, so expressions can't be evaluated there (see App Trigger).

Advanced (under the polling settings): fixed request headers, a fixed POST body and its body path, more pages per check (pagination, to read more than one page per poll) and the item's result fields (output.schema). An input's other settings open from its row, as for actions. Triggers of another type (for example webhook triggers) keep their own settings; edit those in the JSON view. Each polling trigger needs key, name and request.path. See Triggers for the full format.

Delete trigger removes the selected trigger.

Saving and validation​

When you click Save, the builder first tidies the actions and triggers so they match the rules:

  • Keys are turned into lowercase snake case. An input key such as userId becomes user_id, and the original spelling is kept as the input's wire name, so the API still receives userId.
  • Placeholders in a path are rewritten to the exact wire name of the matching path input, ignoring case. With a path input user_id, the path /users/{USER_ID} becomes /users/{user_id}.
  • Path inputs are marked required, and labels are trimmed.

The builder then checks for the problems it can see (a missing label, a duplicate key, a placeholder without an input, a body input on a GET request, a select input without options and so on) and names the first one in a message.

The server validates the whole app again and rejects an invalid save with 400 Bad Request. Every error is keyed by its path in the manifest, prefixed with manifest.:

{
"title": "One or more validation errors occurred.",
"status": 400,
"errors": {
"manifest.actions[0].inputs[1].label": ["actions[0].inputs[1].label is required."],
"manifest.triggers[0].dedupKey": ["triggers[0].dedupKey is required."]
}
}

The page lists these errors at the top under "The app couldn't be saved:", marks each action or trigger that has errors with a red dot, and shows its errors above its form. The full list of rules and messages is in Validation. Nothing is stored until every error is fixed.

Using a custom app​

After you save, the app appears in three places:

  • Apps catalogue. On the Custom tab of Apps, with the action and trigger counts. Its catalogue id is custom: followed by the app's id, for example custom:6f1c2a4e-…, and its page is /apps/custom:6f1c2a4e-…. The page shows a Custom badge and an Edit app button.
  • Connect. The app page has one sign-in option, labelled with the app's name. Click Connect and fill in the sign-in fields. Your connections to it are listed on Connections.
  • Toolbox. In the workflow editor, the step list shows the app under All apps with a Workspace (or Yours) badge, and search finds its actions and triggers. Dropping one creates an App Action or App Trigger node with App set to custom:… and the action or trigger preselected. The connection picker on the node only offers connections of this app.

The generic Any REST API templates aren't custom apps. They have their own Generic tab in the catalogue.

This example builds an app for the public Hacker News Search API, which needs no credentials. It has one action that searches stories and one trigger that fires for every new story matching a search term.

1. Create the app​

  1. Go to /apps/custom, click New custom app, start from API Key, name it Hacker News and click Create.

  2. Fill in the page:

    FieldValue
    CategoryNews
    Docs URLhttps://hn.algolia.com/api
    DescriptionSearch Hacker News stories.
    Base URLhttps://hn.algolia.com/api/v1
    Test requestGET /search?query=test
    Allowed domainshn.algolia.com
    Auth strategyNo authentication

2. Add the action​

  1. Under Actions, click Add action.

  2. Set Name to Search stories (the key becomes search_stories), Method to GET and Path to /search.

  3. Add two inputs:

    KeyLabelTypeSent inRequired
    querySearch termstringqueryYes
    tagsTypeselect, options story, show_hn:Show HN, ask_hn:Ask HNqueryNo
  4. Switch to JSON and add an output so the node returns the hits instead of the whole response:

    [
    {
    "key": "search_stories",
    "name": "Search stories",
    "method": "GET",
    "path": "/search",
    "inputs": [
    { "key": "query", "label": "Search term", "type": "string", "in": "query", "required": true },
    { "key": "tags", "label": "Type", "type": "select", "in": "query",
    "options": [
    { "value": "story", "label": "story" },
    { "value": "show_hn", "label": "Show HN" },
    { "value": "ask_hn", "label": "Ask HN" }
    ] }
    ],
    "output": {
    "select": "hits",
    "schema": {
    "type": "object",
    "properties": {
    "items": {
    "type": "array",
    "items": {
    "type": "object",
    "properties": {
    "objectID": { "type": "string" }, "title": { "type": "string" }, "url": { "type": "string" },
    "author": { "type": "string" }, "points": { "type": "number" }, "created_at": { "type": "string" }
    }
    }
    }
    }
    }
    }
    }
    ]
  5. Click Save.

hits is an array, so the node outputs { "items": [...], "count": 20 } (see Output), and the schema describes that shape.

3. Add the trigger​

The trigger polls /search_by_date, which lists stories newest first, and starts a run for each new one.

  1. Under Triggers, click Add trigger.

  2. Fill in the form:

    FieldValue
    NameNew story (the key becomes new_story)
    DescriptionStarts a run for every new story that matches the search term.
    MethodGET
    Path/search_by_date
    Query parameterstags = story, hitsPerPage = 50
    Items pathhits
    Item id fieldobjectID
    Order fieldcreated_at_i
    Newest items areOn the first page (newest first)
  3. Add one input:

    KeyLabelTypeSent inRequired
    querySearch termstringqueryYes
  4. Optional: switch to JSON and add pagination and an output schema. With pagination, a poll that finds more than 50 new stories reads up to 5 pages instead of one:

    "pagination": { "mode": "page", "param": "page", "start": 0, "pageSize": 50 },
    "output": {
    "schema": {
    "type": "object",
    "properties": {
    "objectID": { "type": "string" }, "title": { "type": "string" }, "url": { "type": "string" },
    "author": { "type": "string" }, "created_at": { "type": "string" }
    }
    }
    }
  5. Click Save.

What the trigger fields do here:

  • Items path hits: the stories are in the hits array of the response.
  • Item id field objectID: each story's unique id, so a story starts at most one run.
  • Order field created_at_i: the creation time as a number, so new stories run oldest first.
  • pagination: the first request has no page parameter (page 0), the next ones send page=1, page=2 and so on. A page with fewer than 50 hits is the last one.

4. Connect and use it​

  1. Open Apps, go to the Custom tab and open Hacker News.
  2. Click Connect, name the connection and save. There is nothing to fill in.
  3. In a workflow, search the toolbox for Search stories and drop it on the canvas.
  4. Pick the connection and set Search term to sveltekit. A test run outputs the hits. A later node can read {{ $nodes['Search stories'].items[0].title }} or {{ $nodes['Search stories'].count }}.

To start a workflow from new stories, drop New story from the toolbox, pick the connection, set Search term to a fixed value such as sveltekit and a poll interval, and enable the workflow. The first poll only records the current stories, so runs start with the next new story. Each run gets the story as its trigger data, for example {{ $trigger.title }} and {{ $trigger.url }}. See App Trigger for polling intervals and plan limits.

Troubleshooting​

"The app has problems: see the list at the top." The server rejected the save. Each error names the field by its path, for example actions[0].inputs[1].label: is required. Fix the action or trigger marked with a red dot and save again. Common causes:

  • An input without a Label.
  • A path input whose key has no matching {placeholder} in the path, or a placeholder without a path input.
  • A body input on a GET action, or on a trigger that doesn't use POST.
  • A select input without options.
  • A path that doesn't start with / or https://.
  • A trigger without an Item id field.

The full rule list is in Validation.

"Custom apps are HTTP only: use the official PostgreSQL, MySQL, SQL Server, SFTP, IMAP or SMTP apps for those connections." The server refused a custom app of a database, SFTP or email kind. The builder doesn't offer those kinds, and an older custom app of one of them opens read-only. Use the official app of that kind. Existing connections of an older non-HTTP custom app keep working.

"Trigger input "x" contains an expression." App Trigger inputs must be fixed values. Replace the {{ … }} expression on the node with a literal value.

"'/x' is relative but the app has no base URL." Set a Base URL, or use a full https:// URL as the path.

"Connection 'x' may only be used with … Refusing to send its credentials to …" The request goes to a host that isn't in Allowed domains. Add the host, or fix the base URL or path.

An official app opens read-only. Official apps can't be changed. Create a custom app that starts from it.