{
  "openruna_format": "flow-graph-v1",
  "title": "SHEETS RAG",
  "slug": "sheets-rag",
  "source_filename": "1144_Postgres_Code_Automation_Triggered.json",
  "nodes": [
    {
      "id": "create table query",
      "name": "create table query",
      "integration": "code",
      "kind": "logic"
    },
    {
      "id": "create insertion query",
      "name": "create insertion query",
      "integration": "code",
      "kind": "logic"
    },
    {
      "id": "Google Drive Trigger",
      "name": "Google Drive Trigger",
      "integration": "googleDrive",
      "kind": "trigger"
    },
    {
      "id": "execute_query_tool",
      "name": "execute_query_tool",
      "integration": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "kind": "action"
    },
    {
      "id": "Google Gemini Chat Model",
      "name": "Google Gemini Chat Model",
      "integration": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "kind": "action"
    },
    {
      "id": "get_postgres_schema",
      "name": "get_postgres_schema",
      "integration": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "kind": "action"
    },
    {
      "id": "change_this",
      "name": "change_this",
      "integration": "set",
      "kind": "logic"
    },
    {
      "id": "is not in database",
      "name": "is not in database",
      "integration": "if",
      "kind": "logic"
    },
    {
      "id": "table exists?",
      "name": "table exists?",
      "integration": "postgres",
      "kind": "action"
    },
    {
      "id": "fetch sheet data",
      "name": "fetch sheet data",
      "integration": "googleSheets",
      "kind": "action"
    },
    {
      "id": "remove table",
      "name": "remove table",
      "integration": "postgres",
      "kind": "action"
    },
    {
      "id": "create table",
      "name": "create table",
      "integration": "postgres",
      "kind": "action"
    },
    {
      "id": "perform insertion",
      "name": "perform insertion",
      "integration": "postgres",
      "kind": "action"
    },
    {
      "id": "Execute Workflow Trigger",
      "name": "Execute Workflow Trigger",
      "integration": "executeWorkflow",
      "kind": "trigger"
    },
    {
      "id": "When chat message received",
      "name": "When chat message received",
      "integration": "@n8n/n8n-nodes-langchain.manualChat",
      "kind": "trigger"
    },
    {
      "id": "response output",
      "name": "response output",
      "integration": "set",
      "kind": "logic"
    },
    {
      "id": "sql query executor",
      "name": "sql query executor",
      "integration": "postgres",
      "kind": "action"
    },
    {
      "id": "schema finder",
      "name": "schema finder",
      "integration": "postgres",
      "kind": "action"
    },
    {
      "id": "schema to string",
      "name": "schema to string",
      "integration": "code",
      "kind": "logic"
    },
    {
      "id": "AI Agent With SQL Query Prompt",
      "name": "AI Agent With SQL Query Prompt",
      "integration": "@n8n/n8n-nodes-langchain.agent",
      "kind": "action"
    }
  ],
  "edges": [
    {
      "from": "change_this",
      "to": "table exists?"
    },
    {
      "from": "create table",
      "to": "create insertion query"
    },
    {
      "from": "remove table",
      "to": "create table query"
    },
    {
      "from": "schema finder",
      "to": "schema to string"
    },
    {
      "from": "table exists?",
      "to": "fetch sheet data"
    },
    {
      "from": "fetch sheet data",
      "to": "is not in database"
    },
    {
      "from": "create table query",
      "to": "create table"
    },
    {
      "from": "is not in database",
      "to": "create table query"
    },
    {
      "from": "is not in database",
      "to": "remove table"
    },
    {
      "from": "sql query executor",
      "to": "response output"
    },
    {
      "from": "Google Drive Trigger",
      "to": "change_this"
    },
    {
      "from": "create insertion query",
      "to": "perform insertion"
    },
    {
      "from": "Execute Workflow Trigger",
      "to": "sql query executor"
    },
    {
      "from": "Execute Workflow Trigger",
      "to": "schema finder"
    },
    {
      "from": "When chat message received",
      "to": "AI Agent With SQL Query Prompt"
    }
  ]
}