Need Advice on Making an Automation
I'm planning to build a white-label AI social media publishing system for my agency clients, and I'd love some advice from people who've already built something similar.
The idea
I already build websites and run Google Ads/Meta Ads for local businesses. Most of my clients also post daily on Instagram, Facebook, TikTok, and sometimes LinkedIn. Right now, they manually upload the same photos/videos and captions to every platform, which takes a lot of time.
I want to build a simple web app where the client only needs to:
  • Upload photos or videos
  • Write a caption (or let AI improve/generate it)
  • Select the platforms
  • Click Publish
Everything else should happen automatically in the background using n8n.
Planned architecture
Frontend (Lovable / Next.js / Replit)
Webhook to n8n
OpenAI (caption enhancement, hashtags, CTA)
Publish to selected social platforms
Save logs to database
Return success to the frontend
The client never sees n8n—they only interact with a clean dashboard.
My biggest questions
  1. What's the best way to let clients connect their social media accounts?
  • Instagram
  • Facebook
  • TikTok
  • LinkedIn
  • X
  • Google Business Profile
  • How does the OAuth flow usually work for a SaaS like this?
  • Where should I securely store access tokens and refresh tokens?
  • Does n8n handle token refresh automatically, or do I need to build that logic myself?
  • Would you recommend using n8n as the backend for production, or would you put another backend (Node.js, Supabase Edge Functions, etc.) between the frontend and n8n?
  • For agencies serving multiple clients, what's the best architecture for keeping each client's credentials and posts isolated?
If you've built a similar social media publishing tool or SaaS, I'd really appreciate hearing how you structured it and any lessons you learned along the way.
Thanks in advance!
6
4 comments
Sahid Akhtar
5
Need Advice on Making an Automation
AI Automation Agency Hub
skool.com/learn-ai
Learn and become genuinely proficient in AI to get paid for it. From the creators of the AI Automation Agency model.
Leaderboard (30-day)
Powered by