During the last year I used a tool to automatically post to social media. Only there were 2 problems with this tool. So I decided to use Notion and N8N to build my own automation.
Important points
- Don’t use a tool if it is not helping you.
- Build your own tool if you can.
- Automate the task you do the most often.
The goal
For me it is important that it can post as easy as possible to multiple social media platforms from one place. I mainly want to focus on X and TikTok but also want to reuse this content on Instagram, Facebook and Threads. Notion is my favourite tools to store all sorts of information. So I wanted to create and publish my posts from there. Also I wanted to avoid paying for a service to that post for me when I can just build my own tool. I have a self hosted instance of N8N so that could be used as a good starting point.
Pains
Not having a single source of truth
The first problem was that I could not write and publish my post from the tool I use the most: Notion. Each time I had an idea I needed to login to the webapp of this tool. While I got Notion open all day and even have the app on my phone.
No option to post to TikTok
The second problem wat that the tool could only made normal posts and not posts like reals or stories. Also was I not possible to post to TikTok. This platform can help me grow my apps like BookBinder.
Update to external tool
The third problem what that the tool decided to rebuild the platform with a more AI way of creating posts and dropped the ability to automatically post to the social media platforms. This was not something I could use. I wanted to create my own posts and use AI to improve the writing or help me come up with ideas.
Creating the tool
1: Mapping out the features
I started with mapping out how the tool should look like. And I created the Notion database with the properties needed. Because I wanted to have one table with all posts I added a select for the platform and account to post to. Also I wanted to plan the posts ahead, for this I added a date property.
Because I wanted to have a clear overview about when posts will be published and if that will occur regularly I also created a calendar view of my posts table.
2: Implementing the connection with each external tool
The easiest connection to make was with Notion. In there developer portal you must create a new app and copy and paste the credentials over to N8N. Now I had the data it was time to figure out how to send it to the different platforms.
Facebook, Instagram and Threads share the same API with a few differences for each platform. To use it all you have to do was create an app and active the correct permissions. Using the graph API node in N8N a new post could be made. Adding an image or video to the post was just giving the public URL and the API will do the rest.
Posting to X on the other hand is simple as long you don’t want to include images. And I definitely wanted to include images. Publishing images requires at least three nodes with communication to the API alone. While the other platforms wanted a URL for the image, X requested the image in binary. But before sending the binary you must start a upload with an init request. In this request you tell X how many bytes you will send over. And after you send all those bytes you need to call the finalise so that X will store that image until you need it for your post.
At this moment I am not yet able to publish to TikTok because they did not yet gave me the developer credentials for the public API. I only have the test API which does not post to a real account.
3: Testing and improving the automation
After implementing the connection with all the social media platforms it was time to test and see what goes well and what needed to be improved. After 2 weeks of testing and improving I can now publish my posts to Facebook, Instagram, Threads and X using the automation.
The results
The result is a Notion table and a N8N pipeline that automatically publishes my posts. From now on I can write my posts in Notion and N8N will make sure the post will be published to the correct platform. This makes it really easy to plan my marketing ahead.
Bonus: More inspiration came
After using and testing this social media posting automation I decided to do the same with my blog. I don’t like writing my blog in WordPress on desktop. On my iPhone it was even worse when I quickly want to type out some content. So I decided to create a second automation in N8N to fill my blog with Notion pages. I ask AI to create a script that parses the Notion blocks to Gutenberg blocks. This post you are reading is the first post completely written in Notion and automatically published using N8N.