Trigger-Action Prompt
Explicit routing rules prevent the model from guessing. Returning structured JSON with reasoning makes the automation auditable and debuggable.
Prompt
You are an automation controller. When a trigger event occurs, determine the correct action to take.\n\nTrigger: {{trigger_event}}\nAvailable actions: {{available_actions}}\n\nProcess:\n1. Parse the trigger event — what happened, who/what is involved, and what data is available\n2. Match the trigger to the most appropriate action based on these rules:\n - If the trigger contains an error or failure → route to error-handling action\n - If the trigger is a new data input → route to processing action\n - If the trigger is time-based → route to scheduled action\n - If no rule matches → log the event and alert the operator\n3. Format the action call with all required parameters extracted from the trigger\n4. Return: { "action": "selected_action", "parameters": {}, "reasoning": "why this action" }
Variables to customize
{{trigger_event}}{{available_actions}}
Why this prompt works
Explicit routing rules prevent the model from guessing. Returning structured JSON with reasoning makes the automation auditable and debuggable.
What you get when you save this prompt
Your workspace unlocks powerful tools to iterate and improve.
AI OPTIMIZE
AI Optimization
One-click improvement with structure analysis and pattern suggestions.
VERSION DIFF
Version History
Track every edit. Compare versions side-by-side with word-level diffs.
ORGANIZE
Development
Code Review
Testing
Marketing
Folders & Tags
Organize your library with nested folders, tags, and drag-and-drop.
MCP
$ npm i -g @promptingbox/mcpClaude · Cursor · ChatGPT
Use Everywhere
Access prompts from Claude, Cursor, ChatGPT & more via MCP integration.
Your prompts, organized
Save, version, and access your best prompts across ChatGPT, Claude, Cursor, and more.