Automate AI Prompt Creation with n8n & Google Gemini

Struggling to efficiently create and categorize AI prompts? This n8n workflow uses Google Gemini to generate, parse, categorize, and store AI prompts automatically, saving hours and improving prompt management.
lmChatGoogleGemini
chatTrigger
chainLlm
+3
Workflow Identifier: 2306
NODES in Use: chatTrigger, lmChatGoogleGemini, set, outputParserAutofixing, chainLlm, airtable
Automate AI prompts with n8n and Google Gemini

Press CTRL+F5 if the workflow didn't load.

Learn how to Build this Workflow with AI:

1. What this workflow does

This workflow helps automate writing, fixing, sorting, and saving AI prompts.

The main problem solved is saving time and stopping errors in prompt management.

It starts with a chat message, then creates a detailed AI prompt, fixes its format, names and groups it by topic, and finally saves it in a list.

The output is a clean, ready-to-use prompt stored in Airtable for easy use by an AI team.


2. Tools used in this workflow

  • n8n: Runs the automation with nodes.
  • Google PaLM API with Gemini Model: Generates expert AI prompts.
  • Airtable: Stores the final prompt details with category and name.

3. Inputs, processing steps, and output explained

Inputs:

  • User sends a chat message triggering the workflow.
  • API keys and config for Google PaLM and Airtable.

Processing steps:

  • When chat message received node listens for messages.
  • Google Gemini Chat Model creates a detailed AI prompt from the chat message.
  • Generate a new prompt chain guides AI to polish and structure the prompt.
  • Edit Fields node holds the prompt text for optional manual edits.
  • Auto-fixing Output Parser fixes any format errors in the prompt.
  • Categorize and name Prompt chain lets AI assign a name and a category.
  • Set prompt fields sets name, category, and prompt text for Airtable entry.
  • Add to airtable saves the prompt record.
  • Return results prepares output for user display.

Output:

A new prompt record saved with name, category, and prompt text.

Also a prompt text returned for quick user see or reuse.


4. Beginner step-by-step: How to use this workflow in n8n

Step 1: Import the workflow

  1. Download the workflow file using the Download button on this page.
  2. Open the n8n editor where you want to run the automation.
  3. Use “Import from File” option to load the downloaded workflow.

Step 2: Add credentials and update settings

  1. Add your Google PaLM API Key with Gemini Model access in the credentials of the Google Gemini Chat Model node.
  2. Check the add to airtable node and connect your Airtable API Key.
  3. Update the Airtable base ID, table name, or field names if your setup is different.
  4. If needed, update any emails, channels, or folder IDs in input nodes.

Step 3: Test the workflow

  1. Send a test chat message to trigger the When chat message received node.
  2. Watch executions to check AI prompt creation, parsing, categorization, and saving.

Step 4: Activate for production

  1. Switch the workflow from draft to active mode in n8n editor.
  2. Monitor runs regularly for any errors.
  3. If self hosting n8n, consider checking self-host n8n for stable server operation.

5. Customization ideas

  • Change AI model settings in Google Gemini Chat Model like topP for creativity or precision.
  • Modify the YAML prompt text inside the Generate a new prompt node to fit different prompt styles or roles.
  • Add an extra Structured Output Parser node if needing stricter prompt error checking before saving.
  • Save final prompts to other storages like Google Sheets or SQL by replacing the Airtable node.

6. Common problems and fixes

Authentication failed with Google PaLM API

Check if the API Key in the Google Gemini Chat Model node is correct and active.

Enter new valid keys if needed and try test run.

Airtable record not created

Ensure Airtable base ID, table names, and field mappings in the add to airtable node are correct.

Check API Key permissions and Airtable access rights.

Prompt parsing errors or malformed output

Look at Auto-fixing Output Parser settings to confirm schema and fix options.

Try adding a more strict parser node or improve AI prompt instructions.


7. Pre-production checklist

  • Send a test message to the When chat message received node and confirm it triggers.
  • Confirm Google Gemini API generates good prompts without errors.
  • Verify parsed prompts are well structured and fix any parsing issues.
  • Check Airtable storing new prompt records correctly with expected fields.
  • Run full workflow end-to-end with sample input and test output.
  • Backup Airtable data in case you do mass updates or testing.

8. Deployment tips

After testing, activate workflow in n8n so it listens live.

Monitor workflow runs and error logs in n8n UI.

Watch API usage and plan for limits based on prompt volume.

Consider cleaning or archiving old prompts in Airtable over time.


9. Summary of results

✓ Save more than 20 hours monthly by auto-managing AI prompts.

✓ Reduce errors and manual effort in prompt writing and storage.

✓ Keep a clean, searchable prompt library in Airtable for the team.

→ Easy workflow import and setup inside n8n editor.

→ Clear outputs for use in chat or automation systems.


Automate AI prompts with n8n and Google Gemini

Visit through Desktop to Interact with the Workflow.

Frequently Asked Questions

Open the Google Gemini Chat Model node in n8n, go to the Credentials tab, and enter a valid Google PaLM API Key with Gemini access.
Verify the base ID, table name, and field mappings in the add to airtable node and ensure the Airtable API Key has correct permissions.
Yes, replace the add to airtable node with a Google Sheets or database node and map the prompt data accordingly.
Yes, the workflow can be run on self-host n8n. For server setup, refer to https://buldrr.com/hosting/ for a helpful resource.

Promoted by BULDRR AI

Related Workflows

Automate Twist Channel Creation and Messaging with n8n

This workflow automates creating and updating a channel in Twist and sending a personalized message to specific users. It eliminates manual setup errors and saves time managing Twist communications.

Automate Ideogram Image Generation with Google Sheets & Gmail

This workflow automates graphic design image generation via Ideogram AI, storing image data in Google Sheets and Google Drive, with email alerts via Gmail. It saves designers hours by automating image creation, remixing, review, and record-keeping.

Automate IT Support with Slack and OpenAI in n8n

Streamline IT support by automating Slack message handling using n8n and OpenAI. This workflow handles Slack DMs, filters bots, queries a Confluence knowledge base, and delivers AI-generated responses, improving support efficiency and response time.

Automate Crypto Analysis with CoinMarketCap & n8n AI Agent

Discover how this unique n8n workflow leverages CoinMarketCap’s multi-agent AI to deliver precise, real-time cryptocurrency insights directly via Telegram. Manage crypto data analysis efficiently with automated multi-source API integration.

Automate Gumroad to Beehiiv Subscriber Sync with n8n

Learn how to automatically add new Gumroad sales customers as Beehiiv newsletter subscribers using n8n automation. This workflow saves time by syncing sales data to Google Sheets CRM and notifying your Telegram channel instantly.

Generate On-Brand Blog Articles Using n8n and OpenAI

This workflow automates the creation of on-brand blog articles by analyzing existing company content using n8n and OpenAI. It extracts article structures and brand voice to produce consistent draft articles, saving significant content creation time.
1:1 Free Strategy Session
Your competitors are already automating. Are you still paying for it manually?

Do you want to adopt AI Automation?

Every hour your team does repetitive work, you're burning real money.
While you wait, faster businesses are cutting costs and moving quicker.
AI and automations aren't the future anymore — they're the present.

Book a live 1-on-1 session where we show you exactly which of your daily tasks can be automated — and what it’s costing you not to.