Nabil Samari logoNabil Samari logo
  • Home
  • About
  • Blog
  • Portfolio
  • Contact
FI|EN

Popular tags:

AIEvents
Sign in
Nabil Samari logoNabil Samari logo
  • Home
  • About
  • Blog
  • Portfolio
  • Contact
Copyright 2026 © Nabil Samari
  • Home
  • Blog
  • How I Built an AI Marketing Bot That Creates a Week of Social Media Posts in 5 Minutes

How I Built an AI Marketing Bot That Creates a Week of Social Media Posts in 5 Minutes

Nabil Samari
Nabil Samari
May 11, 20264 min read
Share
How I Built an AI Marketing Bot That Creates a Week of Social Media Posts in 5 Minutes

Why I Automated Social Media Posts

As an entrepreneur, time is the most expensive resource. For one client (Luigi's, an Italian restaurant at Helsinki Airport), weekly social media posting took roughly 2 hours:

  • Browse the image library and pick photos (15 min)
  • Write English posts (30 min)
  • Resize images for Instagram (15 min)
  • Log into Buffer and create drafts (20 min)
  • Double-check hashtags, times, both locations (10 min)

This repeated every single week. I decided to automate the entire chain.

The Architecture

Here's the pipeline I built:

Nextcloud (images) → Ollama/qwen3-vl (GPU vision) → DeepSeek V4 Pro (text) → Buffer (publishing)

Each step in detail:

1. Images in Nextcloud — Customer photos sync automatically to Nextcloud. The Hermes agent reads the folder contents via WebDAV.

2. Local GPU Vision — A Qwen3-VL model (8.8B parameters, Q8_0 quantization) analyzes images locally on an RTX 4070 Ti SUPER GPU. Each image takes ~15 seconds. The model correctly identifies food, mood, colors, and details — even from Finnish-language advertising images.

3. Text Generation — DeepSeek V4 Pro writes a complete social media post from the vision output. The text follows the brand's style (in Luigi's case: casual, energetic, English). Posts are 100-130 words, include both restaurant locations, opening hours, and hashtags.

4. Buffer Drafts — Hermes creates a Nextcloud public share link for the image and sends it with the text to Buffer's GraphQL API. Both a Facebook draft (text only) and an Instagram draft (text + image) are created automatically. Posts are scheduled Monday through Friday at different times.

5. Reporting — Once complete, Hermes sends a report to Discord: how many posts created, for which days, and a link to Buffer. If anything fails, you get an immediate notification.

The entire pipeline runs as a cron job every Monday at 9:00 AM.

Nabil Samari

An events, sales and marketing professional building digital services and local AI solutions.

Location

Helsinki
Finland

Tags

      Newsletter

      Subscribe to receive the latest articles directly by email.

      © 2026 Nabil Samari

      Instagram
      LinkedIn
      YouTube

      Cost Comparison

      The actual cost of creating one social media post with different methods:

      MethodVisionTextPer PostWeekly (5 posts)
      Local AIFree (own GPU)DeepSeek API ~$0.001~$0.001~$0.005
      Gemini API~$0.002 (Flash 2.5)DeepSeek API ~$0.001~$0.003~$0.015
      Fully Manual$0$0~24 min work~2 h work

      The advantage of local AI is clear: free usage after hardware purchase. Gemini Flash works as an excellent fallback if you don't have a GPU — and it's still incredibly cheap ($0.015/week = $0.78/year).

      DeepSeek V4 Pro's API is so affordable ($0.14/million tokens) that the text cost for five posts is effectively a rounding error.

      Build Your Own

      You'll need:

      • Hermes agent installed on a server (Linux, running 24/7)
      • Ollama + a quantized vision model (qwen3-vl:8b)
      • GPU with at least 10 GB VRAM — or a Gemini API key
      • Buffer account (free tier works for 3 channels)
      • Nextcloud or another image library

      Option 1: With a local GPU

      ## 1. Install Ollama
      curl -fsSL https://ollama.com/install.sh | sh
      
      ## 2. Pull the vision model (9.8 GB)
      ollama pull qwen3-vl:8b-instruct-q8_0
      
      ## 3. Expose Ollama to the network (if Hermes is on a different machine)
      ## /etc/systemd/system/ollama.service:
      Environment="OLLAMA_HOST=0.0.0.0:11434"
      

      Option 2: With Gemini API (no GPU required)

      ## Hermes config.yaml
      auxiliary:
        vision:
          provider: google
          model: google/gemini-2.5-flash
      

      Gemini 2.5 Flash costs $0.02/image (1500px) — five images per week = $0.10.

      Creating the Cron Job in Hermes:

      Hermes's cron system triggers the automation every Monday at 9 AM. The prompt defines the entire workflow: where to fetch images, how vision analysis works, what style to use for posts, and where to send them. The result: five ready-to-publish social media posts for Facebook and Instagram — with zero manual steps.

      What I Learned

      The biggest surprise wasn't the technical implementation — building the pipeline took about an hour. The real revelation was the cost-performance ratio of local AI. Qwen3-VL's 8.8B parameter model analyzes food photos essentially as well as commercial APIs, but completely free after the GPU investment.

      Second insight: many small business owners pay $20-50/month for social media tools, when the same result can be achieved for free with open-source tools and a single API key. The total cost for this system is under $1/year — and it saves 100 hours of work.

      Third: vision model support for Finnish language is surprisingly good. Qwen3-VL read Finnish-language offer texts from advertising images without issues.

      Conclusion

      Automation doesn't remove creativity — it frees up time for it. When routine tasks like image screening, text formatting, and scheduling happen automatically, you gain more time for strategy, client relationships, and content quality oversight.

      This same architecture scales to multiple clients. Each brand gets its own Nextcloud folder, its own cron job, and different Buffer channel IDs — otherwise identical pipeline.

      Next up: testing automated video content production and multilingual posts.

      #AI#automation#social-media#Hermes#Ollama#DeepSeek#Buffer

      Subscribe to newsletter

      Get the latest posts straight to your inbox.

      No spam. Unsubscribe anytime.

      Latest
      I Built an AI Lead Pipeline That Isn't Allowed to Send Anything
      I Built an AI Lead Pipeline That Isn't Allowed to Send Anything
      August 10, 2026
      OpenAI Wants to Become Part of Everyday Life. Here Is How I Route My AI Work
      OpenAI Wants to Become Part of Everyday Life. Here Is How I Route My AI Work
      July 31, 2026
      I Tested Five Local Coding Models — Not One Built a Working App on the First Try
      I Tested Five Local Coding Models — Not One Built a Working App on the First Try
      July 29, 2026
      I Built a Local RAG Search. Having the Right File Wasn't Enough
      I Built a Local RAG Search. Having the Right File Wasn't Enough
      July 29, 2026
      Popular tags
      AIYrittäjyysHenkilökohtainenKoodausTapahtumatTekoälyTeknologiayrittajyysTutorialGuideTechnicalADHDProjektiTyönhakuFestivaalitPälkäneen KesäpäivätValokuvausYökerhotKalustoVinkitLuova alaLuovuusSEO
      Subscribe

      Get new posts straight to your inbox.