Executing Workflows¶
Use the execute endpoint to trigger a workflow with custom input data.
Endpoint¶
Request¶
Headers¶
Body¶
The input object is optional. If provided, its fields become available as trigger variables in your workflow steps.
Response¶
Success (200 OK)¶
{
"run_id": "550e8400-e29b-41d4-a716-446655440000",
"status": "queued",
"poll_url": "/api/v1/runs/550e8400-e29b-41d4-a716-446655440000/status"
}
The workflow begins executing asynchronously. Use the poll_url to check progress.
Error Responses¶
| Status | Meaning |
|---|---|
400 Bad Request | Invalid input (must be a JSON object, not an array or scalar) |
401 Unauthorized | Missing or invalid API key |
402 Payment Required | Insufficient credits to run this workflow |
404 Not Found | Workflow not found or you don't own it |
429 Too Many Requests | Spend limit exceeded |
Pre-Flight Checks¶
Before execution starts, GloriaMundo runs several checks:
- API key validation — Verifies your key is active
- Workflow ownership — Confirms you own the workflow
- Billing check — Ensures you have sufficient credits
- Connection check — Validates all required OAuth connections are active
If any check fails, you'll receive an appropriate error response and the workflow won't execute.
Trigger Data¶
The input object from your request becomes available in workflow steps as trigger variables:
In your workflow steps, reference these as:
{{trigger.customer_name}}→"Acme Corp"{{trigger.email}}→"contact@acme.com"
This works the same way as webhook trigger data.
Example¶
curl¶
curl -X POST https://app.gloriamundo.com/api/v1/workflows/abc-123/execute \
-H "Authorization: Bearer gm_live_a1b2c3d4e5f6..." \
-H "Content-Type: application/json" \
-d '{"input": {"customer_name": "Acme Corp", "email": "contact@acme.com"}}'
Python¶
import requests
response = requests.post(
"https://app.gloriamundo.com/api/v1/workflows/abc-123/execute",
headers={"Authorization": "Bearer gm_live_a1b2c3d4e5f6..."},
json={"input": {"customer_name": "Acme Corp", "email": "contact@acme.com"}}
)
data = response.json()
run_id = data["run_id"]
print(f"Workflow started: {run_id}")
JavaScript¶
const response = await fetch(
"https://app.gloriamundo.com/api/v1/workflows/abc-123/execute",
{
method: "POST",
headers: {
"Authorization": "Bearer gm_live_a1b2c3d4e5f6...",
"Content-Type": "application/json",
},
body: JSON.stringify({
input: { customer_name: "Acme Corp", email: "contact@acme.com" },
}),
}
);
const { run_id } = await response.json();
console.log(`Workflow started: ${run_id}`);