n8n

How to Generate Hugging Face Creative Assets?

Collect a prompt from a simple web form, create an AI image in a chosen style, store it on S3, and show a results page with the hosted image link. Great for marketing and content teams that need quick visuals for ads, blogs, and social posts.

The flow starts with an n8n form that captures the prompt and a style choice. A router sends the request to one of several style presets that set a style prompt. The workflow then calls the Hugging Face inference API to render the image. On success, the image uploads to an S3 bucket with a unique name, and a web page returns the final image and link. If the API fails, a clear error message is sent back to the form. You can swap the model in the API URL and point S3 to AWS or an S3 compatible service like R2.

Setup needs a Hugging Face API token and S3 credentials with write access. Expect faster turnarounds and fewer handoffs, since users can generate images without a designer. This is useful for campaign mockups, concept art, thumbnails, and mood boards. Submit the form, pick a style, and let the system handle the rest.

What are the key features?

  • Web form captures the prompt and a style choice for simple input collection
  • Style router maps each choice to a preset that adds a detailed style prompt
  • HTTP request calls the Hugging Face inference API to generate the image
  • S3 upload stores the image with a unique execution based filename
  • Success page returns HTML with the final image and its public link
  • Error path sends a clear message back when the API fails
  • Easily switch models by changing the API URL parameter
  • Supports AWS S3 or S3 compatible storage such as R2

What are the benefits?

  • Reduce design turnaround from hours to minutes
  • Automate 80 percent of the image delivery steps from prompt to hosted URL
  • Eliminate manual file uploads and sharing links
  • Handle multiple form submissions without extra staff
  • Connect AI generation with cloud storage in one flow

How do you set it up?

  1. Import the template into n8n: Create a new workflow in n8n > Click the three dots menu > Select 'Import from File' > Choose the downloaded JSON file.
  2. You'll need accounts with Hugging Face and Amazon S3. See the Tools Required section above for links to create accounts with these services.
  3. Create a Hugging Face API token in your Hugging Face account. In the n8n credentials manager, create a new HTTP Header Auth credential. Use an Authorization header with the value Bearer followed by your token.
  4. Open the HTTP Request node and set the request to the Hugging Face text to image model endpoint you prefer. Confirm the method and body fields send the user prompt and the style prompt.
  5. Run a quick test from the HTTP Request node. If you do not get an image, check the token, endpoint URL, and body format.
  6. In the n8n credentials manager, create an S3 credential with Access Key ID, Secret Key, and Region. For Cloudflare R2, set a custom S3 endpoint and use your R2 keys.
  7. Open the S3 node and set the bucket name and file name. The template uses a unique name based on the execution id to avoid collisions.
  8. Review the Switch and Set nodes. Update or add style presets to match your brand look. Keep the stylePrompt field consistent for the API call.
  9. Open the Form Trigger node and copy the public URL. Submit a test prompt and pick a style to run the full flow.
  10. On success, confirm the image appears on the results page and the S3 bucket shows the new file. Copy the public link and share it.
  11. If you see an error message, try again. If it repeats, check API limits, confirm the S3 credential has write permission, and review the execution log for details.
  12. Once stable, share the form link with your team for daily content requests.

Tools Required

$24 / mo or $20 / mo billed annually to use n8n in the cloud. However, the local or self-hosted n8n Community Edition is free.

Amazon S3

Sign up

AWS Free Tier: 5 GB S3 Standard storage, 20,000 GET requests, 2,000 PUT/COPY/POST/LIST requests, and 100 GB data transfer out / mo

Hugging Face

Sign up

Free tier: $0 / mo, includes ~$0.10 in monthly Inference API credits; extra usage not available on Free

Credits:
Built by @maxtkacz as part of a 30 Day AI Sprint. Watch the setup video: YouTube video. Project page: Notion page.

Similar Templates

Join Futurise to access 1,200+ automation templates

Get instant access to ready-made automation workflows for n8n, Make.com, AI agents, and more. Download, customise, and deploy in minutes.