This project contains an n8n workflow that automates the creation of engaging AI-generated Instagram content using Google Gemini and stores the results in a Google Sheet.
- Schedule Trigger: Runs the workflow at a scheduled interval.
- Code Node: Randomly selects a prompt for AI content generation.
- HTTP Request: Sends the prompt to Google Gemini (via API) to generate content.
- Google Sheets Node: Appends the generated content to a specified Google Sheet.
My workflow 2.json: The exported n8n workflow file.README.md: This documentation file..env.example: Example environment variable file for API keys and configuration..gitignore: Specifies files and folders to be ignored by git.
- n8n installed and running.
- Access to Google Gemini API (API key required).
- Google account with access to the target Google Sheet.
- Node.js and npm (for n8n installation, if not using Docker).
- Clone the Repository
git clone <your-repo-url> cd n8n-gemini-content-creator
- Install n8n (if not already installed)
- See the n8n installation guide for your platform.
- Set Up Environment Variables
- Copy
.env.exampleto.envand fill in your API keys and configuration:cp .env.example .env # Edit .env and add your credentials
- Copy
- Import the Workflow
- Open n8n and import
My workflow 2.json.
- Open n8n and import
- Configure Credentials in n8n
- Set up your Google Sheets and Gemini API credentials in n8n's credential manager.
- Edit the Workflow (Optional)
- Adjust prompts, scheduling, or sheet/document IDs as needed.
- Run the Workflow
- Activate the workflow to start generating and saving content.
- Do not share your API keys or sensitive credentials publicly.
- Add
.envto your.gitignoreto avoid committing secrets.
- Ensure your API keys are valid and have the necessary permissions.
- Check n8n logs for errors if the workflow does not run as expected.
- Make sure the Google Sheet is shared with the service account/email used in n8n credentials.
MIT