Help Configuring AI Agent

,

If your question hasn’t been asked before, please follow the template below. Skip the questions that are not relevant to you. →

Describe the problem/error/question

I need help configuring the AI Agent. I am trying to collect answers to 4 questions before creating a Pagerduty incident. The AI Agent works fine until I connect the PagerDuty node. Once I do that the AI Agent does not prompt the questions and goes straight to the pagerduty node.

Please share your workflow


  "name": "My workflow 2",
  "nodes": [
    {
      "parameters": {
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "typeVersion": 1.1,
      "position": [
        0,
        0
      ],
      "id": "f511c47f-327f-48f4-a213-53cf5fbed8a8",
      "name": "When chat message received",
      "webhookId": "329386f0-c3c2-4a6f-a880-ef39a6f3f103"
    },
    {
      "parameters": {
        "options": {
          "systemMessage": "\nmarkdown\nCopy\nEdit\nYou will collect four pieces of information from the user.\n\n**Ask one question at a time—in this order:**\n1. “Who is the IM for this major incident?”\n2. “What is a short description of the issue?”\n3. \"What is the ServiceNow Ticket number?”\n4. \"Would you like to notify It Leadership of the issue?\"\n\nAfter the final answer, output **ONLY** a JSON object matching the schema exactly."
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 1.9,
      "position": [
        220,
        0
      ],
      "id": "dc85e8f8-0cab-448e-928f-ce9b5bf97f0a",
      "name": "AI Agent"
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini"
        },
        "options": {
          "responseFormat": "text"
        }
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.2,
      "position": [
        160,
        220
      ],
      "id": "721d95ff-751e-4366-a571-ae9e0b578ba6",
      "name": "OpenAI Chat Model",
      "credentials": {
        "openAiApi": {
          "id": "mRf3oLWIjuDMvd3b",
          "name": "OpenAi account"
        }
      }
    },
    {
      "parameters": {
        "contextWindowLength": 1
      },
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "typeVersion": 1.3,
      "position": [
        300,
        220
      ],
      "id": "b7afed1c-e0ab-49aa-8a71-a86e54c04223",
      "name": "Simple Memory"
    },
    {
      "parameters": {
        "rules": {
          "values": [
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "leftValue": "={{ $(\"AI Agent\").item.json.IM }}",
                    "rightValue": "",
                    "operator": {
                      "type": "string",
                      "operation": "exists",
                      "singleValue": true
                    },
                    "id": "7adfec4a-8ad4-4078-b8b4-2a2296e8265d"
                  }
                ],
                "combinator": "and"
              }
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.switch",
      "typeVersion": 3.2,
      "position": [
        560,
        0
      ],
      "id": "44a2eea7-ef31-4b2b-b21b-2166be6d0945",
      "name": "Switch"
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        740,
        0
      ],
      "id": "ccc41e36-9e47-437f-8f99-af17e1286e7c",
      "name": "Edit Fields",
      "disabled": true
    },
    {
      "parameters": {
        "operation": "get",
        "incidentId": "f"
      },
      "type": "n8n-nodes-base.pagerDuty",
      "typeVersion": 1,
      "position": [
        960,
        0
      ],
      "id": "4c47cfae-8058-4b09-a267-cade1973008b",
      "name": "PagerDuty",
      "credentials": {
        "pagerDutyApi": {
          "id": "ioIC3LK5fJ8Kf7uP",
          "name": "PagerDuty account"
        }
      }
    }
  ],
  "pinData": {},
  "connections": {
    "When chat message received": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Switch": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields": {
      "main": [
        [
          {
            "node": "PagerDuty",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "88ecda44-44d0-4001-bdde-b5b42bad3cec",
  "meta": {
    "templateCredsSetupCompleted": true,
    "instanceId": "3d240d1dd98deacaee542330e6b3920e174c9d4ce0955ae1bd5c9f415603a167"
  },
  "id": "a8YKMSFjV9b0aT3m",
  "tags": []
}


## Information on your n8n setup
- **n8n version: 1.90.2 Cloud
-