DEV Community

Jesse Chong
Jesse Chong

Posted on

2

๐Ÿš€ Cross-Posting Project Update: Automating Posts Across Medium, LinkedIn, and DEV.to

Repost because I accidentally deleted my first ever post!

๐ŸŒ Excited to Share My Latest Work!
Iโ€™m thrilled to give an update on a new tool Iโ€™ve been building, which automates cross-posting across Medium, LinkedIn, and DEV.to. This has been a fantastic learning journey, and although thereโ€™s still more to fine-tune, itโ€™s already operational! ๐ŸŽ‰

๐Ÿ› ๏ธ Technologies Used:
Backend: Node.js, Express
APIs:LinkedIn API, Medium API, DEV.to API, RSS Parser
Libraries: RSS-Parser, Axios

๐Ÿ” Project Overview:
The goal of this project is to streamline the content sharing process across multiple platforms, allowing me to post once and have the content automatically shared on LinkedIn, Medium, and DEV.to. This system converts HTML content to markdown, extracts images, and ensures the correct formatting across all platforms.

๐Ÿ—๏ธ Key Features:

Automated Cross-Posting: Posts made on Medium automatically get shared on LinkedIn and DEV.to (and vice versa).
HTML to Markdown Conversion: Ensures the content is formatted correctly for each platform, including image extraction.
Integration with APIs: Secure authentication using access tokens for LinkedIn, Medium, and DEV.to.
๐Ÿ’ก Challenges & Solutions:

Challenge 1: Working with multiple APIs and managing authentication tokens.
Solution: I separated the API interactions into different files and used environment variables to handle access tokens securely.

Challenge 2: Creating a Privacy Policy to comply with LinkedInโ€™s API requirements and obtain an access token.
Solution: I had to research and write a comprehensive privacy policy, outlining how data would be used, to meet LinkedInโ€™s developer guidelines.

Challenge 3: Converting HTML content to Markdown for posting on DEV.to and Medium.
Solution: I researched and used HTML-to-Markdown conversion libraries, and learned how to write regex for content parsing.

Challenge 4: Extracting images from HTML and embedding them correctly in the markdown.
Solution: I created a function that parses the HTML, finds image tags, and converts them into markdown-compatible image links.

๐Ÿš€ What I Learned:

Sharpen ability to integrate and work with multiple APIs efficiently.
The importance of organizing code by separating concerns (e.g., API handling, token management).
How to convert HTML to markdown and deal with content formatting across platforms.
Improved my regex skills, which helped with parsing HTML content.
๐ŸŒŸ Reflection

The earlier you organize your project structure the easier it is to continue working on it when you have to stop for a while.

There is a heck of a lot to learn in the tech field and I humbly welcome it.

๐Ÿ”— Check Out the repo: https://github.com/Jesse-Chong/Cross-post-server

Thank you for reading! Iโ€™d love to hear your thoughts.

APIs #Automation #WebDevelopment #NodeJS #CrossPosting #Regex #Markdown #ContentCreation #FullStackDevelopment #SoftwareEngineering #ProjectManagement

Original article on medium

Top comments (0)

๐Ÿ‘‹ Kindness is contagious

Please leave a โค๏ธ or a friendly comment on this post if you found it helpful!

Okay