|

AI Brand Asset Generator: On-Demand Visuals With n8n and fal.ai

An AI brand asset generator that runs inside your existing n8n stack, costs pennies per image, and delivers finished visuals directly to Google Drive and your WordPress media library — that’s System 04 from The Automation Playbook. No Midjourney subscription. No designer retainer. No GPU server to manage. Just a webhook, a Claude prompt engineer, and fal.ai’s inference API doing the work.

Most solopreneurs either overpay for AI image tools on a per-seat subscription or underpay with generic stock photos that look like everyone else’s content. This system sits in between: API-level access to state-of-the-art FLUX models, paying only for what you generate, fully wired into the same n8n infrastructure you’re already running.

This is the simplified version of the image pipeline powering alexanderharte.com. The production version generates a featured image and three inline article images per post, fully automatically. What you’re building here is the foundation — a single on-demand image generator triggered by a webhook, with configurable models and brand style, delivering to both Google Drive and WordPress in one run.

Build time: 45–60 minutes. Then on-brand images on demand, for less than $0.03 each.


What You’ll Build

  • A webhook endpoint that accepts a plain-language image brief
  • A Claude prompt engineer that converts your brief into a detailed, model-optimised fal.ai prompt
  • A configurable fal.ai model submission — swap between FLUX Schnell, FLUX Dev, FLUX Pro, or any other fal.ai model with a one-field change
  • An async queue handler that submits the job, waits, then polls for the result
  • An image downloader that fetches the generated PNG
  • Parallel delivery to Google Drive (for asset management) and WordPress Media Library (for immediate use in posts)

The entire pipeline runs unattended. Send the brief, walk away, find the image waiting in both places when you come back.


Why This AI Brand Asset Generator Stack Works

The key insight behind this system is separating prompt engineering from image generation. Most people write a rough brief and paste it directly into an image tool. The results are inconsistent because the model is doing two jobs at once — interpreting your intent and translating it into visual instructions. Claude handles the translation step, turning a one-line brief into a precisely structured prompt that specifies lighting, composition, mood, colour palette, and technical parameters. fal.ai then executes against that optimised prompt with no ambiguity.

fal.ai specifically is the right choice for an API-driven pipeline for two reasons. First, it uses an async queue architecture — you submit a job, get a response URL, wait, then poll for the result. This means n8n never sits idle waiting for a generation to complete. Second, pricing starts at $0.003 per megapixel for FLUX.1 [schnell] and scales up to premium models — meaning a standard 1024×1024 blog image costs around $0.003 on Schnell or $0.025 on FLUX Dev. At one featured image per blog post, a year’s worth of content costs under $10 in image credits.

No subscription. No idle GPU costs. No infrastructure to manage. You pay only for what you generate.

What about self-hosted image generation? If you want full control over your models, zero per-image cost, and the ability to run custom LoRAs, RunPod is the alternative worth considering. RunPod lets you spin up GPU instances on demand — run ComfyUI or AUTOMATIC1111 on a cloud GPU, generate as many images as you want during the session, and pay only for GPU time used. At roughly $0.20–$0.50 per hour for a capable GPU, a batch of 20 images costs you the same as a few fal.ai API calls, but you have complete model control. The tradeoff is setup complexity — fal.ai is plug-and-play via API, RunPod requires configuring your own image generation environment. For a solopreneur just starting with automated image generation, fal.ai is the faster path. For someone already running ComfyUI locally who wants cloud scale, RunPod is the better fit.


System Overview

StepToolWhat Happens
1. Triggern8n WebhookA POST request with your image brief, style, aspect ratio, model, and filename fires the pipeline.
2. Set defaultsn8n Set nodeAny fields not in the payload get sensible defaults — FLUX Dev model, 16:9 ratio, your brand style guidelines.
3. Build promptClaude APIClaude converts your plain-language brief into a detailed, FLUX-optimised image generation prompt.
4. Extract promptn8n Code nodeClaude’s response is parsed and assembled alongside the model and aspect ratio fields.
5. Submit jobfal.ai queue APIThe prompt is POSTed to fal.ai’s async queue. A response URL is returned immediately.
6. Store URL + waitn8n Set + Wait nodesThe response URL is saved and n8n waits 60 seconds while fal.ai generates the image.
7. Poll resultfal.ai queue API (GET)n8n GETs the response URL. fal.ai returns the completed image URL when the job is done.
8. Download imagen8n HTTP RequestThe generated PNG is downloaded as binary data.
9. DeliverGoogle Drive + WordPressThe image is saved to a Google Drive folder and uploaded to WordPress Media Library in parallel.

AI brand asset generator
Full n8n workflow canvas, all nodes including the parallel split The complete AI brand asset generator pipeline. Eleven nodes from webhook to delivery — Claude engineers the prompt, fal.ai generates the image, and Google Drive and WordPress receive it simultaneously.

fal.ai Model Guide: Which One to Use

The model field in your webhook payload controls which fal.ai endpoint runs. Here’s how the main FLUX options compare for solopreneur content workflows:

ModelEndpointPriceSpeedBest for
FLUX.1 Schnellfal-ai/flux/schnell$0.003/MP1–4 secondsHigh-volume generation, drafts, testing prompts
FLUX.1 Devfal-ai/flux/dev$0.025/image10–30 secondsBlog featured images, social posts, brand assets
FLUX.2 Profal-ai/flux-2-pro$0.03/MP20–60 secondsHero images, premium campaign visuals
FLUX.1 Dev + LoRAfal-ai/flux-lora$0.035/MP10–20 secondsBrand-consistent outputs using a trained style LoRA

For most solopreneurs generating blog and social imagery, FLUX.1 Dev at $0.025 per image is the right default — strong quality, consistent outputs, and well within budget. Use Schnell for bulk draft generation or prompt testing, and step up to FLUX.2 Pro only for images where quality is the top priority.

Adjust the Wait node to match your model. FLUX Schnell typically completes in under 10 seconds — reduce the Wait node to 15–20 seconds. FLUX Dev takes 10–30 seconds — the default 60 second wait is safe. FLUX.2 Pro can take up to 60 seconds — increase the wait to 90 seconds if the Poll node returns an incomplete status.


Before You Start: What You Need

  • A self-hosted or cloud n8n instance
  • A fal.ai account — sign up at fal.ai, free credits included on signup
  • An Anthropic API account with credits — console.anthropic.com
  • A Google account with Google Drive access
  • A WordPress site with admin access
  • 45–60 minutes

Step-by-Step Build Guide

Step 1: Get Your fal.ai API Key

Sign up at fal.ai. New accounts receive free credits to test generation before committing to paid usage. Once signed in:

  1. Click your profile icon in the top right and go to Settings
  2. Select API Keys
  3. Click Add key, give it a name like n8n-brand-assets, and copy the key immediately

In n8n, go to Settings → Credentials → Add Credential. Search for HTTP Header Auth and select it. Set:

  • Header Name: Authorization
  • Header Value: Key YOUR_FAL_API_KEY

The word Key followed by a space then your key — this is fal.ai’s required auth format. Save the credential and name it fal.ai API. You’ll select this credential in both the Submit to fal.ai and Poll fal.ai Result nodes.

fal.ai API Keys section, Add key button visible, no actual keys shown The fal.ai API Keys section. One key covers every model on the platform — swap between FLUX Schnell, Dev, Pro, or any other fal.ai model by changing the endpoint string in the workflow, not the credential.

Step 2: Build the n8n Workflow

Create a new workflow in n8n. Here are all eleven nodes in sequence.

Node 1 — Webhook

Add a Webhook node. Set HTTP method to POST, path to brand-asset-generator, Response Mode to Last Node. Your webhook URL will be:

https://your-n8n-domain/webhook/brand-asset-generator

The minimum payload this webhook accepts is:

{
  "brief": "Featured image for a blog post about n8n automation for solopreneurs"
}

Optional fields with defaults:

{
  "brief": "Featured image for n8n automation blog post",
  "style": "dark background, electric blue and teal accents, minimal tech aesthetic, no text",
  "aspect_ratio": "16:9",
  "model": "fal-ai/flux/dev",
  "filename": "my-custom-filename"
}

Node 2 — Set Brief Fields

Add a Set node. Create five fields with the following expressions — the || operator provides fallback defaults when a field isn’t sent in the payload:

  • brief{{ $json.body.brief }}
  • style{{ $json.body.style || 'dark background, electric blue and teal accent colours, futuristic minimal tech aesthetic, no text' }}
  • aspect_ratio{{ $json.body.aspect_ratio || '16:9' }}
  • model{{ $json.body.model || 'fal-ai/flux/dev' }}
  • filename{{ $json.body.filename || 'brand-asset-' + $now.toMillis() }}

Edit the default style string to match your own brand aesthetic. This is what gets passed to Claude as your brand guidelines — make it specific. Colours, mood, composition style, what to avoid.

Node 3 — Build Image Prompt (HTTP Request → Anthropic API)

Add an HTTP Request node. Configure it with your Anthropic API credential — same setup as Systems 02 and 03.

  • Method: POST
  • URL: https://api.anthropic.com/v1/messages
  • Authentication: Predefined credential type → Anthropic API
  • Headers: anthropic-version: 2023-06-01 and content-type: application/json

Body (raw JSON):

={
  "model": "claude-sonnet-4-20250514",
  "max_tokens": 400,
  "messages": [{
    "role": "user",
    "content": "You are an expert AI image prompt engineer specialising in FLUX model generation.\n\nConvert this brief into a detailed image generation prompt:\n\nBrief: {{ $json.brief }}\nBrand style: {{ $json.style }}\nAspect ratio: {{ $json.aspect_ratio }}\n\nRules:\n- Return ONLY the prompt text — no explanation, no preamble, no quotes\n- Be specific about lighting, composition, depth of field, colour palette, and mood\n- Never include text, words, typography, or UI elements in the prompt\n- Optimise specifically for FLUX model architecture\n- Keep the prompt under 300 words"
  }]
}

Node 4 — Extract Prompt (Code node)

Add a Code node to parse Claude’s response:

const prompt = $input.first().json.content[0].text.trim();
const fields = $('Set Brief Fields').first().json;

return [{
  json: {
    image_prompt: prompt,
    model: fields.model,
    aspect_ratio: fields.aspect_ratio,
    filename: fields.filename,
    brief: fields.brief
  }
}];

Node 5 — Submit to fal.ai (HTTP Request)

Add an HTTP Request node. This submits the generation job to fal.ai’s async queue:

  • Method: POST
  • URL: =https://queue.fal.run/{{ $json.model }} (expression — builds the URL from the model field)
  • Authentication: Generic credential type → HTTP Header Auth → select your fal.ai credential
  • Body (raw JSON):
={
  "prompt": "{{ $json.image_prompt }}",
  "num_images": 1,
  "aspect_ratio": "{{ $json.aspect_ratio }}",
  "output_format": "png",
  "sync_mode": false
}

Setting sync_mode: false is essential — this tells fal.ai to use the async queue and return a response_url immediately rather than holding the connection open until generation completes. The response_url is what the next nodes use to retrieve the result.

Submit to fal.ai node open, dynamic model URL and sync_mode: false visible The Submit to fal.ai node. The endpoint URL builds dynamically from the model field in the payload — and sync_mode: false is essential, telling fal.ai to use the async queue and return a response URL immediately rather than holding the connection open.

Node 6 — Store Response URL (Set node)

Add a Set node to save the response_url returned by fal.ai alongside the filename — both are needed after the wait:

  • response_url{{ $json.response_url }}
  • filename{{ $('Extract Prompt').first().json.filename }}
  • brief{{ $('Extract Prompt').first().json.brief }}

Node 7 — Wait 60s

Add a Wait node. Set the amount to 60 and the unit to seconds. This is the configurable delay — adjust based on your chosen model as described in the model guide above.

Node 8 — Poll fal.ai Result (HTTP Request)

Add an HTTP Request node. This GETs the response URL to retrieve the completed image:

  • Method: GET
  • URL: ={{ $json.response_url }}
  • Authentication: Generic credential type → HTTP Header Auth → your fal.ai credential

When fal.ai has finished generating, this returns a JSON object containing images[0].url — the direct URL to the generated PNG file.

Node 9 — Download Image (HTTP Request)

Add an HTTP Request node to download the image as binary data:

  • Method: GET
  • URL: ={{ $json.images[0].url }}
  • Response Format: In Options → Response → set Response Format to File and Output Property Name to data

Setting the response format to File is critical — without this, n8n treats the response as text and the binary image data is unusable by the downstream nodes.

Node 10 — Save to Google Drive

Add a Google Drive node. Set operation to Upload. Connect your Google credential (same OAuth setup as the Google Sheets credential in System 03 — enable the Google Drive API in the same Google Cloud project). Configure:

  • File name: ={{ $('Store Response URL').first().json.filename }}.png
  • Folder: Paste your Google Drive folder URL or ID into the Folder field
  • Input data field: data (matching the Output Property Name from Node 9)

To get your Google Drive folder ID: open the folder in your browser and copy the long string from the URL — drive.google.com/drive/folders/[THIS PART].

Node 11 — Upload to WordPress Media

Add an HTTP Request node running in parallel with Node 10. This uploads the image directly to your WordPress Media Library:

  • Method: POST
  • URL: https://your-wordpress-site.com/wp-json/wp/v2/media
  • Authentication: Predefined credential type → WordPress API
  • Headers (JSON):
={
  "Content-Disposition": "attachment; filename={{ $('Store Response URL').first().json.filename }}.png",
  "Content-Type": "image/png"
}
  • Body: Binary data → input data field name: data

Replace your-wordpress-site.com with your actual domain. Use the same WordPress Application Password credential from System 03 — no additional setup needed.

Connect Nodes 10 and 11 both from Node 9 — they run in parallel, meaning Google Drive and WordPress receive the image simultaneously rather than sequentially. Add a final No Operation node connected from both delivery nodes as a clean termination point.

Canvas showing the parallel delivery split after the Download Image node The parallel delivery split. Both Save to Google Drive and Upload to WordPress Media run simultaneously after the image downloads — the asset lands in both places in a single pipeline run.

Step 3: Test the Pipeline

Before testing, confirm the Wait node duration matches your chosen model. Then:

  1. Open the workflow in n8n and click Test workflow to activate the test webhook
  2. Send a test POST request to your webhook URL — the curl command below works from Terminal:
curl -X POST https://your-n8n-domain/webhook-test/brand-asset-generator \
  -H "Content-Type: application/json" \
  -d '{
    "brief": "Featured image for a blog post about n8n automation for solopreneurs. Abstract tech concept.",
    "aspect_ratio": "16:9",
    "model": "fal-ai/flux/dev",
    "filename": "test-brand-asset"
  }'
  1. Watch the execution panel in n8n — each node turns green in sequence. The workflow will pause at the Wait node for 60 seconds before continuing
  2. Once complete, check your Google Drive folder and WordPress Media Library — the generated image should appear in both

If the Poll node returns a result with status: "IN_QUEUE" or status: "IN_PROGRESS" rather than the final image, increase the Wait duration and test again. This is normal for heavier models like FLUX.2 Pro under high queue load.

n8n execution panel all green, Poll fal.ai Result node selected showing images[0].url A successful test run. The Poll node returns the completed image URL from fal.ai — the downstream nodes download that binary and deliver it to both destinations without any manual steps.


Triggering the Pipeline From Other Workflows

The webhook trigger means this pipeline can be called from anywhere — another n8n workflow, Make.com, a script, or even a Google Sheets App Script button. The most useful integration is connecting it to System 03: the Content Pipeline.

After System 03 creates a WordPress draft, you can add an HTTP Request node at the end that fires the brand asset generator webhook with the article title as the brief. The image generates in the background, lands in WordPress Media Library, and is ready to set as the featured image when you open the draft for review. The two pipelines are completely independent — System 03 doesn’t wait for the image to complete, it just fires the request and moves on.

To trigger from System 03, add an HTTP Request node after the Create WordPress Draft node:

POST https://your-n8n-domain/webhook/brand-asset-generator
{
  "brief": "Featured image for: {{ $('Set Article Fields').first().json.topic }}",
  "aspect_ratio": "16:9",
  "model": "fal-ai/flux/dev",
  "filename": "{{ $json.slug }}-featured"
}

Troubleshooting: Common Problems and Fixes

Submit to fal.ai returns 401 Unauthorized

Your fal.ai API key isn’t formatted correctly. The Authorization header value must be Key YOUR_KEY — the literal word Key followed by a space, then your key. Check the credential in n8n and confirm the format exactly.

Poll node returns status IN_QUEUE or IN_PROGRESS

The image hasn’t finished generating yet. Increase the Wait node duration and retest. If it consistently returns incomplete after 120 seconds, check your fal.ai dashboard — the job may have failed. Failed jobs due to server errors are not charged by fal.ai.

Download Image node returns empty binary data

The Response Format in the HTTP Request node isn’t set to File. Open the node, go to Options → Response, set Response Format to File, and set the Output Property Name to data. Without this setting, n8n can’t pass binary data to the downstream nodes.

Google Drive upload fails with permissions error

Confirm your Google Drive credential has the Drive API enabled in Google Cloud Console — it’s a separate API from Google Sheets and must be enabled individually. Go to Google Cloud Console → APIs & Services → Library → search Google Drive API → Enable.

WordPress media upload returns 415 Unsupported Media Type

The Content-Type header must be set to image/png for PNG files. If you change the output format in the fal.ai request to JPEG, update the Content-Disposition filename extension and Content-Type header to match.

Generated images don’t match brand style

The default style string in the Set Brief Fields node is the lever to pull here. Be extremely specific: list your exact colour hex codes, describe the lighting style (soft diffused, dramatic side-lit, flat studio), specify what to avoid (text, people, specific colours), and name comparable aesthetics. The more specific your brand style prompt, the more consistent Claude’s generated prompts will be across different briefs.


Taking This Further

  • Train a brand LoRA. fal.ai supports LoRA training directly on the platform. Train a style LoRA on 15–20 examples of your existing brand visuals and reference it in every generation using the fal-ai/flux-lora endpoint. This produces outputs that look distinctly on-brand rather than generically AI-generated.
  • Add image variation generation. Change num_images in the Submit node from 1 to 3 or 4. Parse the multiple URLs from the Poll result and save all variations to Google Drive — gives you options to choose from rather than committing to the first output.
  • Extend to video thumbnails. The same pipeline handles 9:16 aspect ratio for vertical video thumbnails. Pass "aspect_ratio": "9:16" in the payload and the pipeline produces Instagram Reel and YouTube Shorts-ready thumbnails with zero additional configuration.
  • Automate featured image assignment. After the WordPress media upload, make a second WordPress REST API call to PATCH /wp/v2/posts/{post_id} with {"featured_media": attachment_id} — the attachment ID is returned in the media upload response. Combined with System 03, this sets the featured image on the draft automatically.

What This Actually Costs You

ToolCostNotes
n8n (self-hosted)~$5–10/monthSame instance as your other systems — no additional cost.
fal.ai — FLUX.1 Schnell$0.003 per imageBest for drafts and high-volume generation. 1,000 images = $3.
fal.ai — FLUX.1 Dev$0.025 per imageRecommended default for blog and social assets. 1 post/day for a year = ~$9.
fal.ai — FLUX.2 Pro$0.03 per megapixelPremium quality for hero images and campaign visuals.
Claude API (prompt engineering)~$0.001 per imageOne small Claude call per image to build the optimised prompt.
Google DriveFreeStandard Google account storage.
Alternative: RunPod$0.20–$0.50/hr GPUSelf-hosted alternative for full model control. Better for high-volume batch generation.

A solopreneur publishing three posts per week and generating one featured image plus one social asset per post — six images weekly — spends under $8 per year on fal.ai API credits at FLUX Dev pricing. That’s less than a single stock photo licence and produces visuals that are entirely your own.


Ready to Build It?

System 04 is the creative layer of the Automation Playbook. Systems 01–03 handle your leads, your social distribution, and your content production. System 04 handles your visuals. Together, they cover the full content and lead generation loop for a solopreneur publishing business — end to end, mostly automated, running on infrastructure that costs less per month than a single SaaS subscription.

System 05 is next: the AI-Powered Email Triage Assistant — automatically classifying, labelling, and drafting replies to your inbox so you only see the messages that genuinely need your attention.

If you haven’t worked through the earlier systems yet, start with System 01 — the always-on lead capture and nurture system that delivers your lead magnet automatically the moment someone opts in.


Affiliate disclosure: RunPod links in this post are affiliate links. If you sign up using my link, I earn a small commission at no extra cost to you. RunPod is a tool I use and recommend for self-hosted GPU workloads.


Alex Harte | alexanderharte.com

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *