How to create an AI article generator without code

Banner to automate article generation with Baserow, Make, and OpenAI

Content creation is a critical aspect of maintaining an online presence. Whether you’re a blogger, marketer, or content creator, the ability to generate engaging articles efficiently is a game-changer. That’s where Baserow and Make come into play, making the content creation process simpler and more efficient.

Imagine adding an article title as a new row in a Baserow table, ticking a checkbox, and in just a minute, your article is ready, all thanks to the power of OpenAI. Say goodbye to writer’s block and hello to a more efficient content creation journey.

With a relational database like Baserow, you can organize your data in a structured way with the familiarity of a spreadsheet interface. However, Baserow databases are far more powerful than traditional spreadsheets and can handle larger amounts of data.

What we’ll do

In this tutorial, we’ll walk you through the process of transforming your ideas into captivating content. We will set up automation to generate articles from article titles, without leaving the database.

We’ll cover the following steps:

Prerequisites

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

  • A Baserow hosted or self-hosted account.
  • Access to a Baserow workspace and table.
  • An OpenAI account. OpenAI API is powered by a diverse set of models with different capabilities which include language models that can understand and generate text.
  • A Make account. An automation tool that lets you connect different apps and services to automate workflows and repetitive operations.

Let’s turn your article titles into engaging, well-structured content.

Generate articles from article titles

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 choose to 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 create a database from scratch.

  1. To create a new workspace, simply click on 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.

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

  4. Select the “Database” option to create a database from scratch.

  5. Next, add a new table or click on a table within the existing database to open it. A default table will be added to the newly created database.

Set up your Baserow database

You can try one of our 60+ templates to help quickly create databases for your website, CRM, apps, or CMS.

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

2. Define the necessary fields

In the table, we want to add the list of topics and prompts. Add the following fields to the table:

Field name Field type
Title Single line text
Ready for Generation Boolean
Article Long text

Define the necessary fields

To automatically generate prompts, refer to our post on how to generate ideas with OpenAI’s GPT-3 and Baserow. This way, you can refill the Title field with new ideas for creative content, messaging, or marketing campaigns.

The prompt serves as an instruction and makes it clear the list of ideas we want to generate. For example, “Write a blog post about how to start a business”.

Giving the model a clear and specific prompt to write about will help it produce more focused and relevant content.

3. Create a database token

Within your Baserow user account, you can create a unique database token that allows Baserow to connect with other apps. You can create and find the database token under your account settings.

Creating database tokens is available to all Baserow users; you don’t need to be on a paid plan.

  1. Go to your profile, then navigate to your Settings page.
  2. Click on the Database tokens tab.
  3. Click on the Create token + button.
  4. Write a descriptive name for the token, and select the existing group that you want to tie the token to.
  5. Click on the Create token button to create a new database token for the selected group and the authorized user.

Create a Baserow database token

API tokens provide similar functionality to login credentials, but they provide additional security and flexibility. A token, like your username and password, should be kept secure and handled with the utmost confidentiality.

4. Generate an OpenAI API key

OpenAI API uses API keys for authentication.

Create a free OpenAI account. After logging in, click on the account tab at the top right corner of the screen. Then select “View API keys” from the menu options to retrieve the API key. We’ll use this key in our requests.

Generate an OpenAI API key

OpenAI endpoints can be used for content or code generation, summarization, expansion, conversation, creative writing, style transfer, and others.

Remember that your API key is a secret. Do not share it with others or expose it in any client-side code.

Next, we want to make requests via Make.

5. Set up a webhook as a trigger

We want to pull in data from our Baserow table with the Webhook module. This is a Trigger module that serves as the starting point for the workflow. The Custom webhook trigger triggers when the webhook receives data from Baserow after an event occurs.

For more information on how to create a webhook in Make, see the online Help.

Set up a webhook as a trigger

Copy the address to the clipboard.

6. Create a webhook in Baserow when row is updated

We want to watch when the “Ready for Generation” checkbox is checked.

Now that we have the webhook URL, we need to configure the application with this webhook URL to set up the trigger that will initiate the automation.

Go back to Baserow to create a webhook. Webhooks can inform 3rd party systems when rows in Baserow have been created, updated, or deleted.

  1. Create a new webhook in the table.
  2. Select the method as POST and paste the webhook URL copied from Make to receive requests.
  3. Select “Let me select individual events” to trigger the webhook when rows are updated.

Create a webhook in Baserow when a row is updated

Set a filter to watch for new records with the “Ready for Generation” checkbox is true.

7. Add OpenAI module to draft

Next, we will pass the command into a field to run an API request. The API will generate content from the Title field.

  1. Add OpenAI (DALL-E & ChatGPT) as the action app.
  2. Create a connection or select a previously configured connection from the dropdown options.
  3. Select the Method as Create a prompt completion. This creates a completion for a provided prompt or chat.
  4. Select the Model.
  5. Map the command to generate completions from the Title field in the Webhook module.
  6. Click OK to save this module and Run once to test the connection.

For more information on how to create a connection to OpenAI (ChatGPT, Whisper, DALL-E) in Make, see the online Help.

Add OpenAI module to draft

8. Add the Baserow module to update rows

We’ll use the same database and table.

  1. Click the + sign and select Baserow as the app.
  2. Select the ’Create a Row’ action. This creates new rows.
  3. Select the previously configured connection from the dropdown options.
  4. Enter the table ID where the row will be created in (table B). Find the Table ID by clicking on the three dots next to the table. It’s the number between brackets.
  5. Map the ‘Ideas’ from the Flow control - Iterator module.
  6. Map the ‘Related row ID’ from the Baserow module.
  7. Click “OK” to save this module and “Run once” to test the connection.

Add the Baserow module to update rows

9. Test & schedule the Make scenario

Our scenario is set up and ready to activate, but we may still need to run a quick test. Run the scenario, Make will load the prompt and store the data in the Baserow database.

Let’s jump back to Baserow. Check your Baserow table for the responses.

Specify when and how frequently an activated scenario runs. To do so, go to the scenario detail page and locate the Schedule tab or click on the clock icon to set a preferred schedule.

To set the schedule, adjust the Run scenario to set the time when it should run.

Save and activate the scenario by toggling on the scheduling switch at the bottom left corner. Now that the automation is set up, you can create new topics in the table to generate ideas immediately, without leaving your database.

Summary

Organizations stand to gain significantly from AI automation. Still, it is helpful to carefully assess its effects and make sure that people continue to play a crucial role in business processes. While some processes may be automated, like with any new technology, people still play an essential part in designing, deploying, and maintaining these systems.

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.