๐Ÿค– Umeds AI Automation

End-to-end process flows for every automated task

Powered by Sera โ€” AI SEO Specialist

๐Ÿ“ Daily SEO Article

๐Ÿ• Every day 03:56 WIB ๐Ÿ“ค Telegram โฑ ~2.5 min
1
Gather Keyword Candidates
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.
keyword-research.json GSC API rss-trends.mjs Brave Search
2
Select Best Keyword
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.json umeds.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.7 gen.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 Writer HTML 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.id X-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.mjs 20 RSS feeds Google 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 Ranking news-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 Pro gen.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 Writer HTML output
5
Publish to News Category
POST to Umeds API under the News category. Article goes live for review.
api.umeds.id News 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 API GA4 API Service 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.mjs sitemap-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 pull GitLab 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 + push GitLab MR
5
Generate PDF Report
Markdown report with all metrics, low-CTR opportunities, and findings โ†’ converted to PDF via Puppeteer.
md-to-pdf.mjs audit-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.
WhatsApp API

๐Ÿšจ SEO Penalty Monitor

๐Ÿ• Mon / Wed / Fri 11:00 WIB ๐Ÿ“ค Telegram Alert โฑ ~2.5 min
1
Fetch Current Metrics
Pull this week's GSC data (clicks, impressions, average position) and GA4 organic sessions. Compare against previous week.
GSC API GA4 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.
published-articles.json published-emails.json sitemap.xml
2
Build HTML Newsletter
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 Builder Styled 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-blast status: 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.
MySQL weekly_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 scheduler deleteAfterRun: 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.mjs Email 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 Scoring minScore: 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.
MEMORY.md