Mar 20, 2025

In today’s digital landscape, maintaining a consistent online presence is crucial for businesses looking to stay competitive. However, the demands of creating, scheduling, and posting content across multiple platforms can quickly become overwhelming, especially for business owners and executives who already have numerous responsibilities. In a recent OpenAI Application Explorers meetup, Godfrey Nolan, President at RIIS, demonstrated how ChatGPT can be used to help automate these once attention draining tasks.
As usual, you can follow along with the session video or read the tutorial below.
A Look Into RIIS Marketing Cycle
If you’ve been following the RIIS blog, YouTube, LinkedIn, or OpenAI Applications Explorers Meetup group, then you will have noticed all of those platforms cross-referencing each other. This is achieved in many ways through utilizing LLMs to in part generate and transform content. This very blog post is partially generated by AI, and we even wrote a post on how we do that.
This tutorial serves as a spiritual sequel, demonstrating our content workflow. You'll learn how we take a Meetup idea, generate content for it, post it to Meetup, and then create promotional posts for LinkedIn. Additionally, when we publish articles like this one on the RIIS blog, we automatically generate new social media posts to promote the article, creating an integrated content ecosystem.
The RIIS Marketing Schedule
Our marketing automation strategy follows a structured weekly schedule designed to maintain consistent engagement:
Monday: Post Meetup content to personal LinkedIn
Tuesday: Post Meetup content to company LinkedIn
Wednesday: Ad hoc posts (events, announcements, etc.)
Thursday: Post blog content to personal LinkedIn
Friday: Post blog content to the company's LinkedIn
This schedule ensures regular content distribution while still leaving room for spontaneous or event-based posts. We typically host two meetups per month—one focused on OpenAI and another on drone development. This creates a content ecosystem where each meetup ultimately produces two blog posts per month.
It may seem out of order, but first, we are going to start with automating the blog posts and then show you how to automate the Meetup promotional posts.
Automating Blog Posts to LinkedIn
The first automation workflow Nolan demonstrates is taking blog posts from the company website (riis.com) and posting them to LinkedIn. This process requires several key components:
1. Accessing the Blog’s RSS Feed
Most blogging platforms offer RSS (Really Simple Syndication) feeds, which are essential for this automation. “Depending on your platform, that’s usually just plugins,” Nolan explains. WordPress users can utilize an RSS plugin, while Framer (the platform RIIS uses) offers a similar SaaS plugin.
The RSS feed provides structured data including post titles, links, descriptions, and images—all of which are needed for creating LinkedIn posts.
2. Parsing the RSS Feed
To extract the necessary information from the RSS feed, Nolan uses Python with the feedparser library. This allows him to pull the title, link, and image URL from the most recent blog post:
3. Generating the LinkedIn Post Content with ChatGPT
With the blog information extracted, the next step is using OpenAI’s ChatGPT to create a compelling LinkedIn post:
The system prompt can be enhanced to include examples of past posts, which helps train ChatGPT to better match the desired writing style. This technique allows the AI to more accurately replicate the voice and tone of previous content, creating consistency across posts.
4. Authenticating with LinkedIn
Before posting to LinkedIn, you need to set up authentication. This involves creating an app on LinkedIn’s developer platform (developer.linkedin.com) and obtaining an access token.
For companies, Nolan explains that you need to register an app, provide a logo and privacy policy, and get approval from the company page owner. You’ll also need to add several products to your LinkedIn app:
Sign In with LinkedIn using OpenID Connect
Advertising API
Share API
After setting up the app, you can generate an access token through LinkedIn’s OAuth tools.
Setting up Authentication
First, we need to set up authentication with LinkedIn's API.
There are only a few things that need to be noted here. The ln_oauth
module handles token generation and renewal, while the config is where you will store your oAuth credentials from before.
Getting Organization Information
When posting to a company page, you must identify the organization as the post author. This requires retrieving the organization URN:
This function calls LinkedIn's organizationAcls
endpoint, which returns information about the organizations you have access to. We extract the organization URN from the response, which will be used as the "author" of our post.
Uploading Images and Creating Posts
Next, we are going to use a dedicated function that handles both the image upload process and post-creation.
Here's what's happening in this first part:
We register an upload with LinkedIn's assets API, specifying:
The organization as the owner (not a personal profile)
The recipe type as "feedshare-image" (for posting images to the feed)
A synchronous upload mechanism for immediate processing
LinkedIn responds with an upload URL and an asset URN that we'll use later.
In this section, we are taking the image file in binary mode, sending the binary data to the upload URL provided by LinkedIn, and doing a small error check. If you have ever uploaded an image file to AWS, you are probably familiar with this binary upload method.
Okay, we’re moving along piecing things together, now we need to start composing the post with all this data collected:
Now, we create the actual LinkedIn post by specifying the organization as the author, setting the post to be published immediately, including the ChatGPT-generated text as the post content, referencing the uploaded image asset, and setting the post visibility to public. This completes the process of creating a company post with both text and visual content.
Executing the Process
The final step is to read the ChatGPT-generated post and execute the function.
We read the post text from the file, then call our function with the image path and the post text.
If everything executes as intended, you should have a fresh new LinkedIn post in your feed.

Automating Meetup.com to LinkedIn
The Meetup workflow adds a few more layers, taking event information from Meetup.com and posting it to LinkedIn. This workflow follows similar steps to the blog-to-LinkedIn process but requires different API interactions.
1. Authenticating with Meetup.com
To authenticate with Meetup.com, you need to:
Pay for a Pro version of Meetup.com
Create OAuth credentials in your Meetup.com settings
Follow the OAuth flow to get an access token
If you are successful you should have a Key, a Secret, and a Redirect URL. The Redirect URL’s callback is what is going to give us our access token. This process is more cumbersome than you may be used to. The code below will help you retrieve the access token.
2. Querying Meetup.com for our latest meeting info
Once you have your access token, you can use Meetup.com's GraphQL API to retrieve information about your upcoming events. The implementation follows these steps:
This code queries the Meetup GraphQL API for information about the most recent upcoming event from the "practical-chatgpt-api-programming" group. The query is structured to retrieve detailed information about the event, including its title, URL, date/time, and associated images.
Once we have the response, we need to parse it into a usable format:
This parsing function extracts key information from the API response and formats it for use:
Group name and event title
The event's short URL for sharing
Date and time formatted in a user-friendly way (e.g., "March 5, at 7 pm")
Image information, including base URLs and IDs
Next, we prepare this data for ChatGPT and download the event image:
This section constructs our prompt for ChatGPT with the event details for additional context., then it downloads the event image by combining the base URL and image ID. The image is saved as "image.png" for later use when posting to LinkedIn.
With the event information collected and the image downloaded, we're ready to pass this information to ChatGPT to generate the LinkedIn post:
This code uses OpenAI's API to generate a LinkedIn post based on the Meetup event information. It sets up a system prompt like in our previous flow to act as a marketing assistant and provides the event details in the user message. Finally, it saves the generated post to a file named "linkedin_post.txt" with UTF-8 encoding to handle special characters.
4. Posting to the Company LinkedIn Page
Similarly to before, create a new app on LinkedIn and retrieve your oAuth token. Reuse the code in section 5 of the RSS to LinkedIn flow to make your API call, but update the config variables so they go to the new app you made for the Meetup to LinkedIn flow rather than the old one. If you’ve done everything correctly, you should see something like this in your feed!

Automating the Process with Cron Jobs
Once the automation scripts are working properly, it's recommended to deploy them as cron jobs to run automatically on schedule. Using a hosting service like render.com, which costs about $10 per month, provides a convenient way to host these scripts and set up cron schedules.

AI tools can help create the cron expressions needed. For example, asking an AI to "write me the cron expression for 11 a.m. Monday" yields the necessary configuration without needing to remember the syntax.
For each scheduled post in a weekly routine, it's best to set up separate cron jobs to execute the appropriate script. The requirements.txt file should include all necessary dependencies like feedparser, requests, and openai to ensure the automation runs smoothly.
When first implementing this system, a semi-manual approach where content is reviewed before going live is recommended. gradually transitioning to fully automated posting once confident in the quality allows the system to generate messages and post to LinkedIn independently. This graduated approach helps ensure the content matches the intended voice and quality standards.
Conclusion
Congratulations! You've now learned how to build a powerful marketing automation system that can significantly reduce the time and effort needed to maintain your social media presence. Through this tutorial, you've gained valuable skills in setting up RSS feed automation, working with LinkedIn and Meetup APIs, using ChatGPT to generate engaging content, processing data from multiple sources, handling images for social posts, and scheduling automation with cron jobs. This system creates a continuous flow of content that cross-promotes your various platforms while maintaining a consistent voice. As you continue to refine your approach, consider experimenting with different prompts for ChatGPT to find the perfect tone for your audience, and remember even if you’re automating, never lose that human touch and take the extra time you save to connect with your audience!
Additional Resources
https://www.riis.com/blog/turn-your-videos-into-articles-with-openai-and-langchain
https://learn.microsoft.com/en-us/linkedin/compliance/integrations/shares/ugc-post-api