{
  "name": "Summarize Gmail into Notion with OpenAI and create audio digests in Google Drive",
  "nodes": [
    {
      "id": "0325b696-6f36-4a1c-9cb6-272d34488ad1",
      "name": "Get many messages",
      "type": "n8n-nodes-base.gmail",
      "position": [
        0,
        48
      ]
    },
    {
      "id": "18b63ac5-4d3f-4b9a-917d-578779325e1a",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        480,
        352
      ]
    },
    {
      "id": "b069ac1d-ac3e-4fae-afc1-637b9dbce185",
      "name": "Get a message",
      "type": "n8n-nodes-base.gmail",
      "position": [
        224,
        144
      ]
    },
    {
      "id": "b9dcd907-09bf-4fd9-98b9-e20fa54a6b7b",
      "name": "Code in JavaScript",
      "type": "n8n-nodes-base.code",
      "position": [
        800,
        144
      ]
    },
    {
      "id": "231988ad-751e-4c01-bd2e-feb1ed7e2d83",
      "name": "OpenAI Chat Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1024,
        352
      ]
    },
    {
      "id": "45909224-3ad6-4282-bc89-39ebef31529e",
      "name": "Import body emails",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        448,
        144
      ]
    },
    {
      "id": "302e0a61-27e3-4045-b032-69079f2ad8da",
      "name": "Final Summary",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        992,
        144
      ]
    },
    {
      "id": "4dac71ea-62cd-45bc-9e4e-b807fefaf60b",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -112,
        -144
      ],
      "parameters": {
        "width": 528,
        "height": 448,
        "content": "## Gmail flow \nRetrieve emails with AI subjects.\nTag as READ\n"
      }
    },
    {
      "id": "a4897f69-c303-4a7c-a23b-a69a9ef72e59",
      "name": "Convert text to speech",
      "type": "@elevenlabs/n8n-nodes-elevenlabs.elevenLabs",
      "position": [
        1376,
        288
      ]
    },
    {
      "id": "46c1800b-3168-4929-b181-b73270260261",
      "name": "Upload file",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        1760,
        272
      ]
    },
    {
      "id": "63de5534-b5e6-4799-8c11-3d7872f020f3",
      "name": "Share file",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        1936,
        272
      ]
    },
    {
      "id": "113aefe6-115c-476a-a94a-a142a93cf80d",
      "name": "Generate audio",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        1568,
        384
      ]
    },
    {
      "id": "2bb1e530-418e-4973-b027-70a274317c0e",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1328,
        192
      ],
      "parameters": {
        "width": 1184,
        "height": 400,
        "content": "## Audio transcript\n**Generate an audio transcript and upload to Google Drive\n"
      }
    },
    {
      "id": "33a53595-4a99-4f71-93d3-698b337f184b",
      "name": "Weekly trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -224,
        48
      ]
    },
    {
      "id": "956e80b8-5f6a-4d41-8c3e-87c48dac8a74",
      "name": "Mark as read",
      "type": "n8n-nodes-base.gmail",
      "position": [
        224,
        -48
      ]
    },
    {
      "id": "1258c34e-46a9-476b-a9e7-6bdb09e8f811",
      "name": "Create Google Drive URL",
      "type": "n8n-nodes-base.set",
      "position": [
        2112,
        272
      ]
    },
    {
      "id": "22cf0bd5-b9d1-4c33-b4a3-426081f1b2f7",
      "name": "Create a link to audio file in Notion",
      "type": "n8n-nodes-base.notion",
      "position": [
        2320,
        272
      ]
    },
    {
      "id": "aceed0fb-dff0-4e0f-8a79-0115dfdbaf7b",
      "name": "Create a text block Notion",
      "type": "n8n-nodes-base.notion",
      "position": [
        1392,
        0
      ]
    },
    {
      "id": "e4ed1f7b-27f3-478a-8b2e-0bed4fa10b02",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -960,
        -192
      ],
      "parameters": {
        "width": 528,
        "height": 848,
        "content": "## How it works\n\nThis workflow automates the entire journey from inbox noise to a clean, shareable audio summary. It starts with a weekly trigger that scans Gmail for emails matching specific subjects"
      }
    },
    {
      "id": "bea6f5fe-22b5-4422-9b41-41fb5f171623",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        432,
        0
      ],
      "parameters": {
        "width": 848,
        "height": 496,
        "content": "## Create summary text\n\nSummarize with LLM\n"
      }
    }
  ],
  "connections": {
    "Share file": {
      "main": [
        [
          {
            "node": "Create Google Drive URL",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload file": {
      "main": [
        [
          {
            "node": "Share file",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Final Summary": {
      "main": [
        [
          {
            "node": "Create a text block Notion",
            "type": "main",
            "index": 0
          },
          {
            "node": "Convert text to speech",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get a message": {
      "main": [
        [
          {
            "node": "Import body emails",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate audio": {
      "main": [
        [
          {
            "node": "Upload file",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Weekly trigger": {
      "main": [
        [
          {
            "node": "Get many messages",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get many messages": {
      "main": [
        [
          {
            "node": "Mark as read",
            "type": "main",
            "index": 0
          },
          {
            "node": "Get a message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Import body emails",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Code in JavaScript": {
      "main": [
        [
          {
            "node": "Final Summary",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Import body emails": {
      "main": [
        [
          {
            "node": "Code in JavaScript",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "Final Summary",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Convert text to speech": {
      "main": [
        [
          {
            "node": "Upload file",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Generate audio",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Google Drive URL": {
      "main": [
        [
          {
            "node": "Create a link to audio file in Notion",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}