Automating LinkedIn Post Creation from Markdown Notes Using PowerShell


Weekend Project Spotlight: I built a PowerShell script that extracts content from my daily Markdown notes and generates LinkedIn posts automatically! This tool helps me transform my technical notes into engaging professional content without manual effort.
📌 Use Cases for Different Professionals
This script isn’t just for developers—it can be adapted for various professionals who:
Keep daily notes (e.g., journals, meeting summaries, project logs).
Want to share insights on LinkedIn without spending hours drafting posts.
Need to maintain consistency in posting without manual effort.
Who Can Benefit?
Developers & Engineers – Share learnings from debugging, new tech experiments, or project reflections.
Managers & Leaders – Turn meeting notes into leadership insights or team collaboration takeaways.
Consultants & Coaches – Convert client interactions into case studies (anonymized) or professional advice.
Content Creators – Repurpose notes into engaging posts without rewriting everything.
🛠 How the Script Works
1. Get-MdFilesContent
– Extracts Notes from Markdown Files
Input: A folder path and date range (e.g., last week’s notes).
Process:
Scans
.md
files in the given directory.Filters files based on date (filename must be in
YYYY-MM-DD
format).Combines content from matching files into a single string.
2. Generate-LinkedInPost
– Creates a Post Using AI
Input: The extracted notes.
Process:
Sends notes to a local AI model (
deepseek-r1:7b
via Ollama) with a structured prompt.Generates a well-formatted LinkedIn post with:
A compelling hook
Key insights (excluding sensitive info)
Actionable takeaways
A call-to-action (CTA)
3. Execution & Output
- The script prints the AI-generated post, ready to copy-paste into LinkedIn.
🚀 How to Implement This for Your Workflow
Step 1: Organize Your Notes
Store daily notes as
.md
files with filenames inYYYY-MM-DD.md
format.Example:
D:\Notes\DailyNotes\2025-03-22.md D:\Notes\DailyNotes\2025-03-23.md
Step 2: Set Up Ollama (Local AI)
Install Ollama.
Run:
ollama pull deepseek-r1:7b
Step 3: Run the Script
Modify the variables:
$NotePath = "Your\Notes\Folder"
$startDate = "2025-03-22"
$endDate = "2025-03-25"
Then execute:
.\GenerateLinkedInPost.ps1
The script will output a ready-to-use LinkedIn post!
🔥 Why This Is Useful
✅ Saves time – No more manual post drafting.
✅ Encourages consistency – Regular posting without extra effort.
✅ Turns notes into value – Shares insights without exposing sensitive details.
Try adapting this for your notes and let me know how it works for you! 🚀
#PowerShell #Automation #LinkedInTips #ProductivityHacks
Subscribe to my newsletter
Read articles from Anirudra Choudhury directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
