Read keyword research database, pull Google Search Console data (clicks, impressions, positions), scan 20 RSS health feeds, check Google Autocomplete suggestions via Brave Search API.
Apply priority matrix: highest search volume + lowest competition. Check against published-articles.json to avoid duplicates. Verify topic doesn't exist on umeds.id via site:umeds.id search.
published-articles.jsonumeds.id/sitemap.xml
3
Generate Featured Image
Run gen.py with topic-based prompt โ Alibaba Wan 2.7 Image Pro generates medical illustration โ saved as .webp file. If image fails, entire pipeline stops.
Alibaba Wan 2.7gen.py.webp output
4
Write SEO Article
AI writes ~1,200 words in Bahasa Indonesia. Structure: H1 โ H2 โ H3 with FAQ section from Google Autocomplete. Internal links verified from sitemap. Medical authority tone for dental students.
AI WriterHTML output
5
Publish as Draft
POST to Umeds API with title, HTML content, description, and featured image (multipart/form-data). Article saved as draft for Minhaj to review before publishing.
api.umeds.idX-Api-Token auth
6
Report to Telegram
Send summary: chosen keyword, article title, article ID, and 2-4 bullet points explaining why this keyword was selected (volume + competition data).
Telegram Bot API
๐ฐ Daily News Article
๐ Every day 11:00 WIB๐ค Telegramโฑ ~3 min
1
Fetch News from 20+ Sources
Run news-search.mjs โ scrapes RSS feeds (Detik Health, Kompas, CNN Health, etc.) + Google News medical keywords. Aggregates and ranks topics by relevance to dental/medical students.
news-search.mjs20 RSS feedsGoogle News
2
Rank & Select Top Topic
AI filters for dental student relevance: exam news, career updates, clinical cases, ethics stories. Picks the single best topic that hasn't been covered yet.
AI Rankingnews-topics.json
3
Generate Featured Image
gen.py creates a relevant news-style illustration using Alibaba Wan 2.7. Pipeline stops if image generation fails.
Wan 2.7 Image Progen.py
4
Write News Article
AI writes ~800 words in news format: lead paragraph first (who/what/when/where), shorter paragraphs, factual tone. Targeted at calon dokter perspective.
AI WriterHTML output
5
Publish to News Category
POST to Umeds API under the News category. Article goes live for review.
api.umeds.idNews category
6
Report to Telegram
Article ID, title, slug, and source summary sent to Minhaj.
Telegram
๐ Weekly SEO Audit
๐ Every Monday 09:00 WIB๐ค WhatsApp Group + GitLabโฑ ~7 min
1
Pull SEO Data
Connect to Google Search Console (sc-domain:umeds.id) for clicks, impressions, CTR, positions. Pull GA4 data (property 327027843) for users, sessions, pageviews, bounce rate, traffic sources.
GSC APIGA4 APIService account JSON
2
Fetch Trends & Sitemap
Run RSS trends script for health/dental topics. Refresh sitemap URLs from umeds.id/sitemap.xml for internal linking verification.
rss-trends.mjssitemap-urls.txt
3
Code Audit
Pull latest code from GitLab (ummacademy_client). Scan for: missing alt attributes, hardcoded localhost, missing lazy loading, broken schema markup, meta tag issues, render-blocking resources.
Git pullGitLab API
4
Auto-Fix (if issues found)
Create Git branch seo/auto-fix-YYYY-MM-DD โ apply fixes โ commit โ push โ create Merge Request on GitLab. If no issues, skip this step.
Git branch + pushGitLab MR
5
Generate PDF Report
Markdown report with all metrics, low-CTR opportunities, and findings โ converted to PDF via Puppeteer.
md-to-pdf.mjsaudit-YYYY-MM-DD.pdf
6
Deliver to WhatsApp Group
Send PDF file to team WhatsApp group with brief caption. If MR was created, follow up with MR link.
Pull this week's GSC data (clicks, impressions, average position) and GA4 organic sessions. Compare against previous week.
GSC APIGA4 API
2
Check Thresholds
Compare week-over-week changes against configured thresholds from penalty-monitor.config.json.
penalty-monitor.config.json
3
Penalty Detection
AI evaluates red flags:
๐ด Clicks drop โฅ 20%
๐ด Impressions drop โฅ 25%
๐ด Average position drops > 2 spots
4
Decision Branch
โ All Clear โ Telegram: "No penalty signals detected" with metric summary ๐จ Alert โ Telegram: Red flag details + auto-recommend pausing article generation pipeline
Telegram
โ๏ธ Weekly Newsletter
๐ Every Tuesday 09:00 WIB๐ค Email Blastโฑ ~2.5 min
1
Collect This Week's Articles
Read published-articles.json for articles from this week. Cross-check with sitemap for any missed. Check published-emails.json to never re-feature an article.
AI assembles newsletter from dokter POV (casual tone). Structure: greeting โ featured article (dark card) โ 2-3 more articles (green border cards) โ clinical tip box โ closing. CTA buttons link to articles.
AI HTML BuilderStyled HTML email
3
Generate Subject Line
Casual, engaging subject from dokter perspective with emoji. Example: "Pasien tanya scaling sakit nggak, Dok? ๐ฆท"
AI Copywriter
4
Publish Email Blast
POST to Umeds Email Blast API with status='publish' โ immediately queues and sends to all users.
api.umeds.id/email-blaststatus: publish
5
Report to Telegram
Subject line, articles featured, email blast ID, recipient count sent to Minhaj.
Telegram
๐ Weekly BI Report
๐ Every Monday 09:00 WIB๐ค WhatsApp Groupโฑ ~22 sec
1
Query MySQL Database
Python script connects to Umeds MySQL database. Runs team-specific queries for revenue, product performance, user churn, and conversion metrics.
MySQLweekly_report_teams.py
2
Generate Per-Team Sections
Build targeted insights for 6 teams: CEO, Tech, Marketing, Product Learning, Finance, Design Creative. Each section has relevant KPIs and actionable recommendations.
AI Insights
3
Generate PDF
Convert team-specific report into a polished PDF document.
BI_Team_Report.pdf
4
Send to WhatsApp Group
PDF file sent to team WhatsApp group with brief caption and date range.
WhatsApp API
๐ฅ 6.6 Flash Deal Campaign
๐ Jun 5 & Jun 7 (one-shot)๐ค WhatsApp Group๐ Auto-deletes after run
1
Cron Timer Fires
Pre-scheduled one-shot cron job triggers at exact time. Two emails: Heavy Reminder (Jun 5) and Last Call (Jun 7).
Cron schedulerdeleteAfterRun: true
2
Load Pre-built Email HTML
Read the pre-designed email template from ./emails/66-flash-deals-*.html with urgency-driven copy and flash deal pricing.
Email HTML template
3
Submit Email Blast
submit_email.mjs sends to Umeds API with status='publish' โ emails queued and sent immediately to all users.
submit_email.mjsEmail Blast API
4
Report to WhatsApp
Confirmation sent to team WhatsApp group. Cron job auto-deletes itself after successful run.
WhatsApp
๐ง Memory Dreaming System
๐ Every day 10:00 WIB๐ Silent (no delivery)โฑ ~50 sec
1
Scan Short-Term Memory
Read all daily memory files (memory/YYYY-MM-DD.md) from the past 30 days. Each contains conversation logs, decisions, and context snippets.
memory/*.md
2
Score & Filter Memories
Each memory entry is scored based on: recall frequency (โฅ3 times), semantic similarity score (โฅ0.8), unique query diversity (โฅ3 queries), and recency decay (14-day half-life).
AI ScoringminScore: 0.8
3
Promote to Long-Term Memory
Top 10 qualifying entries are appended to MEMORY.md โ Sera's persistent long-term memory. These survive across sessions and inform future decisions.