{
  "openruna_format": "flow-graph-v1",
  "title": "1386_Limit_Code_Automation_Scheduled",
  "slug": "1386-limit-code-automation-scheduled",
  "source_filename": "1386_Limit_Code_Automation_Scheduled.json",
  "nodes": [
    {
      "id": "Convert raw to base64",
      "name": "Convert raw to base64",
      "integration": "code",
      "kind": "logic"
    },
    {
      "id": "Add email draft to thread",
      "name": "Add email draft to thread",
      "integration": "httpRequest",
      "kind": "action"
    },
    {
      "id": "Remove AI label from email",
      "name": "Remove AI label from email",
      "integration": "gmail",
      "kind": "action"
    },
    {
      "id": "Schedule trigger (1 min)",
      "name": "Schedule trigger (1 min)",
      "integration": "schedule",
      "kind": "trigger"
    },
    {
      "id": "Map fields for further processing",
      "name": "Map fields for further processing",
      "integration": "set",
      "kind": "logic"
    },
    {
      "id": "Convert response to HTML",
      "name": "Convert response to HTML",
      "integration": "markdown",
      "kind": "action"
    },
    {
      "id": "Build email raw",
      "name": "Build email raw",
      "integration": "set",
      "kind": "logic"
    },
    {
      "id": "Get threads with specific labels",
      "name": "Get threads with specific labels",
      "integration": "gmail",
      "kind": "action"
    },
    {
      "id": "Ask OpenAI Assistant",
      "name": "Ask OpenAI Assistant",
      "integration": "@n8n/n8n-nodes-langchain.openAi",
      "kind": "action"
    },
    {
      "id": "Loop over threads",
      "name": "Loop over threads",
      "integration": "splitInBatches",
      "kind": "logic"
    },
    {
      "id": "Get thread messages",
      "name": "Get thread messages",
      "integration": "gmail",
      "kind": "action"
    },
    {
      "id": "Return last message in thread",
      "name": "Return last message in thread",
      "integration": "limit",
      "kind": "logic"
    },
    {
      "id": "Get single message content",
      "name": "Get single message content",
      "integration": "gmail",
      "kind": "action"
    }
  ],
  "edges": [
    {
      "from": "Build email raw",
      "to": "Convert raw to base64"
    },
    {
      "from": "Loop over threads",
      "to": "Get single message content"
    },
    {
      "from": "Loop over threads",
      "to": "Get thread messages"
    },
    {
      "from": "Get thread messages",
      "to": "Return last message in thread"
    },
    {
      "from": "Ask OpenAI Assistant",
      "to": "Map fields for further processing"
    },
    {
      "from": "Convert raw to base64",
      "to": "Add email draft to thread"
    },
    {
      "from": "Convert response to HTML",
      "to": "Build email raw"
    },
    {
      "from": "Schedule trigger (1 min)",
      "to": "Get threads with specific labels"
    },
    {
      "from": "Add email draft to thread",
      "to": "Remove AI label from email"
    },
    {
      "from": "Get single message content",
      "to": "Ask OpenAI Assistant"
    },
    {
      "from": "Return last message in thread",
      "to": "Loop over threads"
    },
    {
      "from": "Get threads with specific labels",
      "to": "Loop over threads"
    },
    {
      "from": "Map fields for further processing",
      "to": "Convert response to HTML"
    }
  ]
}