Get your API key

Lesson 3 mein se 5

Schedules, errors aur retries

Roz ki low-stock summary, chhoti failures ke liye retries, error paths, alert workflow, aur loop karte agent ko rokne wali limits.

9 min Login karke kholo
Ek baar mein ek step, page palatne jaisa.

Is lesson ke end tak Shree Sarees ko har subah 9 baje low-stock summary milegi, aur workflow chhoti failures pe retry karega, AI step fail ho toh fallback lega, run toote toh aapko alert karega, aur gol-gol ghoomte agent ko rok dega.

Aapko chahiye: lesson 2 wali Shree Sarees sheet, aapka Gmail credential, aur lesson 1-2 wala chat agent · Time: 9 minute

  1. Yeh shape aapne n8n 101 mein banayi thi: ek schedule, ek sheet, ek email. Aaj isme ek AI step aur chaar safety nets judenge. Daily stock check naam ka naya workflow banao:

    1. Schedule Trigger: roz subah 9 baje. Workflow ki Settings mein time zone Asia/Kolkata rakho.
    2. Google Sheets: Stock tab se Get Row(s), bina filter, taaki saari rows padhe.
    3. Filter: sirf woh rows rakho jinki Qty 3 se kam hai.
    4. Aggregate: All Item Data chuno aur output field mein data likho, taaki saari rows ek item ban jaayein aur aapko das nahi, ek email mile.
    5. Basic LLM Chain, aapke AllModelAPI chat model aur is prompt ke saath:
    Prompt · ise apne AI agent mein paste karo
    You write a short morning stock note for the owner of Shree Sarees, a saree boutique in Surat.
    Here are the items with less than 3 pieces left, as JSON: {{ JSON.stringify($json.data) }}
    Write at most 6 lines in simple English: first the items at 0, then the rest, each as "Item (Colour): N left". End with one line suggesting which item to reorder first and why. Do not invent items that are not in the list.
    1. Gmail: chain ka text owner ko bhejo, subject Low stock today.

    Agent kyun nahi, chain kyun? Yeh kaam har subah wahi paanch steps hai. AI ko kuch decide nahi karna, bas text likhna hai.

    Upar ki row: Schedule (roz, 9:00 IST) se AI Step (summary likhta hai), phir Email Owner (low-stock summary). Neeche chaar safety nets: 1 Retry (chhota jhatka? Retry On Fail, max 5 tries, 5 s tak ke gap pe), 2 Error path (ek item fail? On Error: error output use karo, insaan ke liye rakh do), 3 Alert (poora run fail? Error Trigger wala error workflow aapko email karta hai), 4 Limits (agent gol ghoom raha? Max Iterations aur Timeout jaldi rok dete hain).
    Upar roz ka workflow, neeche woh chaar safety nets jo yeh lesson jodta hai.
    Kyun?

    Jo workflow aapke sote waqt chalta hai, use koi dekh nahi raha. Chupchaap fail hua toh owner ko bas email nahi milegi aur kisi ko pata nahi chalega kyun. Safety nets chupchaap failures ko retries, fallbacks aur alerts mein badal dete hain.

Baaki lesson padhne ke liye free login karo

Har lesson free hai. Free account se saare lessons khul jaate hain aur aapki progress save hoti hai.

Is lesson mein aage:

  1. Net 1: chhoti failures pe retry
  2. Net 2: step fail ho toh fallback
  3. Net 3: run toote toh alert
  4. Net 4: chat agent ke liye limits
  5. Recap