FlowTruxFlowTrux/Docs
Docsworkflows

Workflow Examples

Common workflow patterns and recipes for building with FlowTrux.

This page describes common workflow patterns you can build in FlowTrux. Each example outlines the node sequence and configuration approach.

Two syntax rules worth remembering across all examples:

  • An MCP action's tool result lives under response - reference it as {{steps.nodeId.output.response}} (or …output.response.<field>).
  • Template variables are not evaluated as code - {{Date.now()}} does nothing. Computed values (current time, date ranges, generated IDs) come from a Transform action that returns them (see example 5).

1. Slack Notification from AI Summary

Pattern: Manual Trigger --> Agent --> Action:MCP

A simple three-node workflow that takes input text, summarizes it with an AI agent, and posts the summary to Slack.

Nodes:

  1. Trigger (Manual) - static data containing the text to summarize:

    { "content": "Paste your long document here..." }
    
  2. Agent - configured with a system prompt like "You are a concise summarizer" and user prompt:

    Summarize the following in 3 bullet points: {{trigger.data.content}}
    
  3. Action:MCP - Slack server, send_message tool:

    {
      "channel": "general",
      "text": "{{steps.agent-1.output.response}}"
    }
    

2. Data Pipeline: API to Google Sheets

Pattern: Webhook --> Action:HTTP --> Agent --> Action:MCP

Receive data via webhook, fetch additional details from an API, analyze with an agent, and write results to a Google Sheet.

Nodes:

  1. Trigger (Webhook, minimal response mode) - external service posts a payload with identifiers.

  2. Action:HTTP (GET) - fetch full data from an external API:

    URL: https://api.example.com/data/{{trigger.data.id}}
    
  3. Agent - analyze the fetched data. Instruct it to return the exact shape the next node needs:

    Analyze this data and return the key metrics as a JSON 2D array of rows
    (no prose, JSON only): {{steps.http-1.output.data}}
    
  4. Action:MCP - Google Workspace server, sheets_append tool. A whole-value template keeps the array an array:

    {
      "spreadsheetId": "your-sheet-id",
      "range": "Sheet1!A:D",
      "values": "{{steps.agent-1.output.response}}"
    }
    

3. Uptime Monitoring with Alerts

Pattern: Cron --> Action:HTTP --> Logic:If-Else --> Action:MCP

Check a service health endpoint on a schedule and send an alert if it is down.

Nodes:

  1. Trigger (Cron) - expression */5 * * * * to check every 5 minutes.

  2. Action:HTTP (GET) - call the health check endpoint:

    URL: https://api.example.com/health
    
  3. Logic:If-Else - condition:

    {{steps.http-1.output.status}} !== 200
    
  4. Action:MCP (true branch) - Telegram server, send_message tool:

    {
      "text": "ALERT: Service is down. Status: {{steps.http-1.output.status}}"
    }
    

The false branch (service healthy) can be left unconnected or connected to a logging node.

4. Loop Processing

Pattern: Webhook --> Agent --> Logic:Loop --> Action:MCP --> Aggregator:Concat

Process a list of items individually by looping over an array extracted by an agent.

Nodes:

  1. Trigger (Webhook, lastNode response mode) - receives a batch payload.

  2. Agent - extract structured items from the input (ask for JSON only, so the response is an array, not prose):

    Extract all action items from this text as a JSON array of objects
    with "title" and "details" fields. Return JSON only: {{trigger.data.content}}
    
  3. Logic:Loop - condition set to the agent's output array (a whole-value template, so the array stays an array):

    {{steps.agent-1.output.response}}
    
  4. Action:MCP (inside loop body) - process each item using {{item}}. For example, create a GitHub issue (create_issue tool):

    {
      "owner": "your-org",
      "repo": "your-repo",
      "title": "{{item.title}}",
      "body": "{{item.details}}"
    }
    
  5. Aggregator:Concat - collects all loop iteration results into a single array.

5. Scheduled Report with a Dynamic Time Window

Pattern: Cron --> Action:Transform --> Action:MCP --> Action:MCP

Run a daily report over "the last 24 hours". The time window can't be written as a template literal - compute it in a Transform node and reference its output.

Nodes:

  1. Trigger (Cron) - expression 0 6 * * * to run daily at 6:00 AM.

  2. Action:Transform ("Time window") - return the window in unix seconds:

    const now = Math.floor(Date.now() / 1000);
    return { from: now - 86400, to: now };
    
  3. Action:MCP - e.g. Wialon server, run_report tool, consuming the window:

    {
      "objectId": "{{global.WIALON_FLEET_GROUP_ID}}",
      "objectType": "unit_group",
      "timeFrom": "{{steps.transform-1.output.from}}",
      "timeTo": "{{steps.transform-1.output.to}}",
      "tables": [{ "tableType": "unit_trips" }]
    }
    
  4. Action:MCP - Telegram server, send_message tool. The report tables live under the MCP node's response:

    {
      "text": "Daily trips report ready: {{steps.action-2.output.response.tables[0].rowCount}} trips in the last 24h."
    }
    

The same Transform pattern covers any computed value: "yesterday as a full calendar day", ISO timestamps, generated IDs - compute once, then reference {{steps.<transform-id>.output.<field>}} everywhere.

6. Multi-Agent Research Pipeline

Pattern: Trigger --> Agent --> Parallel[Agent, Agent] --> Aggregator:Merge --> Action:MCP

Use multiple agents in parallel to produce different analyses, then merge and deliver the results.

Nodes:

  1. Trigger (Manual) - provide a research topic:

    { "topic": "Impact of AI on healthcare diagnostics" }
    
  2. Agent (Researcher) - gather information:

    Research the following topic and provide detailed findings: {{trigger.data.topic}}
    
  3. Logic:Parallel - splits execution into two concurrent branches:

  • Branch A - Agent (Summarizer):

    Write a concise executive summary of these findings: {{steps.researcher.output.response}}
    
  • Branch B - Agent (Sentiment Analyst):

    Analyze the sentiment and key concerns in these findings: {{steps.researcher.output.response}}
    
  1. Aggregator:Merge - combines both branch outputs into a single object.

  2. Action:MCP - Slack server, send_message tool:

    {
      "channel": "research",
      "text": "*Research Report: {{trigger.data.topic}}*\n\n*Summary*\n{{steps.summarizer.output.response}}\n\n*Sentiment*\n{{steps.sentiment.output.response}}"
    }
    

Tips for Building Workflows

  • Start small. Build and test one or two nodes at a time before adding complexity.
  • Use manual triggers during development. Switch to webhook or cron once the workflow logic is validated.
  • Check node outputs in the execution panel. The collapsed Output section shows the raw JSON - the exact field names to use in {{steps.…}} references. See Execution.
  • Use the Transform action for reshaping data and for any computed values (time windows, IDs) - template variables reference data, they don't run code.
  • Mind the Transform scope. Inside Transform code, data is exposed as plain variables without the .output level: steps['mcp-1'].response, not steps['mcp-1'].output.response. See Template Variables.
  • Use minimal webhook mode for integrations that do not need the workflow result. This avoids holding the HTTP connection open.