
Automating Instagram Posts with Puppeteer and Node.js
Sometimes the official API isn't enough. Warning: This can get your account shadowed. Go slow.
The Logic
- Launch Chrome (Headless).
- Navigate to
instagram.com. - Inject cookies (don't log in every time).
- Click the "New Post" button.
Mobile Emulation
Instagram Web doesn't let you post from Desktop? Trick it.
await page.emulate(puppeteer.devices['iPhone 12']);
Content Creation
Where do you get the content? Use InstaDoodle to generate the images/videos, then this script to upload them.