{
  "name": "Gmail AI Auto-Responder: Create Draft Replies to incoming emails",
  "nodes": [
    {
      "id": "2a9ff08f-919a-41a8-980b-8c2bca3059e4",
      "name": "Gmail Trigger",
      "type": "n8n-nodes-base.gmailTrigger",
      "position": [
        -332.809175564116,
        566.0845437534399
      ]
    },
    {
      "id": "3ef14615-0045-404f-a21b-2c65a52f4be8",
      "name": "If Needs Reply",
      "type": "n8n-nodes-base.if",
      "position": [
        240,
        560
      ]
    },
    {
      "id": "36968dd5-8d51-4184-a05a-587b6c95aa82",
      "name": "JSON Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        100,
        720
      ]
    },
    {
      "id": "2a64dce8-e2f0-475e-a366-a02084293aad",
      "name": "OpenAI Chat",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -92.809175564116,
        726.0845437534399
      ]
    },
    {
      "id": "be892ff8-0981-4b34-9c93-7674ddd90360",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -429.809175564116,
        461.08454375343996
      ],
      "parameters": {
        "width": 304.10628068244364,
        "height": 394.42512272977456,
        "content": "## When I receive an Email\n"
      }
    },
    {
      "id": "9d92839a-9ff2-436c-8abb-2f43e07c1ace",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -112.809175564116,
        460.08454375343996
      ],
      "parameters": {
        "width": 556,
        "height": 397,
        "content": "## ... that Needs a Reply\n"
      }
    },
    {
      "id": "3cd77609-684c-44e2-9cdc-9479cfd836bd",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        460,
        460
      ],
      "parameters": {
        "width": 333.19082443588354,
        "height": 400.08454375343996,
        "content": "## Generate a Reply"
      }
    },
    {
      "id": "b123cf31-767d-48bb-a0ba-79a69f6da585",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        807.190824435884,
        461.08454375343996
      ],
      "parameters": {
        "width": 326,
        "height": 395,
        "content": "## ...as a Draft in the conversation"
      }
    },
    {
      "id": "1a87c416-6b1c-4526-a2b6-20468c95ea0e",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        480,
        680
      ]
    },
    {
      "id": "84b4d516-252e-444e-b998-2d4aa0f89653",
      "name": "Gmail - Create Draft",
      "type": "n8n-nodes-base.gmail",
      "position": [
        900,
        560
      ]
    },
    {
      "id": "86017ff4-9c57-4b2a-9cd9-f62571a05ffd",
      "name": "Assess if message needs a reply",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        -92.809175564116,
        566.0845437534399
      ]
    },
    {
      "id": "cab1e7e5-93dc-4850-a471-e285cdbe2058",
      "name": "Generate email reply",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        500,
        520
      ]
    }
  ],
  "connections": {
    "JSON Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Assess if message needs a reply",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat": {
      "ai_languageModel": [
        [
          {
            "node": "Assess if message needs a reply",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Gmail Trigger": {
      "main": [
        [
          {
            "node": "Assess if message needs a reply",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If Needs Reply": {
      "main": [
        [
          {
            "node": "Generate email reply",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Generate email reply",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Generate email reply": {
      "main": [
        [
          {
            "node": "Gmail - Create Draft",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Assess if message needs a reply": {
      "main": [
        [
          {
            "node": "If Needs Reply",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}