{
  "name": "Create comprehensive research reports with Jina AI & Gemini 2.5 Flash",
  "nodes": [
    {
      "id": "43de71f4-db4d-41aa-8294-abf2e0e984c8",
      "name": "Search web",
      "type": "n8n-nodes-base.jinaAi",
      "position": [
        20,
        40
      ]
    },
    {
      "id": "8126e0ee-8472-4f1f-8921-1e2aded6682e",
      "name": "When chat message received",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "position": [
        -300,
        40
      ]
    },
    {
      "id": "0c414f7e-d927-4a6b-a45c-412676d99986",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        700,
        40
      ]
    },
    {
      "id": "0a8274f0-7ef4-4305-a3e7-81b34cd07ddc",
      "name": "Code",
      "type": "n8n-nodes-base.code",
      "position": [
        340,
        40
      ]
    },
    {
      "id": "540cae13-9d70-47b5-9be4-902abc7d6391",
      "name": "Read URL content",
      "type": "n8n-nodes-base.jinaAi",
      "position": [
        1040,
        200
      ]
    },
    {
      "id": "e282b54c-4230-449b-ab7c-96f0566e81f2",
      "name": "Wait",
      "type": "n8n-nodes-base.wait",
      "position": [
        1980,
        180
      ]
    },
    {
      "id": "37c6d91d-526e-4c9a-a1f3-4bbba63740bd",
      "name": "Structured Output",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        1640,
        340
      ]
    },
    {
      "id": "ef58119f-ab0e-4c99-a83d-d2a0dbc0ba17",
      "name": "Transform",
      "type": "n8n-nodes-base.code",
      "position": [
        1060,
        -180
      ]
    },
    {
      "id": "154f148c-2f33-4d1d-afe2-2b75adfa16c5",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -420,
        -160
      ],
      "parameters": {
        "width": 340,
        "height": 380,
        "content": "## User query\n"
      }
    },
    {
      "id": "0bb609ef-222d-4cc6-8ffd-0145cea615f3",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -60,
        -160
      ],
      "parameters": {
        "width": 260,
        "height": 380,
        "content": "## Search web\n\n**Purpose:** Web search using Jina AI based on chat input.\n**Input:** Chat message.\n**Note:** Requires Jina AI API key."
      }
    },
    {
      "id": "01ee087c-e26c-4b8f-9f3f-9598d0cd83d3",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        220,
        -160
      ],
      "parameters": {
        "width": 320,
        "height": 380,
        "content": "## Code (URL Transform)\n\n**Purpose:** Custom JavaScript code to process/transform URLs, likely preparing them for the loop.\n**Input:** Raw URLs from \"Search web\".\n**Output:** Formatted URLs suitable f"
      }
    },
    {
      "id": "76f010e5-fc84-4066-a39a-7dd870ff9345",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        560,
        -160
      ],
      "parameters": {
        "width": 380,
        "height": 380,
        "content": "## Loop over all URLs\n\n**Purpose:** Iterates over each URL provided by the \"Code\" node.\n**Function:** Processes each URL individually for content gathering and summarization.\n**Note:** Essential for h"
      }
    },
    {
      "id": "6cdc7a5f-b488-4b72-a0da-9351c7478ea1",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        960,
        100
      ],
      "parameters": {
        "width": 260,
        "height": 480,
        "content": "## Read URL Content\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n**Purpose:** Fetches the full content of each URL provided by the loop.\n**Input:** Individual URLs from \"Loop over Items\".\n**Output:** Raw web page content.\n**"
      }
    },
    {
      "id": "0d3c40cd-733b-4508-adc6-e34171e48ef1",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1240,
        100
      ],
      "parameters": {
        "width": 600,
        "height": 480,
        "content": "## Summarize Gathered content\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n**Purpose:** AI agent to summarize web page content.\n**Input:** Web content & user query.\n**Output:** Summarized content.\n**Note:** Uses \"Summariz"
      }
    },
    {
      "id": "30e03e88-16a5-4a77-bf19-74488042d88f",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1860,
        100
      ],
      "parameters": {
        "width": 340,
        "height": 480,
        "content": "## Avoid rate limits\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n**Purpose:** Introduces a pause to prevent hitting API rate limits.\n**Configuration:** Adjust delay time (e.g., 1000ms) based on API limits.\n**Tip:** Crucial"
      }
    },
    {
      "id": "52fd4d1c-63b6-44f0-b43f-30f092eadf7f",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        960,
        -480
      ],
      "parameters": {
        "width": 300,
        "height": 480,
        "content": "## Transform (Summaries Aggregator)\n\n**Purpose:** Python code to consolidate all individual summarized outputs into a single list.\n**Input:** Multiple summaries.\n**Output:** One item with `{\"output\": "
      }
    },
    {
      "id": "1572a6bd-ed9b-4461-9167-4b1d98bfc878",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1280,
        -480
      ],
      "parameters": {
        "width": 480,
        "height": 480,
        "content": "## Generate research Report\n\n**Purpose:** AI Agent to orchestrate research report generation.\n**Input:** Summarized data from \"Transform summarized data\".\n**Function:** Guides the \"Generator Model\" to"
      }
    },
    {
      "id": "f35efe92-7181-4283-8b93-858b807b1b40",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1780,
        -480
      ],
      "parameters": {
        "width": 500,
        "height": 480,
        "content": "## Evaluate and Generate Final Report\n\n**Purpose:** AI Chain to evaluate and refine the generated report.\n**Input:** Research report from \"Generator Agent\".\n**Function:** Uses \"Evaluator Model\" to ass"
      }
    },
    {
      "id": "d6d4b224-dd71-4bf7-be6f-b804002d48ac",
      "name": "Summarizer Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1420,
        180
      ]
    },
    {
      "id": "ef2cf6a3-3ea5-4874-898f-25ebc56997f1",
      "name": "Summarizer Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        1380,
        340
      ]
    },
    {
      "id": "4d26eb57-9e13-45e9-b365-c531189b0030",
      "name": "Generator Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        1340,
        -120
      ]
    },
    {
      "id": "bc46ca58-24a6-4942-86e2-1c4c4df46c45",
      "name": "Generator Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1380,
        -320
      ]
    },
    {
      "id": "bb051d77-8911-4f09-8626-b5e4f72ee5db",
      "name": "Evaluator Chain",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        1900,
        -320
      ]
    },
    {
      "id": "05fbd517-84e6-4ee9-be45-805271ff0b6a",
      "name": "Evaluator Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        1920,
        -120
      ]
    },
    {
      "id": "75a0f8dd-c2b8-462d-9eec-6f73710180b5",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -960,
        -160
      ],
      "parameters": {
        "width": 520,
        "height": 380,
        "content": "# JInaAI Workflow Overview\n\nThis workflow intelligently processes incoming chat messages by performing a web search using Jina AI and then leverages Gemini 2.5 Flash to generate and evaluate responses"
      }
    }
  ],
  "connections": {
    "Code": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Transform": {
      "main": [
        [
          {
            "node": "Generator Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Search web": {
      "main": [
        [
          {
            "node": "Code",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Evaluator Model": {
      "ai_languageModel": [
        [
          {
            "node": "Evaluator Chain",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Generator Agent": {
      "main": [
        [
          {
            "node": "Evaluator Chain",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generator Model": {
      "ai_languageModel": [
        [
          {
            "node": "Generator Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [
          {
            "node": "Transform",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Read URL content",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read URL content": {
      "main": [
        [
          {
            "node": "Summarizer Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Summarizer Agent": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Summarizer Model": {
      "ai_languageModel": [
        [
          {
            "node": "Summarizer Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output": {
      "ai_outputParser": [
        [
          {
            "node": "Summarizer Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "When chat message received": {
      "main": [
        [
          {
            "node": "Search web",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}