LearnAI
Новинки AI · Автоматизация без кода · Lesson 3/10
← To the catalog
Task

Anatomy of a Script: Trigger, Steps, Action

Break the script down into three bricks. Return JSON {"scenario_name":"...","trigger":"...","steps":["..."],"action":"..."}. trigger — ONE narrow start event; steps - an array of 2-4 intermediate steps in order, among which at least one filter step or condition check is required (weed out the unnecessary before processing); action - ONE final action. Keep the trigger specific and each step one clear action.

Unlock access to submit solutions for instant AI review.
Assemble a script from blocks
💡 A piece of theory

Any scenario is assembled from three bricks. Trigger is the trigger, the event from which everything begins: a letter has arrived, a form has been filled out, the time has come. Steps - intermediate processing: get the desired field, check the condition, convert the data, ask the AI. The action is the finale for which everything was started: send a response, create a post, notify a person. The mechanics are like a relay race: the trigger passes the stick to the first step, that one to the next, and so on until action; The same data packet runs at each junction. Lever: Always describe the scenario in this order - first one precise trigger, then a list of steps, then one action. Insider: Keep the trigger narrow. 'Any letter' is a bad trigger, it launches a script for spam and mailings; 'a letter with a subject containing the word application' is good. Second trick: place a filter step immediately after the trigger to filter out the unnecessary before expensive processing. A typical mistake: mixing three actions in one step. Break it down: one step - one clear action, then the script is easy to read and fix.

How is it assessed · passing 70

  • 1Valid JSON without text around it25%
  • 2The required fields are there25%
  • 3The script is correctly broken into bricks50%
Your promptClaude ⌄
🔒

Unlock access to submit solutions for instant AI review.