AUTOMATION GUIDE

Replicate any ad
for your brand.

Set up an automation that converts any inspiration ad into an ad tailored for your brand.

You stay in control.You approve the words and the image plan before anything is created.
INSPIRATION → BRAND-READY AD
Inspiration ad
Your ad
Gemini n8n Airtable Meta Drive
Impact95% cost savingfaster
01The idea

Learn from the ad.
Make a new one.

The workflow notices what makes an ad work: its message, layout, visual style, and offer. It then replaces the brand, product, facts, and scene with yours.

You stay in control: The two approval stops are there for facts, brand safety, and originality.
WHAT STAYS? WHAT CHANGES?

Take the idea. Leave the identity.

InspirationBig idea
Your adNew words
Keep the useful pattern

Keep the reading order and the way the idea unfolds.

Reading orderBig → small textClear choice
02Watch it work

From saved image
to finished ad.

Watch the image move through every step. The animation starts when this section comes into view.

Step 1 of 8
INSPIRATION
An ad you likeTap to choose
INSPIRATION
An ad you likeTap to choose
Selected ✓
You

Choose image

Pick the ad that sparked the idea.

Moves forwardInspiration image
03The steps

What each part does.

01

You press an Airtable button

The button sends the right Airtable row and inspiration image to n8n.

02

Gemini writes fresh copy

Gemini follows the writing pattern, but uses your brand voice and approved facts.

03

Gemini reads the design

It notes the layout, style, type, and where the important parts sit.

04

Gemini makes an image plan

The copy and layout become a clear plan for the new scene, words, positions, camera, and light.

05

Gemini makes the new ad

The image model follows the plan and makes a fresh image for your brand.

06

Drive saves it for review

The finished image goes to Drive. Its link returns to Airtable so you can check it.

04Build it

Build it, one card at a time.

Finish and test the card in front of you. Then use the arrow to move on.

NEW N8N WORKFLOW

When you see this label, start a blank workflow and use Import from URL. The other cards continue inside a workflow you already imported.

Step 1 of 10
01
YOUR CONTROL DESK

Make the Airtable table

Start with the place that will hold your image, approvals, and final result. Use these field names exactly.

id Formula: RECORD_ID()Image URL URLOG image AttachmentGenerate script ButtonScript Long textStatus Single selectGenerate JSON ButtonJSON Long textGenerate image ButtonAttachments Attachmentfinal_image URL
Status choicesAdd “Script generated” and “Script approved”. This becomes your first human checkpoint.
02
CONNECT AIRTABLE

Let n8n update the table

Now Airtable first appears inside n8n, so connect it here—not earlier.

  1. Create an Airtable personal access token with record read, record write, and schema read access for this base.
  2. In n8n, open Credentials → New credential → Airtable Personal Access Token.
  3. Paste the token, save it, and run the connection test.
Connected whenn8n can list the base and table you created in card 01.
03
CONNECT GEMINI

Give n8n access to Gemini

Gemini is needed for the next workflow, so add its key now.

  1. Create a Gemini API key in Google AI Studio.
  2. In n8n, create a new Google Gemini API credential.
  3. Paste the key, save it, and run the connection test.
Keep it privateNever put the API key inside a prompt, webhook URL, Airtable field, or downloadable workflow.
04
COPY WORKFLOW

Import Step 2

NEW N8N WORKFLOW

In n8n, create a blank workflow. Open its menu, choose Import from URL, paste the hosted URL below, and import it.

HOSTED WORKFLOW URL/downloads/workflows/step-2-adapt-copy.json
  1. Select the Airtable and Gemini credentials you made in cards 02 and 03.
  2. In Update record, choose your Airtable base and table.
  3. In Analyse reference image, replace every placeholder with your voice, product facts, approved offers, and claims you never want made.
  4. Open Webhook, activate the workflow, and copy its production URL. Webhook guide →
Do not skip the promptThe included business facts are examples. Replace every one before testing.
05
FIRST BUTTON + FIRST APPROVAL

Generate and approve the copy

Edit Airtable’s Generate script button. Choose “Open URL” and paste this formula. Replace the domain with your production webhook URL.

"https://YOUR-N8N-DOMAIN/webhook/adapt-ad-copy?id=" & RECORD_ID() & "&image=" & ENCODE_URL_COMPONENT({Image URL})
  1. Add one row with a public image URL. Test the URL in a private browser window.
  2. Click Generate script. n8n should fill Script and set the status to Script generated.
  3. Read every word. Fix weak copy or wrong facts, then change the status to Script approved.
06
IMAGE PLAN WORKFLOW

Import Step 3

NEW N8N WORKFLOW

Create another blank workflow. Choose Import from URL and paste this hosted URL. This workflow reads the design and creates the image plan.

HOSTED WORKFLOW URL/downloads/workflows/step-3-create-director-json.json
  1. Select your existing Gemini and Airtable credentials. Choose the same base and table in Update record.
  2. Activate the workflow and copy the production URL from Webhook.
  3. Set Airtable’s Generate JSON button to open this formula:
"https://YOUR-N8N-DOMAIN/webhook/create-ad-image-plan?id=" & RECORD_ID() & "&script=" & ENCODE_URL_COMPONENT({Script}) & "&image_style=" & ENCODE_URL_COMPONENT({Image URL})
Expected resultThe JSON field should contain one clean object with the scene, layout, style, camera, lighting, and exact text.
07
SECOND APPROVAL

Read the image plan

JSON looks technical, but you only need to answer five simple questions.

Are the words exactly right?Are the product and price facts true?Is the main content away from screen edges?Were the other brand’s logo and product removed?Does the new scene feel like your brand?
Your approval buttonThe next Airtable button is the approval. Only click “Generate image” when all five answers are yes.
08
CONNECT GOOGLE DRIVE

Choose where finished ads live

Google Drive only comes into the final workflow, so connect it now.

  1. Create or choose the Google Cloud OAuth app you will use with n8n.
  2. In n8n, create a Google Drive OAuth2 API credential and copy n8n’s redirect URL into Google Cloud.
  3. Sign in, allow Drive access, save, and run the connection test.
Connected whenThe Google Drive node can open the folder picker and show the folder for your finished ads.
09
IMAGE WORKFLOW

Import Step 4

NEW N8N WORKFLOW

Create the third blank workflow. Choose Import from URL and paste this hosted URL. This one creates and saves the image.

HOSTED WORKFLOW URL/downloads/workflows/step-4-generate-image.json
  1. Select the Gemini, Drive, and Airtable credentials you already connected.
  2. Choose the Drive folder where finished ads should be saved. Choose your Airtable base and table.
  3. Activate the workflow. Use its production URL in the Generate image Airtable button:
"https://YOUR-N8N-DOMAIN/webhook/create-final-ad?id=" & RECORD_ID() & "&image=" & ENCODE_URL_COMPONENT({Image URL}) & "&json=" & ENCODE_URL_COMPONENT({JSON})
10
FULL TEST

Run one ad end to end

Add an image URLGenerate scriptApprove copyGenerate JSONApprove planGenerate image

Confirm that Attachments contains the new image and final_image contains its Drive link.

Before publishingRead every word on the final image. Check the claim, price, product, logo, crop, and whether the result is genuinely original.
05Build with AI

Give the build
to your coding agent.

It can prepare, customize, validate, and import the workflows. You still handle private logins and approve the final changes.

1
Open a fresh folder

Start a new Codex task inside it.

2
Paste the build brief

Codex prepares the files and importer.

3
Approve the safe writes

You remain in charge of n8n and OAuth.

CODEX CAN HANDLE

Workflow fetching · brand customization · importer code · validation · safe test plan

YOU STILL HANDLE

Secrets · OAuth sign-in · network-write approval · final creative review

BUILD BRIEF FOR CODEX
Build the “inspiration ad to original brand ad” automation for me.

SOURCE OF TRUTH
- Guide: {{SITE_ORIGIN}}/automations/inspiration-image-to-original-ad
- Copy workflow: {{SITE_ORIGIN}}/downloads/workflows/step-2-adapt-copy.json
- Image-plan workflow: {{SITE_ORIGIN}}/downloads/workflows/step-3-create-director-json.json
- Image workflow: {{SITE_ORIGIN}}/downloads/workflows/step-4-generate-image.json

HOW TO WORK
1. Read the guide and all three JSON files before changing anything.
2. Create an AGENTS.md with this plan, the manual approval points, and the rule that secrets must never enter source files or chat.
3. Ask me only for non-secret brand context: brand name, product, audience, voice, approved facts/offers, forbidden claims, and desired Drive folder name.
4. Create a local .env.example containing only N8N_BASE_URL, N8N_API_KEY, AIRTABLE_BASE_ID, AIRTABLE_TABLE_ID, and GOOGLE_DRIVE_FOLDER_ID. Tell me to put real values in .env myself. Never print or commit them.
5. Fetch the three hosted workflows. Replace brand placeholders, neutral webhook paths, Airtable placeholders, and the Drive folder placeholder. Preserve both manual approvals.
6. Create a small TypeScript importer that can send the three workflows to my n8n instance when N8N_BASE_URL and N8N_API_KEY are present. Keep every imported workflow inactive.
7. Validate every workflow, scan for secrets and old brand references, and show me a clear diff of prompt changes.
8. Ask for confirmation immediately before calling my n8n instance. Do not create credentials, activate workflows, or publish ads automatically.
9. After import, walk me through the OAuth and credential screens I must complete myself, then help me run one safe test row from start to finish.

DONE MEANS
- Three inactive workflows exist in n8n.
- Airtable and Drive placeholders are mapped.
- Brand prompts contain only facts I approved.
- Copy approval and image-plan approval remain manual.
- One test reaches Airtable and Drive without exposing a secret.

Start by summarizing the plan and asking me for the non-secret brand context.
Codex getting started ↗
06Need help?
Prateek Mallapur
ASK A HUMAN

Stuck somewhere?

Tell me which card you are on, what you expected, and what happened instead. A screenshot of the n8n run helps too.

Message hi@prateekm.com