OVES Poster AutoStream Skill¶
Automated generation of Omnivoltaic product marketing posters, from reading requests to final PDF delivery. The skill is an agentic workflow: a WorkBuddy agent reads structured requests, sources imagery, removes backgrounds, embeds into the company-standard template, exports PDF, and uploads the result — all without modifying the template.
Repository location:
skills/OVES-Poster-AutoStream/— SKILL.md, README.md,scripts/Requirement source: SharePoint List only (structured data). Teams channel messages are not a supported requirement source.
Data Sources¶
| Data type | Source | Notes |
|---|---|---|
| Requests | SharePoint List (AI request table) | Only source; structured fields |
| Images | Cloudinary (primary) + Teams channel (fallback) | First match wins |
| Template | SharePoint document library | Auto-downloaded on first use |
| Font | SharePoint document library | Auto-downloaded on first use |
Core Rules¶
- Template is read-only — never modify the template SVG's structure, dimensions, shapes, or colors. Only insert
<image>tags. - Blue diagonal band — the template has a dark-blue diagonal separator (y≈970–1040); images must not touch or cross it.
- Font — Montserrat (downloaded from SharePoint, DriveItem ID:
IQAw1dFyWzxESLutuDJNR-AkARDzKzPdy0OSemmJfMhCfYE). - Images must be background-removed — product images must go through rembg AI background removal and be embedded as transparent PNGs, never white-background originals.
- Naming convention — output as
region_product.pdf(e.g.,Tanzania_HS2506-Fan.pdf).
Template Specification¶
- File —
Poster_Basic_Template.svg(downloaded from SharePoint, DriveItem ID:IQCrdt7AYcMlTZeUhZiP59YPAZXoPSfKyU79AhFeWCRZoT4) - Size — 900 mm × 1800 mm (vertical A3)
- Coordinate system — SVG units in mm,
viewBox="0 0 900 1800" - Layout zones:
- Upper zone (light cyan-blue background): y=0–970, product image
- Middle diagonal band (dark blue): y≈970–1040, must not be overlapped
- Lower zone (white background): y=1040–1600, second product/scene image
- Footer (dark): y≈1600–1800
First-Use Auto-Download¶
When assets/ is missing either file, the agent must download it from SharePoint automatically:
| File | Path | Check |
|---|---|---|
| Template SVG | assets/Poster_Basic_Template.svg |
missing or < 100 KB |
| Montserrat font | assets/Montserrat-Regular.ttf |
missing or < 100 KB |
Download via mcp__Microsoft365__download-file with driveId: "b!h0bvZ5yy7Eiu486mA7GNUt0HrdbJCWhFhXoHDXC4WSE3cT82Ec9aSoQzPkiaPj40" and the item IDs above. Verify both files exist and exceed 100 KB; on failure, ask the user to download manually from SharePoint → OVESMarketing → 共享文档/Marketing/海报模板 and 字体.
End-to-End Workflow¶
[First use] check assets/ directory
↓ (missing files)
auto-download template + font from SharePoint
↓
read pending requests from SharePoint AI request table
↓
filter: only process Type == "图片 Image"
↓
search Cloudinary / Teams for product image + scene image
↓
download images locally
↓
rembg AI background removal (transparent PNG)
↓
embed into template (base64, template untouched)
↓
Inkscape export PDF (300 DPI)
↓
upload PDF to SharePoint target folder
↓
update SharePoint request status to "已完成"
SharePoint Configuration¶
AI Request Table (List)¶
- Site ID —
oves159.sharepoint.com,67ef4687-b29c-48ec-aee3-cea603b18d52,d6ad07dd-09c9-4568-857a-070d70b85921 - List ID —
0db27186-7246-4667-b3aa-f6d994cf464b - Read tool —
mcp__Microsoft365__list-sharepoint-site-list-items - Process only — items where
fields.Type == "图片 Image"and status is "待处理"
Key Fields¶
| Field | Description | Example |
|---|---|---|
ID |
Request number | 43 |
fields.Product |
Product name | HS2506-SPSF-16 |
fields.Region |
Target market | Tanzania |
fields.Type |
Request type | only "图片 Image" processed |
fields.Status |
Status | 待处理 / 已完成 |
Upload Target Folder¶
- URL —
https://oves159.sharepoint.com/:f:/s/OVESMarketing/IgAaXJoJjkzmSZny-8Z5FutWASoqGu1guzMPWGOGk9qbwfI?e=SbHuJv - Naming —
region_product.pdf(lowercase, hyphen-separated) - Upload tool —
mcp__Microsoft365__upload-file
Image Sourcing¶
Cloudinary Search¶
Tool: mcp__cloudinary-asset-mgmt__search-assets
Params: {"request": {"expression": "public_id:*HS2506*", "max_results": 10}}
Product image public_id patterns:
- Product image — OVES-PRODUCTS/OFF-GRID/ovCAMP SERIES/Fan/HS2506-SPSF-16-V2
- Scene image — numbered images (e.g., (5)) in the same product directory
Teams Marketing Media Channel¶
If Cloudinary finds nothing, search the Teams channel via mcp__Microsoft365__list-team-channels (Team: OVES Marketing, Channel: Media / 产品图片).
Product Page Scrape¶
Last resort — fetch from the corporate product page: https://www.omnivoltaic.com/off-grid/products/{product-id}/ via WebFetch.
AI Background Removal (rembg)¶
- rembg is installed on system Python 3.11 (
C:\Program Files\Python311\python.exe). The managed Python (3.13) does not have rembg — always use the system Python. - Script:
scripts/remove_bg.py— usagepython remove_bg.py <input_image> [output_image]. - Output: PNG with transparency; the U2-Net model correctly distinguishes white products from white backgrounds.
- If rembg is missing:
"C:\Program Files\Python311\python.exe" -m pip install rembg.
Template Embedding (Core Script)¶
Never modify the template SVG structure. The correct method:
1. Read the template SVG as text.
2. Base64-encode the images.
3. Insert <image> tags before </svg>.
4. Save as a new SVG.
scripts/embed_poster.py also injects the Montserrat font as a base64 @font-face after the <svg> tag, adds text elements (product name, features, contact), and runs a layout validation that rejects placements overlapping the blue band.
Default Image Coordinates (mm)¶
| Image | x | y | width | height | Notes |
|---|---|---|---|---|---|
| Upper (product) | 150 | 280 | 600 | 600 | bottom edge y=880, safe |
| Lower (product/scene) | 150 | 1150 | 600 | 500 | top edge y=1150, safe |
Key constraints: - Upper image bottom edge ≤ y=900 (clear of blue line at y=970) - Lower image top edge ≥ y=1100 (clear of blue line at y=1040) - Adjust coordinates per actual image aspect ratio
Default Text Styles¶
| Element | x | y | size | color | anchor |
|---|---|---|---|---|---|
| Product name | 450 (centered) | 870 | 48 | #00A0E9 (OVES blue) |
middle, bold |
| Features | 100 | 1200 | 24 | #333333 |
start, line height 36 |
| Contact | 450 | 1720 | 20 | #FFFFFF (footer) |
middle |
PDF Export¶
inkscape "output.svg" \
--export-type=pdf \
--export-filename="Tanzania_HS2506-Fan.pdf" \
--export-dpi=300
Notes:
- Inkscape does not support feDropShadow (SVG 2); use traditional filters or no shadow.
- Inspect layout in Inkscape GUI before export; confirm images do not touch the blue line.
Upload and Status Update¶
mcp__Microsoft365__upload-file(
site_id="...",
drive_id="b!h0bvZ5yy7Eiu486mA7GNUt0HrdbJCWhFhXoHDXC4WSE3cT82Ec9aSoQzPkiaPj40",
target_folder_path="/Marketing/Posters",
file_path="Tanzania_HS2506-Fan.pdf",
file_name="Tanzania_HS2506-Fan.pdf"
)
After upload, update the request item status to "已完成" via mcp__Microsoft365__update-sharepoint-list-item.
Batch Processing¶
scripts/batch_process.py processes all "待处理" + "图片 Image" requests in the SharePoint request table. CLI: python scripts/batch_process.py --item-id <ID> or --all. The script checks assets, then orchestrates background removal → template embedding → PDF export per item; image search and SharePoint upload/status steps are performed by the WorkBuddy agent via MCP tools.
Scripts Reference¶
| Script | Purpose | Key usage |
|---|---|---|
scripts/remove_bg.py |
rembg AI background removal | remove_bg.py <input> [output]; uses system Python 3.11 |
scripts/embed_poster.py |
Embed images + text into template (read-only) | embed_poster.py --template <svg> --product-img <img> --output <svg> [--scene-img] [--product-name] [--feature]... [--contact] [--font] [--coords] [--text-styles]; validates layout vs blue band |
scripts/batch_process.py |
Batch orchestration for request table | batch_process.py --item-id 43 / --all |
Troubleshooting¶
1. Image overlaps the blue diagonal band¶
Cause: wrong coordinates, e.g., using 2552×3332 instead of 900×1800. Fix: always use mm units; confirm upper bottom edge ≤ 900 and lower top edge ≥ 1100.
2. rembg removes white product parts¶
Cause: not expected — rembg's U2-Net correctly separates white products from white backgrounds. If it actually happens, check input quality (blur, low contrast).
3. Template structure accidentally modified¶
Fix: only use read → base64 → insert <image>; never edit the template's original content.
4. Inkscape export fails¶
Fix: avoid feDropShadow (use feGaussianBlur), validate the SVG is well-formed, simplify complex filters.
5. Cloudinary search finds no images¶
Fix: wildcard search public_id:*HS2506*; fall back to Teams Marketing Media channel; scrape the product page.
Version History¶
| Version | Date | Change |
|---|---|---|
| 1.0 | 2026-06-23 | Initial version (outdated) |
| 2.0 | 2026-06-24 | Full rewrite: corrected coordinate system, added rembg background removal, SharePoint integration, correct layout rules |