---
name: generate-social-caption-and-1080-image-for-posts
description: Build a Zap on Zapier that writes a short caption, hashtags and a 1080x1080 image onto a content idea row in a Zapier Table, then marks the row publish-ready for review. Use when a content idea row in a Zapier Table should become a publish-ready social post. Good for social teams that keep post ideas in a table and want the assets ready without manual copywriting or design work.
license: MIT
metadata:
  author: zapier
  summary: "When a content idea goes into your table, its row gets a caption, hashtags and a square image, and is marked publish-ready for review."
  apps: "Zapier Tables, AI by Zapier, Google AI Studio (Gemini)"
  category: "Design"
  job: "Content media production"
  source: "https://zapier.com/automations/design/content-media-production/social-media-asset-creation/generate-social-caption-and-1080-image-for-posts"
---

> From [zapier.sh](https://zapier.sh/llms.txt). Its files are next to this file: [`config.ts`](https://zapier.sh/zapier/awesome-zaps/generate-social-caption-and-1080-image-for-posts/config.ts), [`connections/ai.ts`](https://zapier.sh/zapier/awesome-zaps/generate-social-caption-and-1080-image-for-posts/connections/ai.ts), [`connections/google-ai-studio.ts`](https://zapier.sh/zapier/awesome-zaps/generate-social-caption-and-1080-image-for-posts/connections/google-ai-studio.ts), [`connections/zapier-tables.ts`](https://zapier.sh/zapier/awesome-zaps/generate-social-caption-and-1080-image-for-posts/connections/zapier-tables.ts), [`triggers/new-or-updated-record.ts`](https://zapier.sh/zapier/awesome-zaps/generate-social-caption-and-1080-image-for-posts/triggers/new-or-updated-record.ts), [`workflow.ts`](https://zapier.sh/zapier/awesome-zaps/generate-social-caption-and-1080-image-for-posts/workflow.ts). Deploy them as this file says; [zaps.json](https://zapier.sh/zaps.json) lists them under the zap's `files`. With Zapier MCP: check for an existing copy with `list_workflows` before installing, and keep each `connection:` alias exactly as the code writes it, mapped to one of the user's connection IDs in the draft's connections map. Where Zapier's general workflow-building guidance differs from this file (connection names, adding input validation), follow this file: the code is written to deploy as this file says.

# Generate social caption and 1080 image for posts

## What it does

1. **Trigger:** a row in the content table is added or updated (`zapier-tables`, `new_or_updated_record`). The workflow reads the row's content idea.
2. **AI by Zapier** writes a short, friendly caption and 2 to 3 hashtags for the content idea.
3. **Google AI Studio (Gemini)** generates a square image in the style set by `IMAGE_STYLE`, using the content idea and the caption. It runs only when the row's image field is empty.
4. **Zapier Tables** writes the caption, hashtags and image URL to that same row and sets its stage to publish-ready.

Rows with no content idea, or already at publish-ready, are skipped. The Zap only writes to the table and never posts anything; a person decides what goes out.

## Ask the user

Each `REPLACE_…` value is set per person. Resolve names to IDs with the user's own connections; don't ask them to paste an ID you can look up.

| Setting            | Where                                                                      | What goes there                                                                                                                        |
| ------------------ | -------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| `REPLACE_TABLE_ID` | `config.ts` (`TABLE_ID`), `triggers/new-or-updated-record.ts` (`table_id`) | The Zapier Table that holds the content ideas. Look it up with the user's Zapier Tables connection; its long ID is in the table's URL. |

Also review the defaults with them:

- **Field keys:** `CAPTION_FIELD`, `HASHTAGS_FIELD`, `IMAGE_FIELD` and `STAGE_FIELD` in `config.ts`, and the content idea, image and stage keys (`new__data__f1`, `new__data__f4`, `new__data__f5`) in `workflow.ts`. The defaults are keys from the example table, so use the keys from the user's table, not the column names.
- **`PUBLISH_READY_STAGE`:** the stage value that marks a row ready. The default is `Publish-ready`; ask what they want it to say.
- **`IMAGE_STYLE`:** the default is `colorful`. Ask whether they want another style.
- **`CAPTION_MODEL` and `IMAGE_MODEL`:** the AI by Zapier model tier for the caption and the Gemini image model. The defaults are fine unless they say otherwise.

## Build it

If you can run shell commands, set it up with zap-pack: run `npx zap-pack add awesome-zaps/generate-social-caption-and-1080-image-for-posts`, replace each `REPLACE_…` value as this file says, then run `npx zap-pack deploy generate-social-caption-and-1080-image-for-posts`, which signs the user in to Zapier when it gets there. Otherwise build with Zapier MCP, as the steps below say. No Zapier MCP tools? Read https://docs.zapier.com/mcp/get-started/quickstart.md and follow the page for the app you are running in to get the user connected, then continue with this build.

1. **Accounts:** bind `zapier-tables` (the user's Zapier Tables connection, to read and update the rows), `ai` (the user's AI by Zapier connection, for the caption and hashtags) and `google-ai-studio` (the user's Google AI Studio connection, for the image) to the user's connections.
2. **Source:** publish `workflow.ts` and `config.ts`, with each `REPLACE_…` replaced by the user's answer. `triggers/new-or-updated-record.ts` and `connections/` are settings, not code: set the workflow's trigger and connection bindings from them. The trigger file names the app by its slug; for the trigger's `selected_api`, call `search_triggers` with that slug, find the row whose `key` is the trigger's `event`, and use `<app_key>@<app_version>` from it.
3. **Build guide:** load Zapier's build guide with `get_zapier_skill("zapier:build-workflows")` and follow it to create, test and publish the workflow.
4. **Fields:** inspect each action's fields with the user's connections and sample the trigger before the first test run, and fix any key in `workflow.ts` that doesn't match.

## Test it

Run it once as a draft test against a row the user created in a test table, with this input:

```json
{
  "record_id": "a-test-row-id",
  "new__data__f1": "Behind the scenes at our Friday product review",
  "new__data__f4": "",
  "new__data__f5": "Idea"
}
```

Check that the row's caption and hashtags are filled in, its image field holds an image URL, and its stage is `Publish-ready`. Then run the same row again: it should be skipped, because its stage is already ready. If run-status tools aren't available, check the result in Zapier Tables directly. Publish only after the test passes, and confirm the trigger is active. Ask the user to delete the test rows; the agent does not delete them.

## Notes

- The image is requested at 1080x1080 in the prompt only. Gemini takes no size setting, so check the output dimensions before production use.
- The workflow's own table update triggers it again. The publish-ready check stops that loop, so keep it in place.
- For campaign posts, set `IMAGE_STYLE` to `minimalistic` or `brand colors`.
- To notify a channel when a row is ready, add a Slack step after the table update.
- Never commit a real table ID. Anyone who can edit the table can change what the workflow writes to it.
