Defapi + Google Forms: 3D figurine images on demand
You finally get a decent selfie or product shot, then the “quick creative” turns into an annoying loop: upload, tweak prompt, reupload, wait, chase the output link, repeat.
This Defapi Google Forms setup hits marketers first (ad variants never stop), but product teams and small agencies feel it too. You get a simple form that turns one image + one prompt into a downloadable 3D figurine style visual without babysitting the process.
Below you’ll see how the automation runs, what it replaces, and what to watch for so you get clean outputs on the first try.
How This Automation Works
See how this solves the problem:
n8n Workflow Template: Defapi + Google Forms: 3D figurine images on demand
flowchart LR
subgraph sg0["Upload Image Flow"]
direction LR
n0["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Obtain the generated status"]
n1["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Send Image Generation Reques.."]
n2@{ icon: "mdi:cog", form: "rounded", label: "Wait for Image Processing Co..", pos: "b", h: 48 }
n3@{ icon: "mdi:swap-horizontal", form: "rounded", label: "Check if Image Generation is..", pos: "b", h: 48 }
n4@{ icon: "mdi:swap-vertical", form: "rounded", label: "Format and Display Image Res..", pos: "b", h: 48 }
n5["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/form.svg' width='40' height='40' /></div><br/>Upload Image"]
n6["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/code.svg' width='40' height='40' /></div><br/>Convert to JSON"]
n5 --> n6
n6 --> n1
n0 --> n3
n2 --> n0
n3 --> n4
n3 --> n2
n1 --> n2
end
%% Styling
classDef trigger fill:#e8f5e9,stroke:#388e3c,stroke-width:2px
classDef ai fill:#e3f2fd,stroke:#1976d2,stroke-width:2px
classDef aiModel fill:#e8eaf6,stroke:#3f51b5,stroke-width:2px
classDef decision fill:#fff8e1,stroke:#f9a825,stroke-width:2px
classDef database fill:#fce4ec,stroke:#c2185b,stroke-width:2px
classDef api fill:#fff3e0,stroke:#e65100,stroke-width:2px
classDef code fill:#f3e5f5,stroke:#7b1fa2,stroke-width:2px
classDef disabled stroke-dasharray: 5 5,opacity: 0.5
class n5 trigger
class n3 decision
class n0,n1 api
class n6 code
classDef customIcon fill:none,stroke:none
class n0,n1,n5,n6 customIcon
The Challenge: Turning “one image” into five rounds of busywork
If you’ve ever tried generating 3D figurine or action-figure style visuals for a campaign, you know the slow part isn’t creativity. It’s the handling. People send selfies in chat, someone else copies a prompt from a doc, an API key is missing, and the same file gets uploaded again because the last link is buried. Then you wait, refresh, and ask “is it done yet?” like it’s 2009. The worst part is the mental load. You’re not producing more concepts, you’re just managing the process.
It adds up fast. Here’s where it usually breaks down in real teams.
- Uploading the same image multiple times wastes about 10 minutes per iteration, especially when feedback comes in piecemeal.
- API keys get shared in the wrong place or forgotten, which turns “quick test” into a back-and-forth thread.
- Status checking becomes manual refreshing, and someone always loses track of which request matches which prompt.
- Outputs land as random URLs in chat, so nothing is easy to download, reuse, or hand off to a client.
The Fix: A Google Form that generates (and returns) the final image
This workflow gives you a single intake point (a form) and a predictable output (a ready-to-download image link). Someone uploads a selfie or product image, adds a prompt that describes the figurine scene, and pastes their Defapi API key. n8n converts the uploaded file into a format the API can use (base64), then submits the generation request to Defapi running Google’s Nano Banana AI model. After that, the workflow waits briefly and starts checking the job status automatically. When the generation is marked “success,” n8n formats the final result and displays the image URL so the user can grab it immediately.
The workflow starts with a Google Forms-style upload step inside n8n’s form trigger. Then it packages your image and prompt, sends the job to Defapi, and polls until it’s done. Finally, it returns a clean result link instead of making you hunt through logs or dashboards.
What Changes: Before vs. After
| What This Eliminates | Impact You’ll See |
|---|---|
|
|
Real-World Impact
Say you need 10 figurine-style concepts for a product drop. Manually, each concept often means about 10 minutes to collect the selfie, rewrite the prompt, upload, submit, and check status, so you lose roughly 2 hours just “running the machine.” With this workflow, the requester spends about a minute uploading and pasting the prompt, then the system handles the submit + status polling while they move on. You still wait for processing, but you’re not stuck doing busywork the whole time.
Requirements
- n8n instance (try n8n Cloud free)
- Self-hosting option if you prefer (Hostinger works well)
- Defapi for generating the 3D figurine image
- Google Forms-style intake (n8n Form Trigger) to collect image + prompt
- Defapi API key (get it from your Defapi.org account)
Skill level: Beginner. You will connect credentials, paste endpoints, and test with a sample image.
Need help implementing this? Talk to an automation expert (free 15-minute consultation).
The Workflow Flow
Form submission with your image, prompt, and API key. A user uploads a selfie (or product shot) and types the creative direction for the figurine-style result.
Image packaging for the API request. n8n converts the uploaded file into base64 and assembles the payload so Defapi can process it reliably.
Generation request + automatic status polling. The workflow submits the job to Defapi, waits about 10 seconds, then checks status in a loop until it sees a success response.
Clean output you can share or download. Once the job completes, n8n formats the final image URL and shows it as the result, so there’s no digging.
You can easily modify the prompt template to enforce brand style, or adjust the wait time to match your typical generation speed. See the full implementation guide below for customization options.
Step-by-Step Implementation Guide
Step 1: Configure the Form Trigger
This workflow starts when a user submits an image and prompt through a form.
- Add a Image Upload Form node and set Form Title to
Upload Image. - Under Form Fields, add a file field with Field Label
Imageand Accept File Typesimage/*. - Add text fields labeled
API KeyandPromptand mark them as required.
Flowpast Branding is a sticky note used for documentation only and does not affect execution.
Step 2: Set Up Image Encoding
Convert the uploaded image into a Base64 payload and prepare API parameters.
- Add a Encode Image Payload node and paste the provided JavaScript into Code.
- Ensure the code extracts the binary file from
Imageand buildsimg_url,api_key, andpromptfields. - Connect Image Upload Form → Encode Image Payload.
⚠️ Common Pitfall: The file field label must be exactly Image to match the binary reference in Encode Image Payload.
Step 3: Configure API Requests and Polling
Send the generation request, then poll the status until the task completes.
- Add Submit Generation Request and set URL to
https://api.defapi.org/api/image/genand Method toPOST. - Set JSON Body to
={"prompt": "{{$json.prompt}}", "model": "google/nano-banana", "images": ["{{ $json.img_url }}"]}. - Under Header Parameters, add Content-Type
application/jsonand Authorization=Bearer {{ $json.api_key }}. - Add Delay for Processing and set Amount to
10seconds, then connect Submit Generation Request → Delay for Processing. - Add Fetch Generation Status with URL
https://api.defapi.org/api/task/queryand a query parameter task_id set to={{$json.data.task_id}}. - In Fetch Generation Status headers, set Content-Type to
application/jsonand Authorization to=Bearer {{ $('Encode Image Payload').item.json.api_key }}. - Add Verify Completion Status with a condition comparing Right Value to
={{ $json.data.status == 'success' }}, then connect Fetch Generation Status → Verify Completion Status. - Connect the false branch of Verify Completion Status back to Delay for Processing to create the polling loop.
Step 4: Configure Output
Return the generated image URL when the task succeeds.
- Add Prepare Result Output and create an assignment named image_url with value
={{$json.data.result[0].image}}. - Connect the true branch of Verify Completion Status to Prepare Result Output.
Tip: You can extend Prepare Result Output to include metadata like task ID or status for downstream steps.
Step 5: Test and Activate Your Workflow
Verify the end-to-end generation flow before enabling production runs.
- Click Execute Workflow and submit the Image Upload Form with a test image, API key, and prompt.
- Confirm that Submit Generation Request returns a task ID and that Fetch Generation Status eventually returns
success. - Check Prepare Result Output for a populated
image_urlvalue. - Toggle the workflow to Active to accept real form submissions.
Watch Out For
- Defapi credentials can expire or you may paste the wrong key. If things break, check the Authorization header in your n8n HTTP Request node first.
- If you’re using Wait nodes or external rendering, processing times vary. Bump up the wait duration if downstream nodes fail on empty responses.
- Dark input photos create dark figurines. Honestly, lighting matters more than people think, so fix the source image before you blame the prompt.
Common Questions
About 30 minutes if you already have a Defapi API key.
Yes. No coding is required, but someone should be comfortable testing a form submission and updating an API key.
Yes. n8n has a free self-hosted option and a free trial on n8n Cloud. Cloud plans start at $20/month for higher volume. You’ll also need to factor in Defapi API usage costs based on how many images you generate.
Two options: n8n Cloud (managed, easiest setup) or self-hosting on a VPS. For self-hosting, Hostinger VPS is affordable and handles n8n well. Self-hosting gives you unlimited executions but requires basic server management.
You can. Most customization happens in the “Encode Image Payload” step (what you send) and the “Prepare Result Output” step (what you show back to the user). Common tweaks include adding a pre-filled prompt template for your brand style, enforcing required prompt elements like “scale” and “materials,” and writing results into Google Sheets so you can review variants later.
Usually it’s an expired or incorrect API key, or the Authorization header isn’t formatted as a Bearer token. It can also fail when the uploaded file isn’t an actual image (wrong MIME type) or when the payload gets too large. Check the response body from the “Submit Generation Request” node in n8n; it will typically tell you what Defapi rejected.
If you self-host n8n, there’s no execution cap (it mostly depends on your server). On n8n Cloud, capacity depends on your plan’s monthly executions. Practically, this workflow processes one request per form submission, and the limiting factor is how fast Defapi completes generation plus how often you poll for status.
Often, yes. This workflow needs file handling (binary upload), base64 conversion, a status polling loop, and conditional logic that repeats until success, and n8n handles that kind of flow cleanly. Zapier/Make can do it, but you’ll usually end up paying more for multi-step runs and repeated checks, and the loop logic gets awkward. n8n also gives you the self-host option, which is useful if you run lots of image requests. If you only need a simple “submit once and hope it’s done” flow, Zapier might feel faster to set up. Talk to an automation expert if you want the quickest path for your exact use case.
Set it up once and the workflow handles the repeatable parts: intake, submission, waiting, and returning the link. You get better figurine visuals with way less chasing.
Need Help Setting This Up?
Our automation experts can build and customize this workflow for your specific needs. Free 15-minute consultation—no commitment required.