{
  "name": "Store AI chat conversations with OpenAI GPT-4.1-mini and Pinecone",
  "nodes": [
    {
      "id": "d85a5354-ce56-4ea2-8d40-9c772f7d22c1",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1248,
        816
      ]
    },
    {
      "id": "e2f52b9b-d77e-4abe-baa5-66d724f1e138",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1248,
        1056
      ]
    },
    {
      "id": "416735b3-c8e9-4546-be09-a6a4a352df6b",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        784,
        720
      ],
      "parameters": {
        "width": 1344,
        "height": 576,
        "content": "## AI Chat Agent with Database History Logging"
      }
    },
    {
      "id": "e648c838-8f21-41ee-8091-a4536e149c8f",
      "name": "Chat input",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "position": [
        848,
        816
      ]
    },
    {
      "id": "4ba50df2-022a-4cce-a33c-b3651489b26c",
      "name": "Get context from Assistant",
      "type": "@pinecone-database/n8n-nodes-pinecone-assistant.pineconeAssistantTool",
      "position": [
        1456,
        1024
      ]
    },
    {
      "id": "b62f3294-cea5-41bd-965f-c7822af5aabf",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        128,
        1904
      ],
      "parameters": {
        "width": 1088,
        "height": 736,
        "content": "## Who is this for?\nThis workflow is designed for developers and businesses building AI-powered chat applications who need to track and store conversation history. It's ideal for:\n\n* Customer support "
      }
    },
    {
      "id": "d521cc58-35ea-4cbf-8aa0-e1f5b8c0dfa7",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        128,
        608
      ],
      "parameters": {
        "width": 592,
        "height": 608,
        "content": "## Setup Requirements\n\n### Prerequisites\n\n* A [Pinecone account](https://app.pinecone.io/) and [API key](https://app.pinecone.io/organizations/-/projects/-/keys)\n* An [OpenAI account](https://auth.ope"
      }
    },
    {
      "id": "abec7d7e-6ea5-4883-b288-a9acd3c133b5",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        128,
        1264
      ],
      "parameters": {
        "width": 592,
        "height": 576,
        "content": "## How to customize this workflow\n\n### Database Integration\n* Replace the POST endpoint URL with your database API (Supabase, Airtable, Firebase, etc.)\n* Modify the \"Formatting Answers\" node to match "
      }
    },
    {
      "id": "ce38f4ba-4773-4064-abd6-ed99be873e74",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1584,
        464
      ],
      "parameters": {
        "width": 528,
        "height": 240,
        "content": "## Related Resources\n\n### Video Tutorial\n[Setup So Easy It Feels Like Cheating: NEW Pinecone Assistant with n8n](https://youtu.be/ZWBn_OxellE)\n\n### Example App\n[Lovable Prompt for App Reviewer](https:"
      }
    },
    {
      "id": "7b331760-ded2-424e-8246-eb16b220bc9d",
      "name": "Posting Responses to DB",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1632,
        816
      ]
    },
    {
      "id": "dc08fda1-e711-4f81-b2f9-12f15183aa01",
      "name": "Formatting Answers",
      "type": "n8n-nodes-base.set",
      "position": [
        1888,
        816
      ]
    }
  ],
  "connections": {
    "AI Agent": {
      "main": [
        [
          {
            "node": "Posting Responses to DB",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Chat input": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Posting Responses to DB": {
      "main": [
        [
          {
            "node": "Formatting Answers",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get context from Assistant": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    }
  }
}