How to generate invoices automatically with Baserow and Documint

Imagine you’ve just finished a project, sent it to your client, and they loved it. You’re excited to get paid, but then the dreaded task hits—creating that invoice. It’s tedious, repetitive, and can take up precious time you could be spending on more important things.

This is where invoice automation comes in. Whether you’re a freelancer, entrepreneur, or an employee, automating your invoices must-automate type of task.

Here are a few situations where automatic invoices are useful:

  • Regular clients: If you send invoices to the same clients every month, automation takes care of sending out new invoices on time, every time.
  • Project-based work: If you finished a one-off project, automatically generate a new invoice based on the agreed-upon terms.
  • Multiple payment methods: If you accept different payment options like PayPal, credit cards, or bank transfers, automation can handle sending different versions of the invoice based on the chosen method.
  • Error-free accuracy: If you are tired of typos or wrong calculations, automation ensures your invoices are always accurate and consistent, leaving no room for human error.

Setting up automation frees up valuable time to grow your business and connect with clients.

What we’ll do

In this tutorial, we’ll walk you through the process of creating a document with the click of a button. We’ll cover the following steps:

Prerequisites

To complete this tutorial, you’ll need the following:

Let’s dive in!

How to generate invoices with Baserow and Documint

1. Set up your Baserow database

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 template from the library.

  1. To create a new workspace, click the + Create workspace button. Then, click on Add workspace.

    If you’re just starting with Baserow, we recommend you read our support article on how to create a workspace and how to add collaborators to a workspace.

  2. Now that the workspace is set up, you can either create a database from scratch or choose a template from our template library. Let’s use a template from the library.

  3. Click on the + Create new button to start creating a new database.

  4. Select the “From template” option to add a database from a template.

  5. Input “Business Expenses” in the template search box.

  6. Click the Use this template button to add the template to the workspace.

Use this template

Baserow business expenses template

That’s it! we’ve successfully created a new database. Now we can populate, manage, and organize data in Baserow.

2. Create a template in Documint

Now, let’s design a document template in Documint. To do this, create a new document template in Documint. You can start with a premade template or start from scratch with a blank template.

Then add text, images, and formatting as needed.

You can now add where you want dynamic data to be populated from Baserow (e.g., {{name}}, {{address}}, {{order_date}}). To add a variable to your template click the ****‘New Variable button’ on the right-hand Data pane, enter the name of your variable in the input field, ****copy the generated variable name then paste the variable into a text field:

Documint invoice template

You can enter test values to the variable fields to test those variables with sample data to see what your documents will look like before you connect your template to a data source.

Save the template.

3. Create a form view in Baserow

Now that our Baserow account is linked, we need to tell Documint which table in Baserow to extract data from.

Head over to the database in Baserow, and then to the desired table. Here, we are working with the Expenses table.

Create a form to collect new expenses or switch to the Add new expense form within the database.

Add new expense in Baserow

4. Create a new Zap

Log in to your Zapier account and create a new Zap to get started with integrating Baserow with Zapier.

A Zap is an automated workflow that connects your apps and services together. A Zap tells your apps to follow this simple command: “When this happens, do that.”

Zapier is a platform that allows you to connect different apps and automate workflows between them. With Zapier, Baserow users can automate the transferring of their data into other apps.

Start your Zapier integration by clicking + Create Zap from your Zapier dashboard.

5. Add a Baserow trigger

Create a new zap and give it a descriptive name. Click the Trigger step.

Each Zap consists of a trigger and one or more actions. A trigger is an event that starts a Zap. An action is an event a Zap performs after it is triggered.

  • Search for apps and choose Baserow as the trigger app. This will be the app that triggers the workflow.

  • Choose the trigger event that will start the workflow. Click the Event dropdown menu and choose “Row Created” as the trigger event. This will initiate the trigger when a new row is added.

  • Connect your Baserow account and select the table to use. Click Continue.

  • Enter the table ID where the row must be created in. You can find the table ID by clicking on the three dots next to the table. It’s the number between brackets.

  • Click Test trigger. Zapier will attempt to find a recent row in Baserow to use in the Zap. The information can then be used as test data in an action step later in the Zap.

    If Zapier is having trouble finding data for your trigger, try adding new data for the event in your trigger app.

Add a Baserow trigger

Now that we have set up the trigger, we can set up the rest of the Zap by adding an action.

6. Add a Documint action

Set up the action app to create a document from the data in the form.

Add a Documint action

7. Update the row in Baserow

Set up another action app, which will be Baserow in this case. With the Baserow action, we can

  • create a new row
  • delete an existing row
  • update an existing row
  • find a single row in a given table
  • find a page of rows in a given table

In this tutorial, we want to update the same row in Baserow just added.

In the Zap editor, click the plus + icon to add an action step.

  • Search and select Baserow from the list of available apps.
  • Click the Event dropdown menu and select the “Update Row” event. This will update the row when the Zap runs.
  • Connect your Baserow account and select the database and table.
  • Map the corresponding fields in Baserow. Click Continue.
  • Test the workflow to make sure it’s working correctly.

Update row in Baserow

Publish the Zap and start automating!

Once set up, Zapier will create a document in Baserow every time a new row is created in Baserows.

Summary

By integrating Baserow with Documint, you unlock a new level of automation and personalization to effortlessly create custom documents tailored to your specific needs. Whether you’re sending invoices, generating reports, or crafting contracts, this automation empowers you to work smarter, not harder. Just seamlessly integrate your Baserow rows into customized PDFs with a click.

Other useful resources

The following articles may also be helpful:

In case you’ve run into an issue while following this tutorial, feel free to reach out to ask for help in the Baserow community.