Hi!
I have a problem with setting up an automation across three databases in our workspace: “Teachers,” “Students,” and “Lessons.” Here’s a summary of the functionality I am aiming to implement:
Goal: Automatically create a new item in the “Lessons” database whenever there is a matching tag between the “Teachers” and “Students” databases. Each new item in “Lessons” should list the matched teacher and student, such as “Teacher 1 <> Student 3,” and include the common tags.
Example: If Teacher A and Student B share above 3 tags “fun”, “movies” “math,” a new entry in “Lessons” should automatically be created with the title “Teacher A <> Student B” and include “math” in a tags column.
Could you please guide me through setting up this type of automation or provide any best practices for this setup?
What you are looking to do is beyond the capabilities of normal automations. It will require some “backend” processing.
If you are wanting to do this yourself, I recommend looking to a tool like Make. It’s a “no-code” tool that enables users to execute functions like this.
GCavin
(Gilles Cavin - Reinventing Formulas in monday.com)
3
Hi Dor,
Trying to understand your use case. If Teacher A and Student B share the 3 tags, why do you create only one item with a “math” tag? Because it is the last tags? What if more than 1 teacher matches the 3 tags? What if a teacher matches only 2 tags? Or if a teacher has 4 tags with 3 matching?
Common Tags Column: I want each new item to include, in its “common tags” column, all tags that the teacher and student share.
Creating New Items for Matches: I want a new item created for each match. If three teachers match with one student, I want three separate “teacher <> student” items to be created.
Defining a Match: The criteria for a “match” is flexible, but for now, let’s assume a match requires three tags in common between the teacher and student.
Trigger on New Student Item: I’d like this process to trigger whenever a new student item is added.
Teacher Board View: I want each teacher to see all relevant matches on their board. Using a board view with a filter per teacher makes this easy, but I’d like this view to be part of the teacher’s card by default.
I’m using Make, but I wanted to explore the option of combining Python code to run the matching algorithm and then update it as part of monday.com platform capabilities.
So, the best implementation I envision is:
Trigger an event with the item columns (student name, tags) via Make.
Run an algorithm based on an additional database that includes all the teachers and their tags (so I’ll need to use Make to update the additional database of teacher tags whenever a new “teacher” item is added).
Create new items on a third database (let’s call it “matches”) for all the pairs.
You could do that with a 3rd-party app called the Advanced Formula Booster which completely reinvents the concept of formulas in monday, without using formula columns.
Demo
Here is a quick demo.
Formula
The Advanced Formula Booster allows you to use multiple lines, store data in variables, read and update any type of columns and multiple items at once.
Line 2: you get the list of all tags from the teachers. Tags for a teacher are separated by a comma, and teachers are separated by a pipe (|).
Line 4: you get the list of tags in common between the student and each teacher (same separators)
Line 6: we count the number of tags in common (there are 4 teachers, we get 3|2|3|3).
Line 8: we only want teachers that have at least 3 tags in common with the student: they are in position 1, 3 and 4 in the teachers board.
Line 12: now that we know which teachers meet the criteria, we get their names
Line 14: we create the list of names for the items to create in the Lessons board (Teacher<>Student).
Line 16: we get the group we will add the items to (we only have one group called Lessons in the Lessons board).
Line 18: we create the items in the Lessons board and we store their positions in the [NewPos] variable, so we can update their columns
Line 20: we get the tags in common for each Teacher/Student match
Line 22: by using the position indicator #[NewPos], we target and update the tag column of the newly created item.
There are certainly things to refine, but here is a basic idea of what the app can do for your scenario.
I invite you to install the app and test the app. If you have any question, or want to discuss your scenario in more details, don’t hesitate to open a ticket in the app itself, we have an in-app ticket system.