Python Tutorial: Build a Social Share Scheduler for LinkedIn with Django and Inngest

CodingEntrepreneurs • July 24, 2025
Video Thumbnail
CodingEntrepreneurs Logo

CodingEntrepreneurs

@codingentrepreneurs

About

Learn, Build, and Earn. Coding Entrepreneurs is here to help you learn the skills you need to build the projects you want. Learn by doing everything we do step-by-step. Practical and hands-on. Let's do this. 💽 Code: https://github.com/codingforentrepreneurs 🚀 Enroll. Learn to code. Launch your project: https://cfe.sh/enroll 🚀

Video Description

🚀 Start using Inngest for free right now: https://innge.st/yt-CE-1 Share Posts on LinkedIn through Python and Django is a very easy process. Get some API keys and send an HTTP POST Request. What's not so easy, is reliably scheduling those posts for a later date. What's more, setting up a system that is ready to share not just on LinkedIn but any other social platform that has an API to do so. So we need to solve two primary things: ‣ OAuth - Connecting LinkedIn users to our Django users ‣ Scheduling/Offloading tasks - Using just Django (thanks to Inngest), to run our tasks later The OAuth process is this: ‣ We create an "App" on LinkedIn (or Facebook or X or Discord or whatever) ‣ We connect that "LinkedIn App" to our Python code via API Keys through Environment Variables ‣ Django & Django AllAuth are configured with those keys ‣ User logs in clicking the "Login with LinkedIn" button ‣ Django and LinkedIn talk to ensure all permissions are valid ‣ LinkedIn shares an Access Token to Django, Django stores it ‣ Through Django, our code can now post to LinkedIn via the LinkedIn API, our LinkedIn App, a User's Access Token, and an HTTP Request. The first part of this course is dedicated to enabling Django to be connected to LinkedIn users to login and share posts. The second part of this course is dedicated to building a scheduling system via Inngest. Thanks to Inngest for partnering with us on this course. Show them some love by signing up right now https://innge.st/yt-CE-1 (it's free) ⦿ Course Code: https://github.com/codingforentrepreneurs/Social-Share-Scheduler ⦿ LinkedIn Post from the course (actual post from the demo): https://www.linkedin.com/posts/justinmitchel_hello-world-this-is-a-demo-from-my-new-course-activity-7353159792107905024-tl5_?utm_source=share&utm_medium=member_desktop&rcm=ACoAAAC3efIBKP1EwXh4DtLky2-WBW3wn1xtoD8 📺 Chapters 00:00:00 Welcome 00:02:17 Demo 00:06:00 Create a Python Virtual Environment 00:10:19 Create the Django Project 00:14:32 Creating a Django Admin User 00:18:58 Django AllAuth Quickstart Setup 00:25:55 LinkedIn with Django AllAuth & OpenID Connect 00:32:36 Redirect URL & Login with LinkedIn 00:37:40 Store User Access Tokens with Django AllAuth 00:40:11 Django with Interactive Python 00:45:46 Reverse Lookup for User Token 00:52:08 Share to LinkedIn with Python Part 1 01:00:23 Share to LinkedIn with Python Part 2 01:05:21 Share to LinkedIn with Python Part 3 01:07:06 Python Helper Function for Linkedin Share 01:18:11 Store Social Posts in Database through Django 01:26:34 Using the Django Model Save Method 01:32:21 Human Readable Model Error Messages 01:37:26 Ensure User has LinkedIn OAuth Connected 01:43:05 Share to LinkedIn via Database Entry 01:44:52 Improved Validation on the Post Model 01:50:41 Prototyping User Features in the Django Admin 02:03:42 Inngest & Django 02:07:25 Inngest Development Server with Docker 02:11:32 Configure Inngest with Django 02:21:44 Invoke Django-based Inngest Function in Jupyter 02:28:03 Trigger Inngest Function via Django Model Save 02:34:30 Fields to Schedule Sharing 02:39:43 Prevent Duplicate Share Events 02:43:20 Mock Post to LinkedIn via Inngest Function 02:51:51 Schedule Inngest Events 02:57:08 Scheduling via Inngest Function Step Sleep 03:04:12 Update QuerySet to Prevent Recursive Saving 03:08:04 Background Jobs with Inngest Functions 03:14:25 Timezone as a Workflow Node 03:18:50 Using Inngest Cloud With Django 03:27:58 Thank you and next steps

Boost Your Coding Setup

AI-recommended products based on this video

Loading...
Indestructibles: Twinkle, Twinkle, Little Star: Chew Proof · Rip Proof · Nontoxic · 100% Washable (Book for Babies, Newborn Books, Safe to Chew)

Indestructibles: Twinkle, Twinkle, Little Star: Chew Proof · Rip Proof · Nontoxic · 100% Washable (Book for Babies, Newborn Books, Safe to Chew)

(1,913)
$1.84$1.60
FREE delivery Nov 29 - Dec 5 on $35 of items shipped by Amazon
Loading...
Indestructibles: Hello, Farm!: Chew Proof · Rip Proof · Nontoxic · 100% Washable (Book for Babies, Newborn Books, Safe to Chew)

Indestructibles: Hello, Farm!: Chew Proof · Rip Proof · Nontoxic · 100% Washable (Book for Babies, Newborn Books, Safe to Chew)

(9,722)
$3.10$1.00
FREE delivery Sat, Nov 29 on $35 of items shipped by Amazon
Loading...
Book Stand for Reading, Adjustable Book Holder with 360° Rotating Bases, Foldable Designs, and Elastic Clips, Multifunctional Display Stand for Recipe, Cookbooks, Magazines, Tablets, Laptops

Book Stand for Reading, Adjustable Book Holder with 360° Rotating Bases, Foldable Designs, and Elastic Clips, Multifunctional Display Stand for Recipe, Cookbooks, Magazines, Tablets, Laptops

(388)
22.39
PrimeFREE delivery Saturday, June 14 on orders shipped by Amazon over $35
2K+ bought in past month
Loading...
Megoo 14" Laptop Sleeve Case for Surface Laptop 7/6/5/4/Studio, Surface Book, Samsung Galaxy Tab S9/S8, Shockproof Water-Resistant Carry Pouch Bag for 13.5"-14.6" Notebook Computers(Light Gray)

Megoo 14" Laptop Sleeve Case for Surface Laptop 7/6/5/4/Studio, Surface Book, Samsung Galaxy Tab S9/S8, Shockproof Water-Resistant Carry Pouch Bag for 13.5"-14.6" Notebook Computers(Light Gray)

(1)
11.89
PrimeFREE delivery Saturday, June 14 on orders shipped by Amazon over $35
Loading...
UGREEN USB C to USB Hub with 4 USB 3.0, Powered USB C Splitter for Laptop, MacBook Pro, Mac mini M4, iMac, iPad Pro, Chromebook, Dell XPS, Galaxy S23, and More, 0.5FT

UGREEN USB C to USB Hub with 4 USB 3.0, Powered USB C Splitter for Laptop, MacBook Pro, Mac mini M4, iMac, iPad Pro, Chromebook, Dell XPS, Galaxy S23, and More, 0.5FT

(12,070)
9.99
PrimeFREE delivery Saturday, June 14 on orders shipped by Amazon over $35
400+ bought in past month
Loading...
Lenovo V15 Laptop | 15.6" FHD Anti-Glare Display | AMD Ryzen 7 7730U | 40GB RAM | 1TB PCIe SSD | HDMI | Type-C | Webcam | Wi-Fi | THUNDEROBOT Wireless Ergonomic Mouse | Windows 11 Pro | Black

Lenovo V15 Laptop | 15.6" FHD Anti-Glare Display | AMD Ryzen 7 7730U | 40GB RAM | 1TB PCIe SSD | HDMI | Type-C | Webcam | Wi-Fi | THUNDEROBOT Wireless Ergonomic Mouse | Windows 11 Pro | Black

(26)
$649.00$636.02
FREE delivery Jun 18 - 23
Loading...
acer Nitro V 15 Gaming Laptop, Intel i9-13900H Up to 5.4GHz, GeForce RTX 4060, 15.6" 144 Hz IPS Display, 64 GB DDR5, 4 TB SSD, Wi-Fi 6, Backlit Keyboard, Windows 11 Pro, Gaming Mouse, 256GB UFD

acer Nitro V 15 Gaming Laptop, Intel i9-13900H Up to 5.4GHz, GeForce RTX 4060, 15.6" 144 Hz IPS Display, 64 GB DDR5, 4 TB SSD, Wi-Fi 6, Backlit Keyboard, Windows 11 Pro, Gaming Mouse, 256GB UFD

(2,753)
$1,899.99
FREE delivery Tomorrow, Jun 12Arrives before Father's Day
Loading...
Anker Power Bank(PowerCore 10K),Compact Travel-Ready 10,000mAh Battery Pack with PowerIQ Charging Technology,5V/3A High-Speed Charging for iPhone,iPad,and More (USB-C Input and Output(Black),1pack) ClimatePartner certified

Anker Power Bank(PowerCore 10K),Compact Travel-Ready 10,000mAh Battery Pack with PowerIQ Charging Technology,5V/3A High-Speed Charging for iPhone,iPad,and More (USB-C Input and Output(Black),1pack) ClimatePartner certified

(109,961)
$17.99$17.81
FREE delivery Fri, Aug 8 on $35 of items shipped by Amazon
10K+ bought in past month
Loading...
MESSAGENES Customizable Facebook QR NFC Sticker | Boost Followers | Reusable QR | 1 Unit | Premium Quality | Ideal for Business, Showcase, Store, Wall or Window

MESSAGENES Customizable Facebook QR NFC Sticker | Boost Followers | Reusable QR | 1 Unit | Premium Quality | Ideal for Business, Showcase, Store, Wall or Window

(71)
$11.12
FREE delivery Fri, Oct 10 on $35 of items shipped by Amazon
Loading...
MESSAGENES Customizable Facebook QR NFC Sticker | Boost Followers | Reusable QR | 1 Rectangular Unit | Premium Quality | Ideal for Business, Showcase, Store, Wall or Window

MESSAGENES Customizable Facebook QR NFC Sticker | Boost Followers | Reusable QR | 1 Rectangular Unit | Premium Quality | Ideal for Business, Showcase, Store, Wall or Window

(22)
$12.72
FREE delivery Fri, Oct 10 on $35 of items shipped by Amazon