In one sentence
Students build real business logic: filters, a Router, data cleaning, dates and lead scoring โ on a live form.
Preparation before the session
Time plan
- 00:00โ00:15 Review: the bots we built
- 00:15โ00:45 Filters: operator types and complex conditions
- 00:45โ01:15 Router and the fallback route
- 01:15โ01:30 โ Break
- 01:30โ01:55 Cleaning data: text functions and regex
- 01:55โ02:15 Dates, time zones and switch
- 02:15โ02:50 Building together: a smart lead form
- 02:50โ03:00 Summary and practice
Lecture parts and activity type
| Part | Activity type |
|---|---|
| Filters โ the gate between two modules | Explanation + demo |
| Router โ splitting into routes | Demo + simulation |
| Cleaning and normalizing data | Playground |
| Dates and time zones | Playground |
| if, ifempty and switch | Explanation |
| Lead scoring | Building together |
| Building together: a smart lead form | Building together |
The 3 messages that must get across
- An early filter = economical Credits.
- A Router without overlaps + a fallback.
- UTC inside, the local time zone outside.
Questions for class discussion
- Which criteria would you put in a scoring model for your business?
- What's the price of a hot lead that waits an hour?
- When is it better not to route automatically and let a person decide?
Live demo script
First filters
- A sample lead โ Tools โ Set multiple variables: name, email, budget=45000.
- A second module โ Tools โ Compose a string: Relevant lead: {{1.name}}.
- Filter โ Click the line โ Label: High budget โ {{parseNumber(1.budget)}} Numeric: Greater than 20000 โ Add AND rule โ email Basic: Exists.
- Test โ Run once โ you see a bubble. Change to 5000 โ Run once โ a bubble only on module 1.
Clean and normalize a lead
- Input โ Set multiple variables with the dirty lead from the lecture.
- name / email โ {{trim(1.name)}}, {{lower(trim(1.email))}}.
- phone โ {{"+972" + substring(replace(1.phone; "/[^0-9]/g"; emptystring); 1; 10)}}.
- domain โ {{last(split(lower(trim(1.email)); "@"))}}.
- isBusiness โ {{if(contains(domain; "gmail") or contains(domain; "walla") or contains(domain; "yahoo") or contains(domain; "hotmail"); false; true)}}.
A live lead form with a webhook
- Webhook โ Webhooks โ Custom webhook โ Add โ copy the address.
- Tally โ Integrations โ Webhooks โ paste โ Connect.
- Learn the structure โ Make: Run once โ submit the form โ Successfully determined.
- Filter โ Email Matches pattern ^[^@\s]+@[^@\s]+\.[^@\s]+$.
- Clean-up + score โ Set multiple variables with the formula from the lecture.
- Activation โ Scheduling: Immediately โ ON.
Problems students will run into
| Problem | Quick fix |
|---|---|
| The filter always fails | A Text comparison instead of Numeric โ "45000" > "20000" as text may fail. |
| I can't find Set up a filter | Click exactly on the line (or on the wrench icon in its middle). |
| phone came out +97250123456 (a digit missing) | substring(โฆ; 1; 10) โ the end is 10 (exclusive). Check that the source is 10 digits long. |
| emptystring isn't recognized | Pick it from the General tab in the panel, don't type it. |
| The webhook receives nothing | Check that the scenario is in Run once or ON, and that the address in Tally is complete. |
| The fields don't appear | Redetermine data structure and submit another form. |
| score is always 5 | budget arrives as text โ parseNumber, or the field is empty โ ifempty(โฆ; 0). |
| A lead got two messages | Overlapping ranges โ check โฅ50 AND <80. |
| The fallback always runs | It's set up as a normal route with an empty filter. Tick Fallback route: Yes. |
Tips from the classroom
- Tally with a raw webhook is confusing โ also show the Tally app.
- Let students "break" the Router on purpose with overlapping ranges.
- A label on every filter โ insist on it.
Adapting to different levels
For students who struggle: Work on static data without a form.
For fast students: The business-hours challenge + duplicate detection.
Answer key โ multiple-choice questions
Students see the answers in shuffled order, so the key gives the wording of the right answer.
| # | Right answer |
|---|---|
| 1 | On the line between two modules |
| 2 | On both routes |
| 3 | UTC |
| 4 | private |
| 5 | Matches pattern |
| 6 | 0 |
| 7 | formatDate(d; "DD/MM/YYYY HH:mm"; "Asia/Jerusalem") |
| 8 | Modules that don't run don't use Credits |
Homework
- The form should work end to end with 3 test leads.
- Preparing for session 4: install Postman (or use hoppscotch.io in the browser) โ we will send requests to a webhook.