Seeking Assistance for Automating Blog Post Creation with Variable Structure

Hello Activepieces Community,

I am reaching out for guidance on a challenging automation task I’m facing. My objective is to automate the creation of blog posts with a structure that varies significantly from one post to another. Here’s a brief overview of the issue:

The Task: I am creating blog posts that contain multiple subheadings (H2 tags). Some of these subheadings have further subsections (H3 tags). The number of H2 and H3 tags varies with each blog post. For example, one post might have 5 H2 tags without any H3 tags, while another might have 7 H2 tags and 8 H3 tags. Additionally, each H3 tag is contextually linked to its parent H2 tag.

The Challenge: The primary challenge is the variability in the number and hierarchy of H2 and H3 tags in different blog posts. This variability makes it difficult to standardize an automation process. I need an automation setup that can adapt flexibly to these differences, without the need to manually create a new workflow for each unique blog post structure.

Example for Clarity: Consider a blog post titled “Healthy Eating Habits,” with the following structure:

  1. Introduction (H2)
  2. Benefits of Healthy Eating (H2)
  • Weight Management (H3)
  • Improved Heart Health (H3)
  1. Essential Nutrients for a Balanced Diet (H2)
  2. How to Plan Healthy Meals (H2)
  • Breakfast Ideas (H3)
  • Lunch Ideas (H3)
  • Dinner Ideas (H3)
  1. Conclusion (H2)

In this scenario, there are 5 main sections (H2) and some have their own subsections (H3), totaling 8 steps. However, another post might have a completely different structure.

The only use of routing would be endless to create, as sometimes we have more than 100 titles and subtitles. Maybe there is something in loop, but I don’t know.

I am seeking advice or strategies on how to set up an automation process in Activepieces that can handle this level of complexity and variability efficiently. Any insights, suggestions, or guidance on how to approach this would be greatly appreciated.

In this example here we are having more or less the same thing, except that I dont want to only work on a 5 headlines basis, depends each time on what is the context about.

Thank you in advance for your help!

Hi @Nadir_de_Source

Welcome to the community!

let’s try to get a bit deeper in the context, how is your input structured? You have like google sheets and in one colmun you have the titles and in the other the headers?

Please elaborate on that as i might think we can fix this quiet easily. Have something links this setup in the past and was way overthinking :wink:

KR Bram

2 Likes

What makes them vary in structure? Who/what controls it? Pretty much the same question @Bram is asking :slight_smile: and welcome to Activepieces!

1 Like

Hi @Bram & @ashrafsam , thanks for your messages and welcome.

Below is my first input as an example.

Then as a step 2, I ask chatgpt to send me a structure like this :

{
  "title": "7 habits to become a millionaire from nothing",
  "headings": [
    {
      "level": "h2",
      "number": "h2-01",
      "text": "Ways To Become A Millionaire"
    },
    {
      "level": "h3",
      "number": "h3-01-h2-01",
      "text": "Start A Successful Business"
    },
    {
      "level": "h3",
      "number": "h3-02-h2-01",
      "text": "Invest In The Stock Market"
    },
    {
      "level": "h3",
      "number": "h3-03-h2-01",
      "text": "Invest In Real Estate"
    },
    {
      "level": "h3",
      "number": "h3-04-h2-01",
      "text": "Save And Invest Over Time"
    },
    {
      "level": "h3",
      "number": "h3-05-h2-01",
      "text": "Develop High-income Skills"
    },
    {
      "level": "h3",
      "number": "h3-06-h2-01",
      "text": "Generate Multiple Income Streams"
    },
    {
      "level": "h3",
      "number": "h3-07-h2-01",
      "text": "Ride Economic Waves"
    },
    {
      "level": "h2",
      "number": "h2-02",
      "text": "Tips To Becoming A Millionaire"
    },
    {
      "level": "h3",
      "number": "h3-01-h2-02",
      "text": "Develop A Written Financial Plan"
    },
    {
      "level": "h3",
      "number": "h3-02-h2-02",
      "text": "Stay Away From Debt"
    },
    {
      "level": "h3",
      "number": "h3-03-h2-02",
      "text": "Start Saving Early"
    },
    {
      "level": "h3",
      "number": "h3-04-h2-02",
      "text": "Make Savings A Priority"
    },
    {
      "level": "h3",
      "number": "h3-05-h2-02",
      "text": "Invest Early And Consistently"
    }
  ],
  "total_number_of_headlines": 15
}

I stopped at this point yesterday, as I was wondering maybe that the last property “15” could give me a number of loop to work on.

Apart from this I have no idea at this stage. (And now need to figure out how to manage json answers and loops as i’m a total beginner with activepieces).

Thanks for your help :slight_smile:

Hi

any feedback on this one @ashrafsam @Bram

@Nadir_de_Source what you can also do is include the H3s as an array under each H2. You’ll have to loop each H2 and loop through the H3s within.

The structure is easier to automate that way.