Automatic Post creation for SSG Workflows

Automatic Post creation for SSG Workflows

September 5, 2025

TL;DR

Lately, I have been playing with Gitea’s API on this post and vibed coded some .md next to its deployment to understand it in the future.

It made me think how to combine Gitea as a source for SSG for website generation.

And million more ideas

While the posts skeletons could be passed into a n8n workflow, with some openai LLMs / codex / whatever to shape them as per some input data.

Scrapping from a website, data formatting for real estate or events…you name it.

Intro

Just get your server and containers going:

And you can also backup gitea with: https://github.com/RayLabsHQ/gitea-mirror

The n8n x Gitea Stack

This is very simple:

git clone https://github.com/JAlcocerT/Home-Lab
  1. Get n8n ready:
cd n8n
sudo docker-compose up -d

Login via http://192.168.1.11:5678/home/workflows

Or just make your n8n public via CF Tunnels:

sudo docker network ls
#docker network ls | grep cloudflared_tunnel
#sudo docker ps | grep n8n
docker network connect cloudflared_tunnel n8n-n8n-1 #network -> container name

Verify:

#docker inspect n8n-n8n-1 --format '{{json .NetworkSettings.Networks}}' | jq

Go to CF zero trust section and add as http n8n-n8n-1:5678 as subdomain and enjoy https://n8n.jalcocertech.com/home/workflows

  1. Get Gitea ready: https://github.com/go-gitea/gitea

MIT Git with a cup of tea! Painless self-hosted all-in-one software development service, including Git hosting, code review, team collaboration, package registry and CI/CD

cd gitea
sudo docker-compose up -d

#sudo docker ps | grep gitea
docker network connect cloudflared_tunnel gitea #network -> container name
#docker inspect gitea --format '{{json .NetworkSettings.Networks}}' | jq

Similarly, add the gitea:3000 and enjoy your public gitea: https://git.jalcocertech.com/

â„šī¸
You can do a lot with GITEA API, as I covered here

N8N API

When you get n8n ready, create your API key:

alt text

Then, get familiar with the docs https://n8n.jalcocertech.com/api/v1/docs/ as per https://docs.n8n.io/api/

Its just a Swagger UI!

Get your n8n_api and N8N_BASE_URL:

source .env
#the API  requires auth!
#curl -s "http://localhost:5678/api/v1/health" | jq .

So you need to go to the swagger UI and authorized the created API:

alt text

Only after that, this will work and you will get/pull workflows:

  curl -s \
    -H "X-N8N-API-KEY: $n8n_api" \
    "$N8N_BASE_URL/api/v1/workflows" | jq .

See

curl -s \
  -H "X-N8N-API-KEY: $n8n_api" \
  "https://n8n.jalcocertech.com/api/v1/me" | jq .
â„šī¸
You can build your workflows, or get inspired on n8n JSON people shared

Supercharge your workflow automation with this curated collection of n8n templates! Instantly connect your favorite apps-like Gmail, Telegram, Google Drive, Slack, and more-with ready-to-use, AI-powered automations. Save time, boost productivity, and unlock the true potential of n8n in just a few clicks.

Create a n8n workflow via CLI:

#  -H "X-N8N-API-KEY: YOUR_API_KEY" \

curl -s -X POST \
  -H "Content-Type: application/json" \
  -H "X-N8N-API-KEY: $n8n_api" \
  "https://n8n.jalcocertech.com/api/v1/workflows" \
  -d '{
    "name": "My API-created workflow",
    "nodes": [],
    "connections": {},
    "active": false
  }' | jq .

Get the workflowID:

And activate the wID:

Finally, execute the n8n workflow manually:

curl -s -X POST \
  -H "Content-Type: application/json" \
  "$N8N_BASE_URL/webhook/api-created-hook" \
  -d '{"hello":"world"}' | jq .

N8N Example Workflows

With OpenAI, with GeminiAPI

Sample 1

alt text

alt text

For this one, we need gemini API: https://aistudio.google.com/app/apikey

alt text

#source .env
curl "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent" \
  -H 'Content-Type: application/json' \
  -H 'X-goog-api-key: GEMINI_API_KEY' \
  -X POST \
  -d '{
    "contents": [
      {
        "parts": [
          {
            "text": "Explain how AI works in a few words"
          }
        ]
      }
    ]
  }'

Sample 2

Get your OpenAI API: https://platform.openai.com/api-keys

With OpenAI: https://n8n.io/workflows/4696-conversational-telegram-bot-with-gpt-5gpt-4o-for-text-and-voice-messages/


Conclusions

If you are doing still your social media ,manually'.

You should probably have a look at this kind of n8n setups, together with PostIZ.