How to perform certain action when a post is created in Strapi CMS?

Sounds like you need a webhook to be triggered and make a POST request to Medium when something changes, read more here: Backend customization - Strapi Developer Documentation