crewAIInc/crewAI · error · Exception
No trigger payload provided. Please provide JSON payload as
Error message
No trigger payload provided. Please provide JSON payload as argument.
What it means
Raised by run_with_trigger() in the flow template (templates/flow/main.py) when the script is started without a CLI argument. It is a usage guard mirroring the crew template: flow trigger execution requires a JSON payload as argv[1], forwarded to content_flow.kickoff({'crewai_trigger_payload': ...}).
Source
Thrown at lib/cli/src/crewai_cli/templates/flow/main.py:72
def kickoff():
content_flow = ContentFlow()
content_flow.kickoff()
def plot():
content_flow = ContentFlow()
content_flow.plot()
def run_with_trigger():
"""
Run the flow with trigger payload.
"""
import json
import sys
if len(sys.argv) < 2:
raise Exception("No trigger payload provided. Please provide JSON payload as argument.")
try:
trigger_payload = json.loads(sys.argv[1])
except json.JSONDecodeError:
raise Exception("Invalid JSON payload provided as argument")
content_flow = ContentFlow()
try:
result = content_flow.kickoff({"crewai_trigger_payload": trigger_payload})
return result
except Exception as e:
raise Exception(f"An error occurred while running the flow with trigger: {e}")
if __name__ == "__main__":
kickoff()
View on GitHub (pinned to 754d7323be)
Solutions
- Pass the JSON payload as the first argument: `uv run run_with_trigger '{"key": "value"}'`.
- Verify the trigger configuration on the platform actually forwards the payload into the process argv.
- Shell-quote the JSON so braces and quotes survive to argv.
Defensive patterns
Strategy: validation
Validate before calling
import sys
if len(sys.argv) < 2 or not sys.argv[1].strip():
raise SystemExit("No trigger payload provided. Pass a JSON payload as argv[1].") Type guard
def has_payload_arg(argv: list[str]) -> bool:
return len(argv) >= 2 and bool(argv[1].strip()) Prevention
- Always pass the JSON payload as argv[1] when invoking run_with_trigger
- Verify the automation platform forwards the trigger body to the process
When it happens
Trigger: Invoking the flow's run_with_trigger entrypoint with no arguments (len(sys.argv) < 2): local run without payload, or an automation/trigger runner that fails to pass the payload through to the process.
Common situations: Flow deployed to an automation platform whose trigger is not wired to forward the body; testing `python main.py` directly expecting the plain kickoff path; wrapper scripts dropping arguments.
Related errors
- No trigger payload provided. Please provide JSON payload as
- Invalid JSON payload provided as argument
- An error occurred while running the flow with trigger: {e}
- Invalid JSON payload provided as argument
- An error occurred while running the crew with trigger: {e}
AI-assisted analysis of crewAIInc/crewAI@754d7323be (2026-08-15).
Data as JSON: /api/errors/b6d89c6c4f0b47e7.
Report an issue: GitHub.