How a workflow starts
Every workflow execution begins with a trigger — something that tells the platform to run the workflow with specific input. MagOneAI supports four trigger sources so you can wire workflows into whatever surface your users already use.Manual
Run the workflow from Studio with the Run button. Perfect for testing drafts and ad-hoc execution.
API
Start a workflow from another system by calling MagOneAI’s workflow API. Ideal for backend automations and system-to-system integration.
Chat
A message in MagOneAI Hub triggers the workflow. Users describe what they want in natural language; inputs are extracted automatically.
Schedule
Run on a cron-style schedule. Good for reports, periodic syncs, and maintenance jobs.
To start a workflow from an external event, use the API trigger — your system calls MagOneAI when something happens on its side. MagOneAI’s outbound webhooks, which notify external systems when a run finishes, are a separate feature — see Outbound webhooks.
Defining what inputs the workflow expects
Every workflow has a Start node that declares what input it accepts. This input schema drives two things:- The run form in Studio — Studio renders a form based on the schema so you can run the workflow with the right inputs.
- Validation at trigger time — API calls, chat-extracted parameters, and scheduled runs with static inputs are all validated against the schema before the workflow starts. Bad inputs fail fast with a clear error.
Input field types
Each Start-node field has a type. Alongside scalars (string, number, boolean, file, image), a field can be an array — a list of values of a chosen element type:| Array element type | How it’s entered | How it flows into nodes |
|---|---|---|
string / number / boolean | A repeatable list editor on the run form | Passed through as a list |
file | A multi-file upload widget | Each file’s text is extracted; tabular files (CSV/XLSX) are merged into a single queryable table set an agent can JOIN across |
image | A multi-image upload widget | Passed as a list of images to a vision-capable model |
array, choose its item type to tell the platform how to render the input and how to resolve the values at run time. Array fields are a natural fit for the Foreach node, which iterates over a list, and for agents that need to reason over several files or images at once.
For
file and image arrays, the run and schedule panels show a multi-upload control and won’t let you submit until every item has finished uploading. Merging tabular files into one queryable set is capped at 10 files per array field.Using inputs inside the workflow
Inputs and trigger metadata are available to any activity in the workflow through template variables:{{input.<field>}}— values from the trigger input (whatever the Start node accepted).{{system.user_id}},{{system.execution_id}},{{system.project_id}},{{system.timestamp}}— contextual values the platform injects automatically.{{<activity_id>.<field>}}— output from an upstream activity.
Trigger types in detail
Manual (Studio)
Run the workflow directly from Studio’s run panel. Fill in the input form, submit, and watch execution live on the canvas. You can target the currently published version or the latest draft — see Versions & publishing for how to test drafts safely. Use manual runs when developing, debugging, demoing, or processing a one-off request.API
Expose the workflow to other systems via MagOneAI’s workflow API. Your backend (or any HTTP client) sends the input payload and the platform starts execution. Authentication. Each API trigger uses a project API key. Requests are authenticated with an HMAC signature: send the request withX-Signature and X-Timestamp headers, where the signature is the HMAC-SHA256 of "<timestamp>." + <request body> computed with your key’s secret. The key id travels in the URL; the secret is shown only once, when you create the key — store it securely.
Async by default. The call returns immediately with a poll token / poll URL you can poll for status and the final result. If you’d rather get the result inline, pass a wait option to block briefly (up to ~60 seconds) — if the run finishes within that window the result comes back on the same call; otherwise you fall back to polling.
Files. To send files, upload them first to the dedicated upload endpoint, which returns a file reference; pass that reference in the trigger input. Any files the workflow generates come back as downloadable links.
Published version. API triggers run the use case’s currently published version — the call fails if nothing is published.
Conversational sessions. For chat or hybrid use cases, an API caller can hold a conversational session and resume it across calls.
Key management. Create, list, and delete API keys from the project. For who is allowed to manage keys, see Roles & permissions.
Typical patterns:
- Trigger a workflow from your own application when a record changes.
- Queue one execution per item in a batch job.
- Wire workflows behind your existing API gateway so downstream services don’t need to know about MagOneAI.
Chat
Any workflow in a project can be reachable from MagOneAI Hub. When a user sends a message, the Hub matches the intent to the right workflow, extracts parameters into the workflow’s input schema, and starts execution. Results stream back into the conversation when the workflow completes. Pair chat triggers with workflows that are naturally request-response — summaries, lookups, approvals, and guided actions work particularly well.Schedule
Add a schedule to a workflow to run it at cron times. You configure:- A cron expression for when to run.
- A timezone so “9am” means the local business hour, not UTC.
- A static input payload that the scheduled runs use, if any.
Watching an execution live
While a workflow runs, Studio shows it live on the canvas.Node status
Each node shows whether it’s pending, running, completed, failed, skipped, or waiting for human input.
Current activity
The platform highlights which node is currently executing so you can follow progress on the canvas.
Timing
See how long the overall execution has been running, and how much time each activity took.
Intermediate data
Inspect the input and output of each completed activity — useful when something isn’t matching what you expected downstream.
Retry and error handling
Real-world tools fail occasionally — rate limits, timeouts, transient network issues. MagOneAI lets you set an error-handling strategy per activity, so important steps can be resilient without wrapping them in custom logic.Strategies
- Retry — Try the activity again, with a configurable number of attempts and backoff between them. Best for transient errors like rate limits or timeouts.
- Respond — Stop the workflow gracefully with a predefined response. Useful when you want a clean user-facing failure rather than a crash.
- Abort — Fail the execution immediately. Appropriate for errors that should not be silently retried, such as invalid input or authorization failures.
Conditional routing around errors
For more nuanced recovery, use a Condition node after the risky activity to route based on the outcome — success goes one way, failure goes to a fallback path that escalates to a human, tries an alternative, or records the failure for later review.Execution history
Every workflow keeps a history of its runs so you can audit, debug, and improve over time. From the use case’s Executions view you can:- Filter by status (running, completed, failed, waiting), by trigger type, by date range, or by fields in the input.
- Drill into any execution to see the timeline, the input/output of each activity, agent reasoning, and tool calls with their parameters and responses.
- Inspect the variable store at each step — what values
{{input.*}},{{system.*}}, and upstream activity outputs held when this activity ran. - See which version ran — useful when debugging a change: was this the new workflow, or the previously published one?
- Replay a failed run with the same input after fixing the underlying issue.
Good patterns
- Start simple, then add triggers. Get the workflow working with a manual run in Studio first. Expose it via API, chat, or schedule only once it’s trustworthy.
- Keep input schemas honest. The schema is your contract with every trigger source — narrow, well-described fields make API integration easier and help chat triggers extract the right parameters.
- Use retry for transience, not logic errors. Retrying a genuine validation failure just delays the problem.
- Pair with versions & publishing. Scheduled runs, chat triggers, and API callers all resolve to the published version, so iterating safely means publishing deliberately.
Next steps
Workflow overview
Back to activities, the canvas, and workflow basics
Versions & publishing
How the published version gets resolved at trigger time
Memory
How trigger input flows through the variable store
Human task node
Workflows that pause for human input