# Create a campaign image and caption for review

Generate one original PNG from an approved visual brief, save it to Google Drive, and add its caption and review notes to Google Sheets.

**Category** Marketing · Content Creation  
**Tools** n8n, OpenAI image generation, Google Drive, Google Sheets, n8n Data Tables  
**Trigger** Authenticated POST from an internal content queue or form  
**Proposed catalog URL** https://uptune.io/templates/campaign-image-and-caption  
**Package** [Workflow JSON](campaign-image-and-caption.n8n.json) · [Test payloads](test-payloads.json) · [Validation report](validation-report.txt)

Import the workflow in n8n and run **Run with sample data**. The workflow imports inactive with **dryRun** enabled. The sample stays inside n8n and uses fictional data.

## How it works

1. Read the approved campaign message, target channel, visual direction, and palette. Draft a caption and prepare the image prompt.
2. Generate a PNG, check the response format, and upload the file to the configured Google Drive folder.
3. Save the caption, image link, and review notes as **Needs review** in Google Sheets.

## How to use

1. Create a Data Table for this workflow with text columns **event_key**, **status**, **detail**, and **result_id**. Create a Google Sheets tab named **Campaign Asset Queue** with **Request ID, Campaign, Channel, Caption, Image URL, Review Notes, Status**. Set Request ID to plain text.
2. In **Setup**, enter the Data Table ID, spreadsheet ID, and Drive folder ID. Leave **driveId** as **My Drive** for a personal drive or set the shared drive ID. Choose a supported image model and size. The default is **gpt-image-1** at **1024x1024**.
3. Attach OpenAI bearer **Header Auth** credentials to the caption and image nodes. Connect Google Drive OAuth2 on the upload node and Google Sheets OAuth2 on the queue node. Use a Drive folder with the correct reviewer permissions.
4. Set a separate private inbound **Header Auth** credential. POST **requestId**, **campaignName**, **channel** (LinkedIn, Instagram, or Facebook), **visualDirection**, **approvedMessage**, **palette**, and **approved** set to true. The response acknowledges receipt.
5. The sample shows the prompt and caption. In staging, disable dry run and submit a fictional campaign to generate one test image. Review the crop and check the caption against the approved message. Add alt text after reviewing the finished image.

## Test and operate

- Unapproved briefs and invalid sizes stop before the image request.
- If a run stops at **asset_pending**, check the stored Drive ID or look for the generated filename before retrying. Recover the caption from the failed execution if the file uploaded and the sheet write failed.
- Keep one request per revision in flight. A live run uses a paid image API call.
- Review the generated asset for unintended logos, lettering, or inaccurate details before publishing.

[n8n source by Mustafa Kendigüzel](https://n8n.io/workflows/2803-generate-instagram-content-from-top-trends-with-ai-image-generation/) · [OpenAI Images API](https://platform.openai.com/docs/api-reference/images/create)
