Social Media Image Publisher
An AI-powered social media image creator that discovers your stored brand assets, generates on-brand visuals using Gemini image models, and publishes them to your social channels via Buffer — all in one agentic workflow.
The Social Media Image Publisher blueprint combines three powerful capabilities into a single agentic workflow: brand asset management via space storage, AI image generation via Gemini, and social media publishing via Buffer.
Most social media image workflows require juggling multiple tools — a design tool for creation, cloud storage for assets, and a scheduler for publishing. This blueprint collapses all three into a single conversational interface where you describe what you want and the agent handles the rest.
Brand Assets via Space Storage
The agent's first action is always to discover and study what brand assets are available in space storage. This might include a background/base template, style guides for characters or mascots, reference sample compositions, and any other visual assets your brand uses. By reading these before generating anything, the agent ensures every image is consistent with your visual identity.
Four space storage abilities support this workflow:
- List Space Storage Files — discovers all files available in the space, giving the agent full visibility into your brand asset library.
- Get Space Storage File Link — fetches a fresh presigned URL for any file, since URLs expire and must be refreshed on every use.
- Import URL to Space Storage — pulls external assets (like reference images or new style guides) directly into the space for future use.
AI Image Generation via Gemini
Two image abilities power the actual creation:
- Generate Image — creates a new image from a text prompt using the Gemini Flash Image model. Used for images that don't require a base layer.
- Modify Image — composites new elements onto an existing image using Gemini Flash. This is the primary tool for branded posts, since it takes the brand's base template as input and builds the finished image on top of it.
The agent is instructed to write image prompts as structured JSON, which produces more reliable, repeatable results than free-form text prompts. Each prompt precisely specifies the base image, character details, text content, layout, and style rules — giving the model clear, unambiguous instructions.
Social Media Publishing via Buffer
Three Buffer abilities handle the distribution side:
- List Buffer Organizations — identifies the authenticated Buffer account and its organizations.
- List Buffer Channels — retrieves all connected social accounts (LinkedIn, Twitter/X, Instagram, etc.) for a given organization.
- Create Buffer Post with Image — publishes the generated image to the selected channel immediately or schedules it automatically.
Getting Started
To use this blueprint with your own brand:
- Upload your brand assets (background template, style guides, reference samples) to a space via the Space File Browser.
- Connect your Buffer account by adding the Buffer API key as a secret.
- Tell the bot what you want to post — topic, message, or campaign — and let it discover your assets, generate the image, and publish it.
The agent's backstory is a starting framework. Customize it with your specific brand guidelines, approved character styles, typography rules, and any other visual constraints that define your brand identity.
Backstory
Common information about the bot's experience, skills and personality. For more information, see the Backstory documentation.
Skillset
This example uses a dedicated Skillset. Skillsets are collections of abilities that can be used to create a bot with a specific set of functions and features it can perform.
Generate Image
Generate an image using the Gemini 3.1 Flash Image model with Pro-level visual quality at Flash speed.Modify Image
Create a new image from previous input images using the Gemini 3.1 Flash Image model.Get Space Storage File Link
Get a public link (presigned URL) to access a file in space storageList Space Storage Files
List all files in a specific space directoryImport URL to Space Storage
Import a file from a URL into space storageList Buffer Organizations
Retrieve all organizations associated with the authenticated Buffer account, including IDs, names, and owner emailsList Buffer Channels
Retrieve all channels (social accounts) for a specific Buffer organization, including network service, avatar, and queue statusCreate Buffer Post with Image
Publish a post with an attached image to a Buffer channel immediately or schedule it automatically
Secrets
This example uses Secrets to store sensitive information such as API keys, passwords, and other credentials.
Buffer API Key
The API key for accessing Buffer to manage and publish social media posts.
Terraform Code
This blueprint can be deployed using Terraform, enabling infrastructure-as-code management of your ChatBotKit resources. Use the code below to recreate this example in your own environment.
A dedicated team of experts is available to help you create your perfect chatbot. Reach out via or chat for more information.