Introduction to Pipes

What are Pipes? 

Pipes is an all-powerful, built-in integration system that enables you to access and trigger external APIs from within your Tadabase app. You can use pipes to merge your data in Tadabase with external data from thousands of your favorite services, dynamically pulling any outside data you need into your Tadabase app and creating just about any workflow and connection imaginable. 

Here are some of the following ways you can use pipes:

  • Dynamically load external data within components to merge with internal data
  • Dynamically load form values with externally retrieved data
  • Update and insert database values behind the scenes using returned values from an API
  • Validate forms before submission against any external data
  • Auto-route users to where you want them to go using ingested data and logged-in user values 

 

How Pipes work

To understand how Pipes work in Tadabase, let's take a look at a simple Weather Pipe. 

Suppose that every time users login to their apps you want to merge the current weather information for their current locations (the Parameter) by asking the "weatherman" (the API Call) using the "secret password" (the Header) to pass on the weather. The weatherman checks the header to make sure you do indeed have access and responds with the accurate weather values using a predefined (JSON) format. The weather response values will then be displayed in your app, relative for each logged-in user.

The following diagram illustrates how the above weather pipe works in Tadabase.

Now that we've provided a glimpse into how Pipes work, let's explore some of the above-mentioned use cases for how you can use Pipes to achieve your goals.

Use cases

We'll briefly discuss each of these Pipes use cases below, as well as further explore each within its own article to come. 

Merge external data into tables

Generally, table components display data from a selected data table within Tadabase. With Pipes, however, you can pull data from any external source and merge it into the table component within Tadabase when the table loads. In this way, you can provide users with the full picture of data, merging both internal and external data within one table component that users can process at a glance. 

To illustrate this, let's go back to our basic example of a simple Weather Pipe.  

The following table component shows a list of cities which are pulled from the Cities data table within Tadabase. 

With Pipes, you can add external data to this table component, such as the current temperature and weather description for each city. This weather information is not stored in Tadabase, rather it is dynamically retrieved from an external weather source using a pipe and dynamically loaded into the table component as new columns.   

 

Load external data into forms

With Pipes, you can also dynamically populate forms with externally retrieved data. 

For instance, if you want to automatically gather information on a vehicle based on a VIN number, you can use a pipe to retrieve the vehicle information from an external source and systematically populate the correct form fields with the values returned in the pipe when the VIN number is entered. As you can see in the gif below, when users enter their VIN numbers within the Vehicle Information form, their vehicle information will be automatically retrieved and populated within the form. 

form-pipe-load.gif

 

 

Validate against external data

You can also use Pipes to validate data against pipe values to prevent forms from being submitted when specific conditions are met. 

For instance, a moving company can ask users for their Moving From and Moving To locations. With a Pipe, the total distance between the two provided locations can be automatically referenced from an external source and validated against a maximum distance that you predefine. If the distance exceeds the predefined maximum distance allowed, show a custom error message and prevent the form from being submitted. 

distance-search.png

 

 

Update records based on Pipes

You can also use Pipes to update records based on external values returned in the pipe. The values returned in the pipe will be saved statically into the database. 

For instance, when a user saves a URL in the database, a Pipe can automatically update the URL to a shortened URL and save that shortened URL to the database in place of the original URL value entered by the user. 

recordrules.jpg

 

Auto-route users based on Pipes

You can also use Pipes to direct users based on external values as well as logged-in user values. 

For instance, you can trigger a Pipe to run every time a page loads to check the logged-in user's email address and check Stripe to see if the logged-in user's Stripe subscription is active. If the logged-in user's Stripe account is active, auto-route that user to the Dashboard page. If the logged-in user's Stripe account is inactive, show a custom error message saying that the user is not authorized to visit this specific page.

pagerules.jpg

 

Show custom data based on Pipes

You can also use Pipes to show custom data inside any HTML component based on values returned in the Pipe.

For instance, when users login to the app, show the current weather for their current locations.