Skip to main content

Overview

Workflows are persistent, versioned automations that can be triggered on a schedule, via API webhook, by email, by application events, or through web forms. Unlike code execution (ephemeral, one-off scripts), workflows are saved, re-runnable, and editable in the Pinkfish web app. For agents that build workflows programmatically, see the Workflow Builder Prompt.

Workflow Tools Reference

All workflow tools are on the /pinkfish-sidekick server path. For full parameter schemas, see the pinkfish workflows server reference.

How Workflows Work

A workflow is a directed graph of nodes connected by edges, written as JavaScript using the pf SDK.

Node Types

Each mcp-tool node calls exactly one MCP tool. If you need to call two different tools, use two separate nodes connected by an edge.

inputSchema Sources

Each field in a node’s inputSchema must declare a source:

Resource Bindings

Resources declare what external connections, triggers, and agents a workflow uses. They are declared in WORKFLOW_RESOURCES and referenced in node parameters using the {{resource.X}} pattern.
After saving code with workflow_update, call workflow_bind_resources to map each resource key to a real ID:

The pf SDK

The pf SDK is available inside all node functions:

Workflow Code Structure

Every workflow follows this structure:

Example: Create and Run a Workflow

Step 1: Discover tools for the task

Step 2: Get full schemas

Step 3: Create the workflow

Response:

Step 4: Update with code

Step 5: Run the workflow

Step 6: Inspect the results

Example Script

Create, update, run, and inspect results. Requires curl and jq.

Complete Code Example: Web Search + Summarize

Complete Code Example: With Resource Bindings and Triggers

This example shows a workflow with a connection binding (Zendesk), an API trigger, and an agent:
After uploading this code with workflow_update, bind resources:
Use workflow_read({ automationId, checkResources: true }) after binding to verify every declared resource resolved correctly before running the workflow.

Setting Up Triggers

Triggers make workflows fire automatically.

Schedule Trigger (Cron)

Runs the workflow every day at 9:00 AM Eastern.

API Webhook Trigger

Returns a webhook URL. POST data to that URL to trigger the workflow with input parameters.

Email Trigger

Returns an email address. Emails sent to that address trigger the workflow.

Application Event Trigger

Fires the workflow when a specific event occurs in a connected application.

Web Form Trigger

Auto-generates a web form. When users fill it out and submit, the workflow runs with their input.

Build Sequence Summary