Overview, Installation, and Configuration
Transcript Summary
Introduction
Hey everybody, it's Tim from Tadabase here. Thanks for joining us for an introduction to Pipes in Tadabase. In this series, we'll cover the basics of pipes: what they are, how you use them, and the basic functionality they offer.
What Are Pipes?
Pipes allow us to create a simple pathway for communication between data inside Tadabase and external data through services offering REST APIs. Tadabase also provides custom-designed pipes that act as utilities or functions to manage and manipulate data within your application.
For example, if you want to automate the creation of a record in an external CRM when a new record is added to a Tadabase table, you can do that using pipes—provided the CRM has an available REST API.
Pipes User Interface
In Tadabase, you’ll find the pipes menu on the left-hand side of the builder, represented by a pipe icon. Clicking this icon opens a page displaying all available pipes. On the left, you can search for installed pipes. In the center, you'll see an extensive list of over 100 available pipes that our team has created, using external service API references.
You can search for pipes, sort them, and filter by category. Each pipe is labeled as either "configurable" or "not configurable."
Installing a Pipe
Let's install the "Date Utilities Pipe" as an example. Clicking on the pipe shows information about it on the left side, including the available actions. Once you click install, you'll be prompted to set default values such as time zone, format, and date-time options. After setting these, the pipe is installed, and you're taken to its configuration screen.
In the configuration screen, you'll see options to:
- Change the name or description of the pipe
- Enable or disable debug mode
- Toggle the pipe’s status on or off
- Delete the pipe or save changes
Pipes aren’t triggered from this screen, but the backend configuration ensures the pipe functions as needed in your application.
API Calls and Global Parameters
The "API Calls" tab shows a list of available actions, while the "Global Parameters" tab contains values such as time zone or API keys that apply to every action within the pipe. For example, if you install a pipe for an external service like Stripe, your API key would be stored here.
Testing an Action
Let’s look at the "Convert Time" action. In the "Test" tab, you can input values and test the pipe to preview the response. Running the test provides a JSON response along with a status code (e.g., 200 for success). You can view the raw data or the formatted body.
Configurable vs. Non-Configurable Pipes
Non-configurable pipes, like the Date Utilities Pipe, don’t allow control over aspects like the request or endpoint. You can't modify the API calls or add new ones. In contrast, configurable pipes offer full control over requests, headers, and responses. You can add new API calls and configure their details as needed.
Example: Installing the Weather Pipe
Let’s install the "Weather Pipe." It’s marked as configurable and powered by OpenWeatherMap. After installation, you’ll be prompted to enter your API key, which will be stored as a global parameter for all API calls within the pipe. You can configure additional API calls, set methods, endpoints, and parameters, and test your setup to ensure it works.
Custom Pipes
In addition to the available pipes, Tadabase allows you to create custom pipes from scratch. This is useful for connecting to APIs that aren’t covered by existing pipes or for custom-built APIs within your organization.
Let’s walk through setting up a custom pipe using Tadabase's own REST API. We’ll name it "Tadabase REST API" and configure it to get all records from a table by referencing the API documentation.
In this section, we’re going to explore how to work with pipes in Tadabase, specifically using API calls to retrieve and create records. We’ll cover how to configure parameters, headers, and request bodies, and discuss how pipes can be used in your application.
Getting Records via API
To get started, we will retrieve all records from a data table using a pipe. First, we identify the endpoint and the necessary parameters by checking the API documentation.
-
Endpoint Configuration: Copy the endpoint URL from the API documentation and paste it into the URL box in your pipe. Parameters in the URL must be contained within single curly brackets. If the documentation shows double curly brackets, remove one set so that the parameter has only a single pair of curly brackets.
-
Defining Parameters: Once the parameter is set inside the endpoint, you must define it in the parameters tab of the pipe. Enter the parameter name exactly as it appears in the URL and define its type (text, number, etc.). You can mark it as required if necessary.
-
Authorization: Many APIs require authorization headers. In the documentation, you may find instructions to include specific headers, such as API keys. These headers can be added globally, meaning they will be applied to all API calls in this pipe, or you can add them to individual API calls.
Configuring Global Headers
In our example, we will configure global headers. This is useful when multiple API calls in your pipe require the same headers, such as an API key. We copy the necessary header information from the documentation and paste it into the global headers section of the pipe.
Testing the Pipe
Once the pipe is configured with the endpoint, parameters, and headers, you can test it. For example, if retrieving records from a data table, input the necessary parameter (e.g., table ID) and run the test. The response will include the requested records.
- Understanding API Responses: The response will return records in an array format. Each record is stored as an item in the array. While you can extract information from this array, pipes in Tadabase cannot pull out individual records as separate objects. Instead, you can map certain parts of the response, such as the total number of items or specific values from within the array.
Creating Records via API
Next, we’ll create a record using a POST request. This involves configuring the endpoint, method, headers, and the request body.
-
Endpoint and Method: We use a POST method to create a new record. The endpoint remains similar, but the method changes from GET to POST.
-
Request Body: The request body includes the data you wish to send, such as field values. This can be formatted as form data or raw data (typically JSON). For form data, you define keys (field IDs) and values (the data to be sent).
Dynamic vs. Static Data in Requests
You can configure requests to use static data, where the same values are sent each time the pipe is triggered. For example, sending "John Doe" as the customer name in every request. Alternatively, you can use dynamic parameters, allowing the data to be filled in from user input or app data at runtime.
- Mapping Parameters Dynamically: Dynamic parameters let you customize the request data. These are wrapped in curly brackets to indicate they will be filled with dynamic values during the execution of the pipe. For instance, the customer name and email can be populated dynamically from user input, making the request more flexible.
Testing the POST Request
After configuring the POST request, you can test it by providing dynamic or static values for the parameters. The test should result in the creation of a new record in the data table, which you can verify by checking the table for the newly added data.
Summary and Next Steps
This video provided a walkthrough of setting up pipes in Tadabase to retrieve and create records via API. We covered how to:
- Configure API endpoints, parameters, and headers.
- Work with API responses.
- Create records with POST requests using dynamic or static data.
In the next video, we’ll explore how to use these configured pipes inside your actual application, including in the Page Builder and Data Builder. Stay tuned for more insights on integrating pipes with external services like Stripe, Google Calendar, and QuickBooks.
Conclusion
That wraps up this overview of pipes in Tadabase. We’ve covered how to install, configure, and test pipes, as well as the differences between configurable and non-configurable pipes. In future episodes, we'll dive deeper into advanced configurations and more use cases for pipes. Thanks for watching!
We'd love to hear your feedback.