AutomationFlowsAI & RAG › Agent:planandexecute

Agent:planandexecute

Agent:PlanAndExecute. Uses lmChatOpenAi, toolCalculator, agent. Event-driven trigger; 4 nodes.

Event trigger★★☆☆☆ complexityAI-powered4 nodesOpenAI ChatTool CalculatorAgent
AI & RAG Trigger: Event Nodes: 4 Complexity: ★★☆☆☆ AI nodes: yes Added:

This workflow follows the Agent → OpenAI Chat recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "createdAt": "2024-03-04T20:32:15.867Z",
  "updatedAt": "2024-03-13T13:43:09.000Z",
  "id": "239",
  "name": "Agent:PlanAndExecute",
  "active": false,
  "nodes": [
    {
      "parameters": {
        "model": "gpt-4-turbo-preview",
        "options": {
          "temperature": 0
        }
      },
      "id": "9ecb9fc6-c634-4915-ae30-f4a40679200c",
      "name": "OpenAI Chat Model3",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1,
      "position": [
        1020,
        760
      ],
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "notes": "IGNORED_PROPERTIES=messages"
    },
    {
      "parameters": {},
      "id": "28f13be4-fc17-4e04-8518-bf98272ea7b7",
      "name": "Calculator3",
      "type": "@n8n/n8n-nodes-langchain.toolCalculator",
      "typeVersion": 1,
      "position": [
        1180,
        780
      ]
    },
    {
      "parameters": {},
      "id": "ebd19bad-5412-4e5b-9cbc-92d85e98f517",
      "name": "When clicking \"Test workflow\"",
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        760,
        620
      ]
    },
    {
      "parameters": {
        "agent": "planAndExecuteAgent",
        "promptType": "define",
        "text": "What is the result of 30 + (10002200 / 100)? Only respond with a number.",
        "options": {}
      },
      "id": "1b397e30-5061-44dd-b6fc-c7100c8c791d",
      "name": "AI Agent3",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 1.4,
      "position": [
        1000,
        620
      ]
    }
  ],
  "connections": {
    "OpenAI Chat Model3": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent3",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Calculator3": {
      "ai_tool": [
        [
          {
            "node": "AI Agent3",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "When clicking \"Test workflow\"": {
      "main": [
        [
          {
            "node": "AI Agent3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "staticData": null,
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "versionId": "d420104e-1ac2-45a5-b173-e97a7726178f",
  "triggerCount": 0,
  "tags": []
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

Agent:PlanAndExecute. Uses lmChatOpenAi, toolCalculator, agent. Event-driven trigger; 4 nodes.

Source: https://github.com/n8n-io/test-workflows/blob/c1d376431a818f81f44e9ce645b8fb4878805419/workflows/239.json — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

QuantumDefender AI is a next-generation intelligent cybersecurity assistant designed to harness the symbolic strength of quantum computing’s promise alongside cutting-edge AI capabilities. This sophis

OpenAI Chat, Agent, Memory Buffer Window +7
AI & RAG

Slack-Ai-Assistant. Uses agent, lmChatOpenAi, memoryBufferWindow, slackTrigger. Event-driven trigger; 13 nodes.

Agent, OpenAI Chat, Memory Buffer Window +9
AI & RAG

05B-Sub: Finance Calculator. Uses executeWorkflowTrigger, agent, lmChatOpenAi, toolCalculator. Event-driven trigger; 10 nodes.

Execute Workflow Trigger, Agent, OpenAI Chat +2
AI & RAG

Whatsapp Test. Uses whatsAppTrigger, agent, lmChatOpenAi, memoryBufferWindow. Event-driven trigger; 8 nodes.

WhatsApp Trigger, Agent, OpenAI Chat +5
AI & RAG

Telegram1. Uses telegramTrigger, agent, lmChatOpenAi, telegram. Event-driven trigger; 7 nodes.

Telegram Trigger, Agent, OpenAI Chat +4