Build a daily Instagram AI agent with Venice and n8n
This guide shows how to build an n8n workflow that uses Venice AI to generate an image, write a caption, and auto-post on-brand content to Instagram every day, with daily API credits that refresh for free when you stake the DIEM token.
- How to import and run a complete Instagram posting workflow in n8n
- How to connect Venice AI to OpenAI-style nodes by swapping the base URL
- Why staking DIEM gives you refreshing daily inference credits
- How to set up Cloudinary hosting and the Facebook Graph API for publishing
- How to feed brand knowledge and prompts to control image and caption output
What the workflow does and how to import it
This workflow runs once a day, generates an image, writes a caption, and posts on-brand content to your Instagram automatically. After an upfront investment, the daily API credits to run it can refresh for free.
You will need n8n. The simplest route is the hosted option at naden.io for $20 a month, but you can also run it cheaper on Hostinger or self-host on a Cloudron instance. Once you are logged in, create a new workflow, click the three-dot menu, and import the JSON template linked in the video. The full workflow will then appear on your own n8n instance, ready to configure.
A walkthrough of the live workflow
The workflow normally triggers every day at 9:00 a.m., but you can click Execute Workflow to run it on demand and watch each step.
The chain runs in order: an AI agent using Venice Large develops the post idea from a Google Doc that holds the brand voice and strategy, then sends the image prompt to Venice using the HiDream model to generate the image. The workflow converts the image to JPEG, uploads it to Cloudinary for hosting, retrieves the hosted URL, generates a caption with Venice Small, prepares everything for Instagram, and publishes directly. If the post succeeds, it sends an email confirming the job is done.
Why Venice, and how DIEM credits work
There are two reasons to use Venice here instead of OpenAI. First, HiDream is a high-quality open-source image model that is on par with many corporate models for most cases. Second, the Venice API lets you pay two ways: buy credits with a credit card for a USD balance, or stake the DIEM token and receive $1 of API credit per DIEM staked every day.
A single post costs only a few cents per day for the image and caption. By staking DIEM, those credits refresh daily, so you are not paying that few cents over and over. In the Venice token dashboard you connect your wallet, stake a fraction of a DIEM, and receive enough daily inference credits to keep a brand account posting.
Connecting Venice AI inside n8n
Venice is fully compatible with the OpenAI API, which is what makes this work inside n8n's OpenAI-style nodes.
Generate a new API key in Venice and copy it. Inside any OpenAI node in the workflow, add a credential and paste your Venice API key as an OpenAI credential, but change the base URL so it points to Venice instead of OpenAI. The template already has the Venice base URL filled in. Repeat this so the idea agent, the generate image node, and the generate caption node all use your Venice credential.
Setting up Cloudinary for image hosting
Cloudinary hosts the generated image and returns a URL that Instagram can use. Sign up for a free account, generate an API key from the dashboard, and find your cloud name on the same page. Paste both into the "upload JPEG to Cloudinary" node.
Back in the Cloudinary dashboard, click Upload and add an upload preset named Instagram automation, keep it unsigned, and create a new folder called Instagram post to store the images. Make sure the cloud name, preset, and folder in n8n match exactly what you set in Cloudinary.
Getting the Facebook Graph API working
This is the hardest part of the build. The AI steps are easy; the Meta Business Suite is the cumbersome piece, but it is doable.
First, make sure your Facebook page and Instagram account are both under the same business portfolio so they are connected. Then go to developers.facebook.com/apps and create a new app with a name and email. Open Tools, then Graph API Explorer, select your app, and generate an access token with at least the instagram_content_publish and instagram_basic permissions.
Copy that token, then go to Tools and open the Access Token Debugger. Paste the token and click Extend Access Token, otherwise it expires in a couple of hours. Extending gives you a token that lasts 60 days. Copy the long-lived token into your Facebook Graph API credential in n8n and confirm it connects.
Finding your Instagram business account ID is also awkward, since you cannot easily get it from Meta Business Suite. The template includes a small helper workflow: click play through its steps to retrieve the ID, then paste it into the Instagram business account ID parameter. Everything after that is automated. The email node is optional, you can swap it for Mailgun or Telegram, or delete it entirely.
Customizing the agent for your brand
The output quality depends on what you feed the agent. The Venice Large idea agent has a Google Docs node attached as a tool, pointed at a file ID. That document holds the brand's knowledge base: a style guide, writing guide, content pillars, and messaging framework, so the agent understands the audience and value propositions before it generates a post.
In the prompt itself, the agent is told to respond with JSON containing the image prompt, and it includes image styles, hex color values, a main character description, and a 7-day daily theme rotation. You can keep this simple ("generate an image about boxing") or go highly detailed. The caption node carries its own content strategy: voice and personality notes, tone per daily theme, length suggestions, and things to avoid.
The more detail and knowledge you provide, the more on-brand the images and captions become, with the right colors and rotating hashtags. The result is an agent that runs daily with or without your input, and because it runs on Venice, the credits refresh each day so you pay nothing extra after acquiring DIEM.
Key takeaways
- Import the JSON template into n8n and the whole image, caption, and posting chain is prebuilt for you.
- Venice connects through OpenAI-style nodes by pasting your API key and swapping the base URL to Venice.
- Staking DIEM gives you daily refreshing credits, so a daily posting agent costs effectively nothing to run after setup.
- The Meta Graph API is the tricky part: extend your access token to 60 days and use the helper workflow to find your Instagram business account ID.
- 131votes
- 76votes
- 58votes
Adapted from the @askvenice video on YouTube. Models and prices change fast; verify current details in Venice before production use.