🖼️ Lean Image Machine

You write the content. The machine sharpens the SEO, generates a real gym image, uploads it to img.fit901.com, and preps everything for GHL import — automatically.

How It Works (Big Picture)

Ready Processing Image Done Exported

You set Status = Ready. The machine picks it up within 5 minutes, processes it, and updates the row. When done, you get a notification on ntfy.

Step 1 — Fill In the Google Sheet

Open the Content Input sheet and add a row in the Content Input tab.

ColumnWho Fills ItWhat to Put
Row IDYouAny unique ID — e.g. B001, S001, IG001
Topic TitleYouYour working title. Machine will sharpen it.
Content TypeYouBlog, Facebook, Instagram-Square, Instagram-Portrait, Reel, All-In-One
Article BodyYouFor Blog — paste the full article HTML from Claude/ChatGPT/Gemini
Facebook PostYouFor Facebook content type — paste the post text
Instagram PostYouFor Instagram — paste the caption
Reel ScriptYouFor Reel — paste the script/caption
NotesYouOptional. Extra context for the image — e.g. "female athlete, morning light"
StatusYouSet to Ready when you're done writing
SEO TitleMachineAuto-filled. Max 60 chars, keyword-optimized.
Meta DescriptionMachineAuto-filled. Max 155 chars.
SlugMachineAuto-filled. URL slug.
Image URLMachineAuto-filled. Public URL on img.fit901.com
Image FilenameMachineAuto-filled. Descriptive filename.
Image Alt TextMachineAuto-filled. Accessibility alt text.

Content Types — What Each One Does

TypeImage SizeUses
Blog1200×628Article Body column. Exports to GHL Blog Importer.
Facebook1200×628Facebook Post column. Exports to GHL Social Scheduler.
Instagram-Square1080×1080Instagram Post column. Exports to Social Scheduler.
Instagram-Portrait1080×1350Instagram Post column. Taller image for feed.
Reel1080×1920Reel Script column. Vertical cover image.
All-In-One1200×628Fill any combination of Article Body, Facebook Post, Instagram Post.
→ Exports to Blog Export if Article Body is filled.
→ Exports to Social Export if Facebook Post or Instagram Post is filled.
One row can export to both.

Step 2 — Machine Runs Automatically

The machine checks the sheet every 5 minutes. When it sees a row with Status = Ready, it:

Step 1 of 5

Sharpens Your Title & Meta

Calls Gemini Flash with your title and article body. Returns an SEO-optimized title (max 60 chars), meta description (max 155 chars), and URL slug. Writes them to the sheet.

Step 2 of 5

Generates the Image

First, Gemini writes a detailed visual prompt describing exactly what should be in the image — real people, real gym environment, specific actions. Then FAL.ai (Flux Schnell model) generates the image at the right dimensions for your content type.

Step 3 of 5

Names the Image Descriptively

Image filename format:

fit901_[what-is-in-the-image]_[WxH]_[YYYY-MM-DD].jpg

Example: fit901_woman-box-jumps-brick-gym_1200x628_2026-03-24.jpg

Step 4 of 5

Uploads to img.fit901.com

FTPs the image to the correct folder:

Public URL pattern: https://img.fit901.com/content-images/blog/[filename].jpg

Step 5 of 5

Writes Everything Back + Notifies You

Updates the row with SEO Title, Meta Description, Slug, Image URL, Filename, Alt Text. Sets Status = Image Done. Logs the image to the Image Registry tab. Sends you a notification on ntfy.

Step 3 — Export to GHL

When you have a batch of Image Done rows ready to push to GHL:

  1. Fire the GHL Export — see the GHL Export manual
  2. Open the Google Sheet
  3. Go to the Blog Export tab — this has your blog rows in exact GHL format
  4. Go to the Social Export tab — this has your social rows in GHL Social Scheduler format
  5. For each tab: File → Download → Microsoft Excel (.xlsx)
  6. Import the xlsx files into GHL
  7. Clear the Blog Export and Social Export tabs after importing — otherwise the next export will append duplicates

⚠️ Always clear the Blog Export and Social Export tabs after importing to GHL. The machine appends rows — it doesn't overwrite. If you don't clear, you'll get duplicates on the next run.

Manual Trigger (Skip the 5-Min Wait)

If you want to fire the machine immediately instead of waiting:

POST https://n8n.businessdetonator.com/webhook/lean-image-machine

You can do this from a browser using a tool like Postman, or ask Claude to trigger it for you.

Image Location Reference

Content TypeFTP PathPublic URL Base
Blog/content-images/blog/https://img.fit901.com/content-images/blog/
Facebook, Instagram, Reel, All-In-One (social)/content-images/social/https://img.fit901.com/content-images/social/

CTA Rule — Never Change This

https://fit901.com/start

Every blog post automatically gets this CTA added at the end if it's not already in the article body. Never use /intro or any other path.

Troubleshooting

ProblemWhat to Check
Row stuck in "Processing" for more than 10 minutesOpen n8n → Executions → look for errors. Most likely: Gemini API issue or FAL.ai key not set. Clear the Processing Lock cell and set Status back to Ready.
Status shows "Error"Check the row — there may be an "Error Notes" column. Common cause: article body was empty when submitted.
Image not appearing at img.fit901.comCheck FTP credentials in n8n. Go to n8n → Credentials → FTP - img.fit901.com. Also verify the workflow is active.
Machine not picking up rowsMake sure Status is exactly "Ready" (capital R, no spaces). Also make sure the Lean Image Machine workflow is Active in n8n.
FAL.ai image generation failsFAL.ai API key may be wrong or depleted. Go to n8n → Credentials → FAL.ai - Fit 901 → update the key.

Workflow Status

✅ The Lean Image Machine is active and running. It checks for Ready rows every 5 minutes. FAL.ai key is set, FTP is connected, Google Sheet tabs are ready.