Google
|
af Autom Team

Building an Automation To Build Title & Description for Your Keyword

SEOs have this long standing task of building titles & description of pages they do work on.

Be it a new project or the one that is already there, you still need to change or make new Titles & Descriptions.

For the research part you often look at top search results and then decide what your title could be.

Taking that into account, we have build this automation, wherein when you give this a keyword, in the output you get Title & Description from the top search results.

In this article, I will build one such automation from scratch & in the end will also give you the blueprint that you can use as is in your n8n canvas.

Let’s get started!!

How This Workflow Works

How This Workflow Works

Tools we are using to build this workflow:

  1. Autom Google Search API
  2. Google Spreadsheet (For maintaining database)
  3. n8n for building your workflow

Our workflow needs a Spreadsheet to maintain a database. We have kept it really simple, see how it looks below: -

Our workflow needs a Spreadsheet

Before we start I would ask you to sign up to Autom, it gives 1000 free credits, so we can easily check the API for our testing.

Building Our Workflow in n8n

If you are somewhat familiar with n8n, it is a platform for sticking up different applications so that your data easily pass through each one of them.

After signing up you can click “Create Workflow”

Create Workflow

You will get into a blank Canvas.

You will get into a blank Canvas

From here we will stick up our applications together. Before starting each workflow there needs to be a trigger.

Our workflow will have manual trigger, you can have any other trigger if you want.

The next node will be the Google Sheet, the operation will be → Get Rows

The next node will be the Google Sheet

This will fetch all the keywords, except for those which have already have “Title”

Let’s see the output of this node:

Output of this node

Now to be extra sure, we would use Limit node & will keep the max items — 1 to only get one keyword at a time to input our Google Search API.

Limit node & will keep the max items

It’s time to pass this keyword to our API to fetch all the 10 results from this keyword.

For that we will use HTTP request, use the Autom’s right endpoints. You can refer to the documentation more to understand how this API works.

Understand how this API works

This is how the configuration of this node looks like. Let’s see the output of this node.

How the configuration of this node looks like

We are getting all the organic results in an array, so we would need a split node, that will seperate out all the array items into single list.

And then use aggregate node to get combined Titles, and Snippet as we need to pass them to our AI model.

Use aggregate node to get combined Titles

The next node is Basic LLM Chain, where we will give this data as input.

We are using OpenRouter, if you have OpenAI Key, you can use that in place of Model.

Here are the system prompt I have used:

Here are the system prompt

& here is the user prompt below.

Here is the user prompt below

Just one more thing before we move forward, I have the checked the button for “Require specific format” because we want our output to be in JSON, it is easy to collect back it in our Google Spreadsheet.

Require specific format

And the JSON for this we have given as an example is:

 
{
    "title": "This is the title of the keyword",
    "description": "This is the description of the blog"
}

Let’s check the output from this LLM

Let’s check the output from this LLM

Now we will take that back in Google sheets.

Let’s run the whole workflow again & we can see that we are getting Title & Description in sheets.

Getting Title & Description in sheets

Here is the blueprint for this automation, you would only need the API_KEY from the Autom.

Conclusion

Like, this workflow, you can build more automations where data from organic google search is required.

Over the course, we will build more workflows that can help working professionals in SEO or Digital Marketing.

The cost at which this operates is very minimal when compared to any 3rd party front end tool. Also, if you need help in setting up the API for your process we are happy to help.

Ping us on chat!

Thanks for reading this blog.

SERP API

Discover why Autom is the preferred API provider for developers.