# mohammed-askar-lahim/ai-content-automation architecture

> Architecture diagram of the GitHub repository mohammed-askar-lahim/ai-content-automation, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mohammed-askar-lahim/ai-content-automation
- Repository: https://github.com/mohammed-askar-lahim/ai-content-automation

## Overview

This repository configures a daily n8n workflow that gathers events from registered websites, enriches and filters them, then publishes them to WordPress. The graph follows the README’s documented capabilities; the workflow JSON was not available as an excerpt, so relationships are limited to those explicitly described there.

Main entry points: [`workflow/automation.json`](https://github.com/mohammed-askar-lahim/ai-content-automation/blob/main/workflow/automation.json) (Site scraper)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_collection["Collection"]
  node_schedule["Daily schedule<br/>[automation.json]"]
  node_source_registry["Source registry<br/>[automation.json]"]
  node_scraper["Site scraper<br/>[automation.json]"]
  node_site_limit["Per-site limit<br/>[automation.json]"]
end

subgraph group_enrichment["Event enrichment"]
  node_llm_extraction["LLM extraction<br/>[automation.json]"]
  node_translation["Translation<br/>[automation.json]"]
  node_b2b_filter["B2B filter<br/>[automation.json]"]
  node_image_fallback["Image fallback<br/>[automation.json]"]
  node_image_generation["AI image generation<br/>[automation.json]"]
end

subgraph group_publishing["Publishing"]
  node_batch_publisher["Batch publisher<br/>[automation.json]"]
end

node_source_sites(("Event source sites"))
node_openrouter{{"OpenRouter"}}
node_wordpress{{"WordPress endpoint"}}

node_schedule -->|"starts run"| node_source_registry
node_source_registry -->|"provides sources"| node_scraper
node_scraper -->|"scrapes"| node_source_sites
node_scraper -->|"collects events"| node_site_limit
node_site_limit -->|"limits events"| node_llm_extraction
node_llm_extraction -->|"uses model"| node_openrouter
node_llm_extraction -->|"extracts content"| node_translation
node_translation -->|"translates content"| node_b2b_filter
node_b2b_filter -->|"filters events"| node_image_fallback
node_image_fallback -->|"requests missing image"| node_image_generation
node_image_generation -->|"generates image"| node_openrouter
node_image_fallback -->|"provides event images"| node_batch_publisher
node_batch_publisher -->|"publishes batches"| node_wordpress

click node_schedule "https://github.com/mohammed-askar-lahim/ai-content-automation/blob/main/workflow/automation.json"
click node_source_registry "https://github.com/mohammed-askar-lahim/ai-content-automation/blob/main/workflow/automation.json"
click node_scraper "https://github.com/mohammed-askar-lahim/ai-content-automation/blob/main/workflow/automation.json"
click node_site_limit "https://github.com/mohammed-askar-lahim/ai-content-automation/blob/main/workflow/automation.json"
click node_llm_extraction "https://github.com/mohammed-askar-lahim/ai-content-automation/blob/main/workflow/automation.json"
click node_translation "https://github.com/mohammed-askar-lahim/ai-content-automation/blob/main/workflow/automation.json"
click node_b2b_filter "https://github.com/mohammed-askar-lahim/ai-content-automation/blob/main/workflow/automation.json"
click node_image_fallback "https://github.com/mohammed-askar-lahim/ai-content-automation/blob/main/workflow/automation.json"
click node_image_generation "https://github.com/mohammed-askar-lahim/ai-content-automation/blob/main/workflow/automation.json"
click node_batch_publisher "https://github.com/mohammed-askar-lahim/ai-content-automation/blob/main/workflow/automation.json"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_schedule,node_source_registry,node_scraper,node_site_limit toneBlue
class node_llm_extraction,node_translation,node_b2b_filter,node_image_fallback,node_image_generation toneAmber
class node_batch_publisher,node_openrouter toneMint
class node_source_sites,node_wordpress toneIndigo
```

## Components

### Collection

- [Daily schedule](https://github.com/mohammed-askar-lahim/ai-content-automation/blob/main/workflow/automation.json): `workflow/automation.json`
- [Source registry](https://github.com/mohammed-askar-lahim/ai-content-automation/blob/main/workflow/automation.json): `workflow/automation.json`
- [Site scraper](https://github.com/mohammed-askar-lahim/ai-content-automation/blob/main/workflow/automation.json): `workflow/automation.json`
- [Per-site limit](https://github.com/mohammed-askar-lahim/ai-content-automation/blob/main/workflow/automation.json): `workflow/automation.json`

### Event enrichment

- [LLM extraction](https://github.com/mohammed-askar-lahim/ai-content-automation/blob/main/workflow/automation.json): `workflow/automation.json`
- [Translation](https://github.com/mohammed-askar-lahim/ai-content-automation/blob/main/workflow/automation.json): `workflow/automation.json`
- [B2B filter](https://github.com/mohammed-askar-lahim/ai-content-automation/blob/main/workflow/automation.json): `workflow/automation.json`
- [Image fallback](https://github.com/mohammed-askar-lahim/ai-content-automation/blob/main/workflow/automation.json): `workflow/automation.json`
- [AI image generation](https://github.com/mohammed-askar-lahim/ai-content-automation/blob/main/workflow/automation.json): `workflow/automation.json`

### Publishing

- [Batch publisher](https://github.com/mohammed-askar-lahim/ai-content-automation/blob/main/workflow/automation.json): `workflow/automation.json`

### Other components

- **Event source sites**
- **OpenRouter**
- **WordPress endpoint**

## Connections

- Daily schedule → Source registry: starts run (evidence: `README.md`)
- Source registry → Site scraper: provides sources (evidence: `README.md`)
- Site scraper → Event source sites: scrapes (evidence: `README.md`)
- Site scraper → Per-site limit: collects events (evidence: `README.md`)
- Per-site limit → LLM extraction: limits events (evidence: `README.md`)
- LLM extraction → OpenRouter: uses model (evidence: `README.md`)
- LLM extraction → Translation: extracts content (evidence: `README.md`)
- Translation → B2B filter: translates content (evidence: `README.md`)
- B2B filter → Image fallback: filters events (evidence: `README.md`)
- Image fallback → AI image generation: requests missing image (evidence: `README.md`)
- AI image generation → OpenRouter: generates image (evidence: `README.md`)
- Image fallback → Batch publisher: provides event images (evidence: `README.md`)
- Batch publisher → WordPress endpoint: publishes batches (evidence: `README.md`)
