{
  "name": "IA NEWS",
  "nodes": [
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 10
            }
          ]
        }
      },
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.3,
      "position": [
        -112,
        -64
      ],
      "id": "d21e91ad-a7d9-4a04-9a24-f48fb7f9f8bd",
      "name": "Schedule Trigger"
    },
    {
      "parameters": {
        "url": "https://gnews.io/api/v4/search",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "q",
              "value": "AI"
            },
            {
              "name": "Lang",
              "value": "fr"
            },
            {
              "name": "apikey",
              "value": "09b301ba2a90e9a8a66ab90fdb8289eb"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.4,
      "position": [
        112,
        -160
      ],
      "id": "7b648128-7411-4eb2-bc01-5e4abb6a47ef",
      "name": "Get GeniuS Articules"
    },
    {
      "parameters": {
        "url": "https://newsapi.org/v2/everything",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "q",
              "value": "AI"
            },
            {
              "name": "Language",
              "value": "fr"
            },
            {
              "name": "SortBy",
              "value": "publishedAt"
            },
            {
              "name": "pageSize",
              "value": "20"
            }
          ]
        },
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "X-Api-Key",
              "value": "d541cdcb67294531bf7ee2e73110f50b"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.4,
      "position": [
        112,
        32
      ],
      "id": "a0eba958-acd5-4899-b7e9-3bbac92ce490",
      "name": "Get NEWS ARTICLES"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "43f5cf23-1cfe-4d64-a33b-bb00edad4f62",
              "name": "articles",
              "value": "={{ $json.articles }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        336,
        -160
      ],
      "id": "dec924ce-da8d-4a2a-82be-b386ae9abd49",
      "name": "ARTICLES 1"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "43f5cf23-1cfe-4d64-a33b-bb00edad4f62",
              "name": "articles",
              "value": "={{ $json.articles }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        336,
        32
      ],
      "id": "c578d279-d92d-4e3d-adaa-8729d607c39e",
      "name": "ARTICLES 2"
    },
    {
      "parameters": {},
      "type": "n8n-nodes-base.merge",
      "typeVersion": 3.2,
      "position": [
        560,
        -64
      ],
      "id": "3d0bcc11-04f7-4ac3-8da4-0c4ae02de10d",
      "name": "Merge"
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "={{ $json.articles }}",
        "options": {
          "systemMessage": "** Select Top Articles **\nFrom $json.articles}}, choose the 15 most relevant articles related to AI technology advancements, \ntools, research, and applications.\n** Summarize Clearly **\nWrite in clear, professional, and readable language, \nsummarizing the main point of each article in 12 short sentences.\n** Include Links **\nAfter each summary, add the article's URL for readers to explore more.\n** Add the Date **\nBegin the summary with todayʼs date:\n $now.format('yyyy/MM/dd') }}"
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 3.1,
      "position": [
        784,
        -64
      ],
      "id": "69685690-383a-46d0-a52e-e4db9cbbb983",
      "name": "AI Agent"
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatDeepSeek",
      "typeVersion": 1,
      "position": [
        856,
        160
      ],
      "id": "efa7a775-032e-4196-9ad2-1e3069ff7e60",
      "name": "DeepSeek Chat Model",
      "credentials": {
        "deepSeekApi": {
          "id": "tk3l67aUYjoVL8IW",
          "name": "DeepSeek account"
        }
      }
    },
    {
      "parameters": {
        "sendTo": "mm.nabilmohamed@gmail.com",
        "subject": "IA SUMMURY",
        "message": "={{ $json.output }}",
        "options": {}
      },
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2.2,
      "position": [
        1136,
        -64
      ],
      "id": "45da2c29-0f8e-40c8-a5f1-cbec55cbe1fd",
      "name": "Send a message",
      "webhookId": "ebb7c5fe-69d6-4df1-8866-49ef7db7381c",
      "credentials": {
        "gmailOAuth2": {
          "id": "h9RNPlU4YBd4UDOF",
          "name": "Gmail account"
        }
      }
    }
  ],
  "pinData": {},
  "connections": {
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Get GeniuS Articules",
            "type": "main",
            "index": 0
          },
          {
            "node": "Get NEWS ARTICLES",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get GeniuS Articules": {
      "main": [
        [
          {
            "node": "ARTICLES 1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get NEWS ARTICLES": {
      "main": [
        [
          {
            "node": "ARTICLES 2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ARTICLES 2": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "ARTICLES 1": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "DeepSeek Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "Send a message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1",
    "binaryMode": "separate",
    "availableInMCP": false
  },
  "versionId": "5c6ac473-7a1c-4296-ba8b-0a97eebf8e98",
  "meta": {
    "templateCredsSetupCompleted": true,
    "instanceId": "d01bef9fecfa79cbac1163166d791300b0d570c8a60e1a10a4f31061fe2691ba"
  },
  "id": "JFTcVpbDmaOqdDGi",
  "tags": []
}