Choosing a Trigger

Every Tensorify workflow starts with exactly one trigger. The right choice depends on who starts the run and whether the platform needs OAuth, an App install, or only raw HTTP.

Product policy (no redundancy)

| Condition | Use | |-----------|-----| | Needs OAuth, App install, outbound watch/subscription, or rich platform events | Dedicated trigger (Google Sheets/Drive, Slack, GitHub App, Discord, Telegram) | | Receive signed/unsigned HTTP POST with optional HMAC presets | Webhook Trigger | | Programmable multi-method HTTP API with sync response | API Trigger | | OpenAI Chat Completions compatible entry | Chat Trigger | | Expose workflow as an MCP tool | MCP Trigger | | Human / canvas / CLI / subworkflow start | Manual Trigger |

Hard rule: Do not use Webhook Trigger as a substitute for Slack, Google, Discord, Telegram, or GitHub App integrations. Those live only on dedicated triggers.

Webhook provider presets are signature helpers only: generic, stripe, github (raw HMAC), clerk. When provider=github, prefer GitHub Trigger for App installs.


Chat Trigger

Use when the workflow is a conversational agent and clients speak OpenAI Chat Completions.

  • Exposes POST /chat/completions and GET /models
  • Streaming SSE and non-streaming JSON
  • Works with OpenAI SDKs, Vercel AI SDK, LangChain, etc.
from openai import OpenAI

client = OpenAI(
    base_url="https://triggers.tensorify.io/h/whk_.../v1",
    api_key="tfk_your_workspace_api_key",
)

response = client.chat.completions.create(
    model="tensorify",
    messages=[{"role": "user", "content": "Hello!"}],
)
print(response.choices[0].message.content)

API Trigger

Use when the workflow is a REST service: callers send HTTP and expect a JSON body back.

  • Methods: GET, POST, PUT, PATCH, DELETE on a custom path
  • Wire processing → Return with responseMode = "use-workflow-response"

Webhook Trigger

Use for long-tail inbound HTTP: Stripe, Clerk, Shopify, custom systems, or raw GitHub webhooks with HMAC.

  • External service POSTs to your Tensorify URL
  • Optional provider presets configure verification only
  • Async by default unless you explicitly use a sync response mode + Return

Good fits: Stripe checkout.session.completed, Clerk user events, generic SaaS hooks.
Not for: Slack Events (use Slack Trigger), Google Drive watches (use Google Drive Trigger), GitHub App installation routing (use GitHub Trigger).

Dedicated platform triggers

| Plugin | When | |--------|------| | Slack Trigger | Slack Events / interactions with managed Slack App OAuth | | GitHub Trigger | GitHub App installation_id events | | Google Sheets / Drive Trigger | Sheet or Drive change via managed Google OAuth + watches | | Discord Trigger | Discord messages/interactions (user bot token) | | Telegram Trigger | BotFather token updates |

Pair with companion send/action plugins (e.g. Slack Send Message) for outbound work.

Manual Trigger

Use for canvas Run, CLI, schedules, and subworkflow entrypoints. No public HTTP surface.

MCP Trigger

Use when AI agents should call this workflow as a tool (discoverable MCP tool schema).


Decision table

| Use case | Trigger | |----------|---------| | AI chatbot / OpenAI SDK surface | Chat Trigger | | Custom REST / CRUD API | API Trigger | | Stripe / Clerk / generic SaaS webhook | Webhook Trigger | | Raw GitHub repository webhook (HMAC) | Webhook Trigger (provider=github) | | GitHub App (install + installation events) | GitHub Trigger | | Slack bot / Events API | Slack Trigger | | Telegram bot | Telegram Trigger | | Discord bot | Discord Trigger | | Google Sheets row changes | Google Sheets Trigger | | Subworkflow or "Run" from UI | Manual Trigger | | Workflow callable as MCP tool | MCP Trigger | | Scheduled batch / admin job | Manual Trigger |

AI agent notes

  • Users chat with the agent in production → Chat Trigger (or API + agent if you own the protocol).
  • Agent reacts to Stripe/GitHub raw hooks → Webhook Trigger upstream of the agent.
  • Agent on a schedule → Manual Trigger.
  • Playground Chat mode is a dev convenience; production still needs the correct trigger type.

TSL (Code mode / agents)

Minimal shapes for the common protocol triggers:

# Webhook (long-tail HMAC)
node webhook @tensorify/webhook-trigger:4.0.0 {
    provider = "stripe"
    path = "/stripe"
    method = "POST"
}

# API (sync REST)
node api @tensorify/api-trigger:1.0.0 {
    path = "/items"
    allowedMethods = ["GET", "POST"]
    authType = "none"
    responseMode = "use-workflow-response"
}

# Manual (subworkflow / canvas)
node manual @tensorify/manual-trigger:4.0.0 {
    mockPayload = {}
}

For dedicated triggers, always get_plugin_manifest for the exact settings (installation_id, OAuth bindings, bot tokens).

Next steps

On this page