How do I loop through connected records with Make?
Hey everyone! Welcome back to Build It with Tim. I'm excited to bring you another awesome video where we explore how to loop through connected records using Make in Tadabase. In this video, I'll guide you on how to achieve this functionality step by step.
The goal of this video is to demonstrate how to loop through connected records in Tadabase using Make, a third-party tool for connecting different services. Although we won't be connecting to external services in this case, we'll use Make to process data and submit it back to the database, allowing us to perform various behind-the-scenes operations.
First, I'll provide an overview of the finished product we'll be building. We'll have a template with five tasks, and when we create a new job, we'll select the template and automatically copy all the connected tasks to the new job. Although most of the action will happen behind the scenes, I'll show you the final result and then dive into the builder to explain the process.
Inside the builder, we'll have two tables: "jobs" and "tasks." The "jobs" table will have fields like job name, status, a roll-up field to count connected tasks, and a radio select field to identify if it's a template or not. It will also have a self-connection using the "job template" field. The "tasks" table will have similar fields and a connection to the "jobs" table.
We'll create a page with a form to add new jobs and a list of jobs. Additionally, we'll set up a record details page to view tasks connected to a specific job.
To achieve the looping functionality, we'll use Make. We'll start by setting up a webhook in Make to receive data from Tadabase. We'll create a mail hook module in Make, which will allow us to send data via email to Make. This module will receive the record ID of the newly created job in Tadabase.
In Tadabase, we'll add a text field to store the record ID, and a table rule to update this field with the record's ID every time a new record is created or edited. We'll then set up an email notification in Tadabase using a custom email. We'll include the record ID in the subject and send it to the custom mail hook address provided by Make.
With the webhook and email setup complete, we'll move back to Make. We'll retrieve the job record information using the record ID passed from Tadabase. This step allows us to access the template field value if a template is selected during job creation.
Next, we'll use Make's mapping feature to select the jobs table and map the record ID from the mail hook subject field. This mapping will pass the record ID to the next module.
At each step, I'll demonstrate the testing process, showing you the results and ensuring everything is working smoothly.
By following these instructions, you'll be able to loop through connected records using Make in Tadabase. This powerful functionality allows you to automatically copy connected tasks from a template to a new job, saving you time and effort.
I'm excited to guide you through this process and help you master looping through connected records with Make in Tadabase. Let's dive into the builder and get started!