n8n Workflow Builder Ai

Generate n8n workflow & node JSON using AI (OpenAI & Google Gemini) directly in your browser!

An open-source Chrome Extension designed to help n8n users quickly generate JSON configurations for workflows or individual nodes based on natural language prompts. This extension leverages the power of OpenAI (GPT models) or Google Gemini, using your own API keys, making the extension itself free to use.

FAQs

No, this is an independent, third-party extension created to assist n8n users. It utilizes official APIs from AI providers but is not developed or endorsed by n8n GmbH.

  1. Install the extension from the Chrome Web Store.
  2. Click the extension icon in your browser toolbar.
  3. Go to the "Settings" tab and enter your API key(s) for OpenAI and/or Google Gemini. Select your preferred AI models and click "Save Settings".
  4. Go to the "Generate" tab.
  5. Select the AI Provider you want to use (whose key you entered).
  6. In the "Describe the node or workflow" text area, clearly explain what you want to build (e.g., "Webhook trigger, get data from Google Sheet row based on webhook query parameter 'id', then update an Airtable record").
  7. Click the "Generate n8n JSON" button.
  8. Wait for the AI to respond. The generated JSON will appear in the "Generated JSON" text area.
  9. Click the "Copy" button next to the output area.
  10. Go to your n8n canvas and paste (Ctrl+V or Cmd+V).

The extension uses powerful AI models from OpenAI (like GPT-4o-mini, GPT-4) or Google (Gemini models) to understand your request and generate the JSON. Accessing these models requires an API key from the respective provider. The extension makes API calls directly from your browser to the AI provider using your key.

  • OpenAI: You need an account with OpenAI. API keys can be generated in your account settings on the OpenAI Platform website (https://platform.openai.com/). Note that using the OpenAI API usually incurs costs based on usage.

 

  • Google Gemini: You need a Google AI Studio API key. These can be generated via Google AI Studio (https://aistudio.google.com/app/apikey) or the Google Cloud Console if you are using Vertex AI. Usage may also incur costs depending on the model and usage tiers.

Your API keys are stored locally in your browser's secure storage (chrome.storage.local). They are not sent to any server other than the official OpenAI or Google API endpoints when you click "Generate". They are not shared with the extension developer or any other third party. However, like any browser extension data, it's important to be aware of the general security implications of storing sensitive information in the browser.

The model dropdowns are populated dynamically after you enter and save a valid API key for the respective provider (OpenAI or Gemini). If the key is missing, invalid, or the extension fails to fetch the models list from the provider's API, the dropdown will remain disabled or show an error message. Ensure your key is correct and saved, and check the status message in the Settings tab for errors.

  • Be as clear and specific as possible.
  • Mention Services: If you want to interact with specific services (like Google Sheets, Slack, Airtable), mention them by name.
  • Describe the Flow: Explain the sequence of steps (e.g., "Trigger on webhook, then get data from X, then filter based on Y, then send to Z").
  • Specify Logic: Briefly explain any conditions (IF/SWITCH), data transformations (SET/FUNCTION), or filtering (Item Lists) needed.
  • Keep it Focused: For complex workflows, you might get better results by generating smaller sections first and combining them manually.
  • • • Use n8n Terminology (Optional but helpful): Mentioning "Set node", "HTTP Request node", "Item Lists node" can sometimes guide the AI better, but the prompt is designed to map generic actions too.

Yes. Just describe the single node you need, for example: "A Set node that extracts the 'name' and 'email' fields from the input" or "An HTTP Request node to GET data from example.com/api/users".

  • This is the most common challenge. AI models, while powerful, are not perfect and sometimes make mistakes generating complex, strictly structured code like n8n JSON. Common reasons for errors include:
  • Incorrect Node Type: The AI might invent a node type (e.g., "Extract Data") instead of using a standard one (like "n8n-nodes-base.set"). The extension's prompt strongly instructs the AI against this, but it can still happen.
  • Invalid connections Structure: The way nodes are linked might be formatted incorrectly (the prompt heavily emphasizes the correct [[{...}]] structure to minimize this).
  • Incorrect Parameters: The parameters within a node might be missing required fields or have incorrect values/expressions for the chosen node type and version.
  • Unknown Node Version: The AI might specify a typeVersion for a standard node that doesn't exist in your version of n8n.
  • Malformed JSON: Less common, but the AI might produce fundamentally invalid JSON (e.g., missing commas, brackets). The extension tries to parse and prettify the JSON, which helps catch some of these errors.
  • • • Also try 2-3 times, if the given workflow is not working properly
  • Refine Your Prompt: Try making your request simpler or more explicit about the desired steps and standard nodes.
  • Try a Different Model: A more capable AI model (if available) might produce better results.
  • Inspect the JSON: Look at the JSON output in the extension. Compare the structure, node type fields, and connections to valid n8n workflows. You might be able to spot and fix the error manually before copying.
  • Check Node Types: Ensure all "type" fields correspond to actual, standard n8n nodes (e.g., "n8n-nodes-base.set", not "Set Data"). If you see an invented type, you know the AI failed to follow instructions – try regenerating or manually changing it to the correct standard node (like n8n-nodes-base.set or n8n-nodes-base.function).
  • Generate Smaller Pieces: Break down your workflow and generate JSON for smaller sections or individual nodes.
  • Check Key: Double-check that the API key entered in the Settings tab is correct and hasn't expired or been revoked. Ensure there are no extra spaces.
  • Check Billing: Ensure your OpenAI/Google account has billing set up correctly if required, and you haven't exceeded free quotas or spending limits.
  • Rate Limits: You might be making requests too quickly. Wait a moment and try again. Check the API provider's documentation for rate limits associated with your account tier.
  • Save Settings: Make sure you clicked "Save Settings" after entering the key.

This usually means the specific model selected in the dropdown is not available to your API key or doesn't exist under that exact name. Try selecting a different model from the dropdown (especially one of the recommended ones) and ensure your settings are saved.

This can depend on the complexity of your prompt, the current load on the AI provider's servers, and the chosen AI model. Try simplifying your prompt or using a potentially faster model (like OpenAI's gpt-4o-mini or Gemini's gemini-1.5-flash-latest).

The AI might have misunderstood the prompt, or a safety filter might have blocked the response. Try rephrasing your prompt clearly and simply. Check the status message for any specific errors reported by the API call function.

Your prompt text is sent directly to the selected AI provider (OpenAI or Google) via their official API, using your API key. It is processed according to their respective privacy policies. The prompt data is not stored or shared by the extension itself or its developer.

As mentioned before, your API keys are stored locally in your browser and are only sent directly to the official API endpoints of OpenAI or Google when you initiate a generation request. They are not shared elsewhere.

Yes, this is an open-source project, and contributions are welcome! If you find a bug, have a feature request, or want to improve the code, please check out the repository: https://github.com/farhansrambiyan/n8n-Workflow-Builder-Ai

How to Contribute:

  • Open an Issue: It's best to discuss the change you wish to make via a GitHub issue first, especially for significant changes.
  • Fork the Repository: Create your own copy (fork) of the project on GitHub.
  • Create a Branch: Make your changes in a dedicated branch within your fork (e.g., git checkout -b feature/YourAmazingFeature or bugfix/FixNodeTypeError).
  • Commit Changes: Make clear, concise commits explaining the changes you've made.
  • Push to Your Branch: Push your changes up to your forked repository on GitHub.
  • Open a Pull Request: Submit a pull request from your branch back to the main farhansrambiyan/n8n-Workflow-Builder-Ai repository for review.

Please ensure your code follows basic formatting standards and includes comments where necessary to explain complex logic.