How jurjans/ksj-wp-func works
This is an Azure Functions service that turns SharePoint content-plan metadata into SEO articles and related marketing assets. The main workflow is SharePoint → Power Automate → article generation → WordPress tag resolution and result storage; Power Automate then retrieves results and publishes them. Separate branches generate monthly Latvian and English plans, Facebook copy, images, and SEO keywords. The graph combines README-documented routes and integrations with sampled source and SOURCE INDEX references; some route-to-module details and unsampled subsystems are therefore documented rather than independently verified in excerpts.
Main entry points: function_app.py HTTP endpoints · article_worker.py Tick worker · storage.py Storage helpers · article_gen.py Latvian articles
Components 20
API and jobs
- HTTP endpoints
function_app.py - Tick worker
article_worker.py
Article generation
- Latvian articles
article_gen.py - English articles
en_article_gen.py
Content tools
- Latvian content plans
content_plan.py - English content plans
content_plan_en.py - Facebook copy
fb_gen.py - Social images
image_gen.py - SEO keywords
article_gen.py
Integrations and state
- WordPress REST
- Polylang language API
wordpress/mu-plugins/ksj-polylang-rest.php - Storage helpers
storage.py - Azure Blob Storage
- Azure Table Storage
- Azure Queue Storage
- OpenAI / Azure OpenAI
- Redis cache
- SerpApi
Other components
- SharePoint plan
- Power Automate
Connections 27
- SharePoint plan → Power Automate: supplies metadata
README.md - Power Automate → HTTP endpoints: calls endpoints
README.md - HTTP endpoints → Tick worker: advances jobs
function_app.py - HTTP endpoints → Latvian articles: generates articles
function_app.py - Tick worker → Latvian articles: generates LV article
article_worker.py - Tick worker → English articles: generates EN article
article_worker.py - Latvian articles → OpenAI / Azure OpenAI: requests text
README.md - English articles → OpenAI / Azure OpenAI: requests text
README.md - Tick worker → WordPress REST: resolves tag IDs
article_worker.py - Tick worker → Storage helpers: persists job state
article_worker.py - Storage helpers → Azure Blob Storage: reads and writes
storage.py - Storage helpers → Azure Table Storage: tracks status
storage.py - Storage helpers → Azure Queue Storage: enqueues jobs
- Power Automate → Azure Blob Storage: downloads results
README.md - Power Automate → WordPress REST: publishes articles
README.md - HTTP endpoints → Latvian content plans: generates LV plan
function_app.py - HTTP endpoints → English content plans: generates EN plan
function_app.py - HTTP endpoints → Facebook copy: generates copy
function_app.py - HTTP endpoints → Social images: generates images
function_app.py - HTTP endpoints → SEO keywords: extracts keywords
function_app.py - Latvian content plans → OpenAI / Azure OpenAI: requests titles
README.md - English content plans → OpenAI / Azure OpenAI: requests titles
content_plan_en.py - Facebook copy → OpenAI / Azure OpenAI: requests post copy
fb_gen.py - Social images → OpenAI / Azure OpenAI: requests images
README.md - SEO keywords → Redis cache: uses cache
README.md - Redis cache → SerpApi: fetches on miss
README.md - HTTP endpoints → Polylang language API: sets post language