SSWConsulting / SSWConsulting/SSW.Website
🗞️ Newsletters - Automate the upload flow (use email tool's hosted URL)
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 14
- Forks
- 10
- Avg merge
- 13h 51m
- Merged PRs (30d)
- 38
Description
Background
The newsletter upload flow is still painful for marketing (Penny) three years after it was first flagged. Picking up the thread from a stack of prior issues:
- #626 — Newsletters - Upload file feature on TinaCMS (Gilles, May 2023, closed by Harry's #821)
- #712 — 📄🎥 Newsletters - How to upload? (Brady, Jul 2023, still OPEN; Harry recorded the demo video below)
- #821 — ✨Newsletters - File Upload on TinaCMS (Harry, shipped the Tina upload UI)
- #1070 — 🐛 Newsletter wont upload to Tina (Penny, still OPEN)
📺 Harry's demo video for Penny: https://youtu.be/lrgF3T7Y0Qs
📝 Full findings doc (in branch chore/pin-and-update-deps): _docs/NEWSLETTER_AUTOMATION_FINDINGS.md (will land in its own PR)
Adam's feedback on #712 already pointed at the right answer two years ago: "Now you would send it with MailChimp or Campaign Monitor or Sendgrid?" — yes, exactly that.
Current process
- Marketing edits an HTML template (hand-coded,
<!-- EDIT HERE -->markers) - Save as
_YYYY_MM__Title__.html(rigid underscore convention) - Upload into
public/images/newsletter-uploads/<YYYY>/ - Run
scripts/fix_newsletter_images.py(rewrites case-mismatched<img>paths) - Run
scripts/fix-newsletter-titles.py(needs Azure AI credentials to de-dupe<title>tags) - Open Tina
/admin→ add row tocontent/newsletters/_<YYYY>.json(month, file path, description) - Commit / PR / deploy
- Send the actual email via Dynamics 365 (Customer Insights – Journeys) — repo isn't even the source of truth for the sent email
Pain points
- Brittle filename convention; easy to break
content/newsletters/_2025.jsonline 31 has%2520(double-encoded space) from manual entry- Description drifts across three places (JSON / filename /
<title>) — Mar 2025 says "Why Rules are Cool" in JSON but the filename says "…The Secret to Smarter Teams" - Two Python scripts a non-dev must run locally; one needs Azure AI credentials
- No append helper —
_2025.jsonhas months in random order - HTML template authoring with
<!-- EDIT HERE -->markers is itself a friction point upstream - Tina upload was supposed to fix this (#821) but failed for Penny (#1070); the issue was never closed
Why all this exists
We're hosting a second copy of an email that's already authored, stored, and hosted by Dynamics 365. Every major email tool — Dynamics 365 Customer Insights, Mailchimp, Campaign Monitor, HubSpot, Brevo — produces a permanent public "view in browser" URL per campaign. Storing that URL in Tina (instead of a hand-crafted HTML file) collapses steps 1–6 above.
Recommended path
Path 1 — Use the email tool's archive URL (smallest, fastest):
- file: image upload (HTML, requires fix-up scripts)
+ archiveUrl: string (paste the "view in browser" URL after sending)
NewslettersTable renders <a href={archiveUrl} target="_blank"> per row. Existing newsletters stay as static files in /newsletter-uploads/; schema accepts both file and archiveUrl during migration.
- Cost: ~½ day dev work
- Friction per newsletter after: ~5 seconds (paste one URL)
- Blocker: confirm Dynamics produces a stable public archive URL per campaign
If marketing is open to migrating away from hand-coded HTML, Path 2 (move sending to Mailchimp's drag-and-drop editor, then Path 1) is the better long-term answer. Adam suggested this in 2023.
Cleanup to bundle into the same PR (whichever path)
- Fix the
%2520double-encoding bug in_2025.json(Feb entry) - Decide whether
descriptionis source-of-truth in JSON or derived from the HTML/campaign subject - Document the kept-or-killed status of
scripts/fix_newsletter_images.pyandscripts/fix-newsletter-titles.py - Close #712 and #1070 as resolved-by-this-issue (or roll their tasks in)
Open questions for Adam / marketing
- Confirm the email tool is Dynamics 365 Customer Insights – Journeys.
- Does each Dynamics campaign produce a public "view as web page" URL we can link to?
- Any policy reason the newsletter HTML must live on
ssw.com.aurather than the email tool's domain? (SEO: could mitigate with a redirectssw.com.au/newsletters/2025/07→ archive URL.) - Keep existing
/images/newsletter-uploads/...URLs live forever? (Yes by default — archive integrity.)
cc @adamcogan @PennyWalker
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the newsletter data in content/newsletters/_2025.json and the NewslettersTable rendering path, then review scripts/fix_newsletter_images.py and scripts/fix-newsletter-titles.py. Confirm with marketing whether Dynamics 365 provides a stable public archive URL before changing the schema. Done means new rows can use archiveUrl while existing file-based newsletters and their URLs continue to work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- html, nextjs, python
- Domain
- content, frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100