Deploy this robust n8n workflow to generate unlimited AI-powered e-commerce ad creatives by blending product and influencer images using the Gemini API. This n8n templates solution streamlines marketing asset creation.
Download this n8n workflow template and start using it instantly.
E-commerce marketers needing rapid, scaled ad creative production.
Agencies managing social media campaigns for multiple clients and requiring fast A/B testing assets.
Users looking for advanced examples of using the n8n node for HTTP requests with binary data and generative AI.
Anyone seeking powerful n8n templates for complex creative asset automation.
This advanced n8n workflow solves the tedious problem of generating numerous marketing variations suitable for modern social media campaigns. By utilizing the Google Gemini API (accessed via a dedicated HTTP Request n8n node), the workflow takes a single product image uploaded by the user and iteratively places it into contexts featuring various 'influencer' images stored in Google Drive. The output is a multitude of realistic, scenario-based ad creatives, drastically speeding up content creation and testing cycles. This powerful n8n solution is highly optimized for achieving high throughput for your creative assets, providing significant value over manual editing.
The entire process is initiated via a public n8n trigger form.
formtrigger n8n trigger, where the user uploads the primary product image.productimagetobase64 n8n node, preparing it for the AI API call.listinfluencerimages n8n node.iterateinfluencerimages n8n node initiates a loop, ensuring the rest of the n8n workflow processes each influencer image sequentially, creating a distinct ad creative for every reference photo.generateimage n8n node (an HTTP Request to the Gemini API). It sends a multi-part JSON payload containing both the product Base64 data and the influencer Base64 data, combined with a precise text prompt instructing the AI to composite the product into the influencer's scene (e.g., holding the product at a café).setresult n8n node, converted back into a proper binary file using the getimage n8n node, and finally uploaded to a target Google Drive folder using the uploadimage n8n node, completing one loop cycle of the n8n workflow.To utilize this powerful n8n templates solution, follow these steps:
listinfluencerimages, downloadinfluencerimage, and uploadimage n8n node instances.generateimage n8n node. This requires using your Google Gemini API Key, often configured as a Bearer Token or custom header.listinfluencerimages n8n node parameter to specify the Folder ID of your Google Drive folder containing the influencer reference photos.upload_image n8n node parameter to specify the target Google Drive Folder ID where the final generated ad creative images will be saved. formtrigger (n8n trigger): The entry point, initiating the n8n workflow upon submission of the product image via its public URL. Key Configuration: Set up to receive a required file upload.
productimagetobase64 (Extract From File n8n node): Essential file handling n8n node. It converts the incoming binary product image into a Base64 string property named Image, which is required for multimodal AI input.
listinfluencerimages (Google Drive n8n node): Retrieves the list of file metadata (IDs) for all reference images stored in the specified source folder. It uses returnAll to get the full list.
iterateinfluencerimages (Split In Batches n8n node): A critical core logic n8n node. It manages the looping structure, ensuring that the image generation steps run once for every influencer file identified.
generateimage (HTTP Request n8n node): The key generative n8n node. It targets the Google Gemini API (gemini-2.5-flash-image-preview:generateContent) using a custom JSON body that meticulously embeds two Base64 images and a contextual prompt to guide the composition.
setresult (Set n8n node): Handles data manipulation. It extracts the deeply nested Base64 encoded image data from the complex AI response structure.
getimage (Convert To File n8n node): Converts the Base64 string output from the AI back into a standardized binary file format, ready for storage.
uploadimage (Google Drive n8n node): The final action n8n node. It takes the newly generated ad creative binary file and uploads it to the configured destination folder with a dynamic filename based on the iteration count.
Automate the creation of UTM-tagged Bitly short links directly from Slack using this powerful n8n workflow. It leverages an AI Agent (GPT-4o-mini) for parameter inference and logs all campaign data to Google Sheets.

Use this powerful n8n workflow template to generate UI design mockups instantly using Replicate's Draft UI Designer model. Includes asynchronous polling logic.

Generate high-quality UGC marketing videos automatically from a single product image and text prompts using an advanced n8n workflow. Integrates Telegram, Gemini, Claude (Anthropic), and VEO3 video generation.

Generate stunning urban architecture images using the creativeathive/lemaar-door-urban Replicate model. This automated n8n workflow template includes asynchronous status polling.

Generate verifiable Continuing Education Unit (CEU) certificates automatically using this secure n8n workflow. Features email validation, QR verification, Google Sheets logging, and instant delivery via Gmail.

Use this comprehensive n8n workflow to automate the generation of verified gym trial passes. Features include email validation, unique QR code creation, PDF export, Gmail delivery, and Google Sheets logging. Easily deploy this n8n template today.

Chief Automation Officer at The Recap AI. I build the AI systems and agents that power our business and teach others how to use n8n. Check out our YouTube channel linked below!







































