Have you ever wanted to schedule Twitter and LinkedIn posts without using a third-party solution? You are halfway there if you already have a Microsoft 365 developer tenant! Follow along as we quickly build a solution for this with low-code tooling in the Power Platform.
My blog is based on GatsbyJS, where I write the blog posts in markdown in Visual Studio Code. I keep the code in a repository on GitHub, and I’m using GitHub actions for CI/CD. I recently added the possibility of scheduling my blog posts based on the blog post’s date in the markdown front matter.
This got me thinking that I might want an easy solution to schedule a Tweet and a LinkedIn post for the time when the blog post is scheduled to be published.
I went with the simplest possible solution that I could come up with, using a SharePoint list and a Power Automate Flow, and I also added a PowerApps Canvas app to use on my phone.
I started by creating the list in SharePoint and just added some columns from the UI. Who has time for Content Types, right?
I then created the Flow from the existing list.
After a new item is created in the SharePoint list and the Flow is triggered, we use the date and time value from the Scheduled column, and we Delay until that specific date and time. I will never schedule so far ahead in time that there are any chances of the Flow timing out.
After we have waited the necessary amount of time, we use the Get item action to get an up-to-date version of the item, just in case we changed the title, text, URL or hashtags.
The Switch case checks the Media value and routes us to a appropriate case. We then create the social media post(s) using the values from Title, Text, Hashtags and URL.
Finally, we update the list item to Posted as Yes.
IMPORTANT! Just understand that there is no error handling at all in this Flow. You should probably look into making it more robust.
I then scaffolded a Power App from the list; this gives you CRUD capabilities from the get-go. I made some minor Tweaks regarding colors and removed Posted and Attachments from the form. Finally, I saved the app and published it.
What’s left for me is to check-in and push this blog post to my GitHub repository, and then the blog post scheduling sorts the rest.
By now, you should have gotten some ideas on how to create a simple scheduling solution for your social media posts. How would you have done it?
And when you read this, we have waited long enough, and the Flow has already run and created the social media posts. The timeline is very confusing here. Anyways…
Thanks for reading