Baserow has become the go-to solution for managing and organizing data, thanks to its robust database capabilities. With the right knowledge, you can take your data management game to a whole new level by syncing it with external tools.
Imagine this: all your data and processes are stored in Baserow, but you want to extend their functionality by integrating with other tools like CRMs, email marketing platforms, or analytics services. This is where Baserow’s API comes in handy. It effortlessly bridges the gap and streamlines your operations.
Why connect Baserow to external tools? The answer is simple: it opens up a world of possibilities. By automating tasks, enhancing data analysis, and making your workflow more efficient, you unlock the full potential of your data management.
In this tutorial, you’ll learn how to harness the power of Baserow’s API to create custom automation. We’ll cover the following:
You’ll need the following:
Let’s explore how you can easily connect to the tools and services you use regularly.
Log in to your existing Baserow account or create a new account if you don’t have one already.
Once you log in, you can access the dashboard to add workspaces and databases. You can work with an existing workspace, database, or table, or set up a new workspace from scratch.
In this tutorial, we will set up a new workspace and add a database to the workspace.
If you’re just starting with Baserow, we recommend you read our article on how to create a workspace and how to add collaborators to a workspace.
That’s it! we’ve successfully created a new database. Now we can populate, manage, and organize data in Baserow.
Next, we want to create a Baserow API token and give it the necessary permissions for reading and writing data.
Refer to this article to learn more about Baserow authentication and token types.
Now, let’s take a look at the database API documentation.
The rules and functions to follow to make an API call are laid out in the database documentation. Understanding this will help efficiently manage data retrieval and manipulations through the API.
REST APIs are core operational tools that enable organizations and developers to consume and build on top of Baserow’s various database capabilities. Baserow’s API follows REST semantics, uses JSON to encode objects, and relies on standard HTTP codes, and machine and human-readable errors to signal operation outcomes.
To access the database API documentation,
⋮
beside the database.The database API consists of different endpoints for specific actions. These endpoints can be found in the left sidebar.
Next, we’ll set up and use Baserow’s API with Insomnia or Postman.
Open your preferred API client, such as Insomnia or Postman.
Insomnia is an open-source API development platform that allows you to create and manage API requests, write and run automated tests, and collaborate with team members. Postman also allows you to automate your API tests by creating collections of requests and tests.
We’ll be using Insomnia in this tutorial, but the same steps apply to any API that allows performing repetitive tests, regression testing, and integration testing.
Within Insomnia, create a new project then create a new HTTP request:
GET
, POST
, PUT
, DELETE
). This is based on the action you want to perform with the API.https://api.baserow.io/
. Refer to the API documentation for the endpoint URLs for various actions.
Authorization: Token YOUR_API_TOKEN
Key: Authorization
. Add the API token as an authorization header.Token YOUR_API_KEY
(Replace YOUR_API_KEY
with the API key you obtained in the earlier step).Content-Type
application/json
(or other applicable content types).Now, let’s explore create, read, update, and delete (CRUD) operations with Baserow’s API:
POST
requests to create new rows in your Baserow database. For example, to create a new row in Baserow, you can make a POST request to the /api/database/rows/table/{table_id}/
endpoint.GET
requests. You can specify filters, sorting, and pagination.PUT
or PATCH
requests.DELETE
requests.Click the Send button in Insomnia to test the connection. You’ll get a response with your Baserow data.
Check the response to make sure it has the expected data. You might need to refer to Baserow’s API documentation to understand the response.
Now, let’s explore how we can use Baserow’s API to create custom automation solutions and make any necessary improvements.
Finally, integrate Baserow data into your automation solution using code snippets from the response. For instance, you can automate data transfer, trigger actions based on specific events in Baserow, or fetch data from external sources into Baserow.
Depending on your use case, schedule the script to run at specific intervals or utilize webhooks to trigger it in response to specific events within Baserow.
Before deploying your automation solution, thoroughly test it to ensure it functions as intended. Additionally, closely monitor the performance of the automation to guarantee accurate data transfer.
That’s it!
You’ve successfully set up Baserow, obtained an API key, and connected external tools. Now, the possibilities for enhancing your workflow efficiency are endless. You can synchronize data, trigger actions in external applications, or build custom workflows.
With Baserow, you can integrate with various applications, automate tasks, and streamline your workflow. For instance, you can create a new Baserow row whenever a new lead is added to a Google Sheets spreadsheet.
Feel free to explore more advanced features of Baserow’s API, like handling attachments, batch processing, or using webhooks for event-driven automation.
The following articles may also be helpful:
If you run into any issues following this tutorial, feel free to reach out to the Baserow community, and someone will jump in to help.