{
  "openruna_format": "flow-graph-v1",
  "title": "OpenAI Assistant for Hubspot Chat",
  "slug": "openai-assistant-for-hubspot-chat",
  "source_filename": "1366_Wait_Code_Automation_Webhook.json",
  "nodes": [
    {
      "id": "getHubspotMessage",
      "name": "getHubspotMessage",
      "integration": "httpRequest",
      "kind": "action"
    },
    {
      "id": "OpenAi Create Thread",
      "name": "OpenAi Create Thread",
      "integration": "httpRequest",
      "kind": "action"
    },
    {
      "id": "OpenAI Run",
      "name": "OpenAI Run",
      "integration": "httpRequest",
      "kind": "action"
    },
    {
      "id": "Get Run",
      "name": "Get Run",
      "integration": "httpRequest",
      "kind": "action"
    },
    {
      "id": "Get Last Message",
      "name": "Get Last Message",
      "integration": "httpRequest",
      "kind": "action"
    },
    {
      "id": "HTTP Request",
      "name": "HTTP Request",
      "integration": "httpRequest",
      "kind": "action"
    },
    {
      "id": "Completed, Action or Inprogress",
      "name": "Completed, Action or Inprogress",
      "integration": "switch",
      "kind": "logic"
    },
    {
      "id": "Wait",
      "name": "Wait",
      "integration": "wait",
      "kind": "logic"
    },
    {
      "id": "Wait1",
      "name": "Wait1",
      "integration": "wait",
      "kind": "logic"
    },
    {
      "id": "Submit Data",
      "name": "Submit Data",
      "integration": "httpRequest",
      "kind": "action"
    },
    {
      "id": "Select Function",
      "name": "Select Function",
      "integration": "switch",
      "kind": "logic"
    },
    {
      "id": "Code1",
      "name": "Code1",
      "integration": "code",
      "kind": "logic"
    },
    {
      "id": "Wait2",
      "name": "Wait2",
      "integration": "wait",
      "kind": "logic"
    },
    {
      "id": "HTTP Request1",
      "name": "HTTP Request1",
      "integration": "httpRequest",
      "kind": "action"
    },
    {
      "id": "Code",
      "name": "Code",
      "integration": "code",
      "kind": "logic"
    },
    {
      "id": "Submit Data1",
      "name": "Submit Data1",
      "integration": "httpRequest",
      "kind": "action"
    },
    {
      "id": "Wait3",
      "name": "Wait3",
      "integration": "wait",
      "kind": "logic"
    },
    {
      "id": "respondHubspotMessage1",
      "name": "respondHubspotMessage1",
      "integration": "httpRequest",
      "kind": "action"
    },
    {
      "id": "IF",
      "name": "IF",
      "integration": "if",
      "kind": "logic"
    },
    {
      "id": "Airtable",
      "name": "Airtable",
      "integration": "airtable",
      "kind": "action"
    },
    {
      "id": "IF1",
      "name": "IF1",
      "integration": "if",
      "kind": "logic"
    },
    {
      "id": "createThread",
      "name": "createThread",
      "integration": "airtable",
      "kind": "action"
    },
    {
      "id": "OpenAI Run1",
      "name": "OpenAI Run1",
      "integration": "httpRequest",
      "kind": "action"
    },
    {
      "id": "IF2",
      "name": "IF2",
      "integration": "if",
      "kind": "logic"
    },
    {
      "id": "OpenAI",
      "name": "OpenAI",
      "integration": "@n8n/n8n-nodes-langchain.openAi",
      "kind": "action"
    },
    {
      "id": "Webhook",
      "name": "Webhook",
      "integration": "webhook",
      "kind": "trigger"
    }
  ],
  "edges": [
    {
      "from": "IF",
      "to": "Airtable"
    },
    {
      "from": "IF1",
      "to": "OpenAi Create Thread"
    },
    {
      "from": "IF1",
      "to": "OpenAI"
    },
    {
      "from": "IF2",
      "to": "getHubspotMessage"
    },
    {
      "from": "Code",
      "to": "Submit Data1"
    },
    {
      "from": "Wait",
      "to": "Get Run"
    },
    {
      "from": "Code1",
      "to": "Submit Data"
    },
    {
      "from": "Wait1",
      "to": "Get Run"
    },
    {
      "from": "Wait2",
      "to": "Get Run"
    },
    {
      "from": "Wait3",
      "to": "Get Run"
    },
    {
      "from": "OpenAI",
      "to": "OpenAI Run1"
    },
    {
      "from": "Get Run",
      "to": "Completed, Action or Inprogress"
    },
    {
      "from": "Webhook",
      "to": "IF2"
    },
    {
      "from": "Airtable",
      "to": "IF1"
    },
    {
      "from": "OpenAI Run",
      "to": "Get Run"
    },
    {
      "from": "OpenAI Run1",
      "to": "Get Run"
    },
    {
      "from": "Submit Data",
      "to": "Wait2"
    },
    {
      "from": "HTTP Request",
      "to": "Code1"
    },
    {
      "from": "Submit Data1",
      "to": "Wait3"
    },
    {
      "from": "createThread",
      "to": "OpenAI Run"
    },
    {
      "from": "HTTP Request1",
      "to": "Code"
    },
    {
      "from": "Select Function",
      "to": "HTTP Request",
      "label": "getAWBbyOrder"
    },
    {
      "from": "Select Function",
      "to": "HTTP Request1",
      "label": "get_awb_history"
    },
    {
      "from": "Get Last Message",
      "to": "respondHubspotMessage1"
    },
    {
      "from": "getHubspotMessage",
      "to": "IF"
    },
    {
      "from": "OpenAi Create Thread",
      "to": "createThread"
    },
    {
      "from": "Completed, Action or Inprogress",
      "to": "Get Last Message",
      "label": "completed"
    },
    {
      "from": "Completed, Action or Inprogress",
      "to": "Select Function",
      "label": "requires_action"
    },
    {
      "from": "Completed, Action or Inprogress",
      "to": "Wait1",
      "label": "in_progress"
    },
    {
      "from": "Completed, Action or Inprogress",
      "to": "Wait",
      "label": "queued"
    }
  ]
}