{
  "code": "OK",
  "response": {
    "blueprint": {
      "flow": [
        {
          "id": 14,
          "module": "whatsapp-business-cloud:watchEvents2",
          "version": 1,
          "metadata": {
            "designer": {
              "x": 0,
              "y": 0,
              "messages": [
                {
                  "message": "The module is not set up.",
                  "category": "setupreq",
                  "severity": "error"
                }
              ]
            }
          }
        },
        {
          "id": 2,
          "mapper": {
            "json": "{{1.entry}}"
          },
          "module": "json:ParseJSON",
          "version": 1,
          "metadata": {
            "designer": {
              "x": 300,
              "y": 0,
              "messages": [
                {
                  "message": "Module references non-existing module '1'.",
                  "category": "reference",
                  "severity": "error"
                }
              ]
            }
          },
          "parameters": {}
        },
        {
          "id": 3,
          "mapper": {
            "variables": [
              {
                "name": "phone",
                "value": "{{2.value.contacts[].wa_id}}"
              },
              {
                "name": "sender_name",
                "value": "{{2.value.contacts[].profile.name}}"
              },
              {
                "name": "message_text",
                "value": "{{2.value.messages[].text.body}}"
              },
              {
                "name": "message_id",
                "value": "{{2.value.messages[].id}}"
              }
            ]
          },
          "module": "util:SetVariables",
          "version": 1,
          "metadata": {
            "designer": {
              "x": 600,
              "y": 0
            }
          }
        },
        {
          "id": 4,
          "mapper": {
            "from": "drive",
            "limit": "1",
            "sheetId": "Sheet1",
            "spreadsheetId": "1tRKEmJAnxF0GLD8dkwLLvk8zChG-Ccos-20xR8W-ZQI",
            "tableFirstRow": "A1:Z1",
            "includesHeaders": true,
            "valueRenderOption": "FORMATTED_VALUE",
            "dateTimeRenderOption": "FORMATTED_STRING"
          },
          "module": "google-sheets:filterRows",
          "version": 2,
          "metadata": {
            "expect": [
              {
                "name": "from",
                "type": "select",
                "label": "Search Method",
                "required": true,
                "validate": {
                  "enum": [
                    "drive",
                    "share"
                  ]
                }
              },
              {
                "name": "valueRenderOption",
                "type": "select",
                "label": "Value render option",
                "validate": {
                  "enum": [
                    "FORMATTED_VALUE",
                    "UNFORMATTED_VALUE",
                    "FORMULA"
                  ]
                }
              },
              {
                "name": "dateTimeRenderOption",
                "type": "select",
                "label": "Date and time render option",
                "validate": {
                  "enum": [
                    "SERIAL_NUMBER",
                    "FORMATTED_STRING"
                  ]
                }
              },
              {
                "name": "limit",
                "type": "uinteger",
                "label": "Limit"
              },
              {
                "name": "spreadsheetId",
                "type": "select",
                "label": "Spreadsheet ID",
                "required": true
              },
              {
                "name": "sheetId",
                "type": "select",
                "label": "Sheet Name",
                "required": true
              },
              {
                "name": "includesHeaders",
                "type": "select",
                "label": "Table contains headers",
                "required": true,
                "validate": {
                  "enum": [
                    true,
                    false
                  ]
                }
              },
              {
                "name": "tableFirstRow",
                "type": "select",
                "label": "Column range",
                "required": true,
                "validate": {
                  "enum": [
                    "A1:Z1",
                    "A1:BZ1",
                    "A1:CZ1",
                    "A1:DZ1",
                    "A1:MZ1",
                    "A1:ZZ1",
                    "A1:AZZ1",
                    "A1:BZZ1",
                    "A1:CZZ1",
                    "A1:DZZ1",
                    "A1:MZZ1",
                    "A1:ZZZ1"
                  ]
                }
              }
            ],
            "restore": {
              "expect": {
                "from": {
                  "label": "Select from My Drive"
                },
                "sheetId": {
                  "mode": "chose",
                  "label": "Sheet1"
                },
                "spreadsheetId": {
                  "mode": "chose",
                  "label": "Omni Channel Sheet"
                },
                "tableFirstRow": {
                  "label": "A-Z"
                },
                "includesHeaders": {
                  "mode": "chose",
                  "label": "Yes"
                },
                "valueRenderOption": {
                  "mode": "chose",
                  "label": "Formatted value"
                },
                "dateTimeRenderOption": {
                  "mode": "chose",
                  "label": "Formatted string"
                }
              },
              "parameters": {
                "__IMTCONN__": {
                  "data": {
                    "scoped": "true",
                    "connection": "google"
                  },
                  "label": "My Google connection (abdullahlinkrypt@gmail.com)"
                }
              }
            },
            "designer": {
              "x": 900,
              "y": 0
            },
            "interface": [
              {
                "name": "__IMTLENGTH__",
                "type": "uinteger",
                "label": "Total number of bundles"
              },
              {
                "name": "__IMTINDEX__",
                "type": "uinteger",
                "label": "Bundle order position"
              },
              {
                "name": "__ROW_NUMBER__",
                "type": "number",
                "label": "Row number"
              },
              {
                "name": "__SPREADSHEET_ID__",
                "type": "text",
                "label": "Spreadsheet ID"
              },
              {
                "name": "__SHEET__",
                "type": "text",
                "label": "Sheet"
              },
              {
                "name": "0",
                "type": "text",
                "label": "user_id (A)"
              },
              {
                "name": "1",
                "type": "text",
                "label": "name (B)"
              },
              {
                "name": "2",
                "type": "text",
                "label": "platform (C)"
              },
              {
                "name": "3",
                "type": "text",
                "label": "first_message (D)"
              },
              {
                "name": "4",
                "type": "text",
                "label": "last_message_date (E)"
              },
              {
                "name": "5",
                "type": "text",
                "label": "status (F)"
              },
              {
                "name": "6",
                "type": "text",
                "label": "conversation_history (G)"
              },
              {
                "name": "7",
                "type": "text",
                "label": "lead_score (H)"
              },
              {
                "name": "8",
                "type": "text",
                "label": "message_count (I)"
              },
              {
                "name": "9",
                "type": "text",
                "label": "(J)"
              },
              {
                "name": "10",
                "type": "text",
                "label": "(K)"
              },
              {
                "name": "11",
                "type": "text",
                "label": "(L)"
              },
              {
                "name": "12",
                "type": "text",
                "label": "(M)"
              },
              {
                "name": "13",
                "type": "text",
                "label": "(N)"
              },
              {
                "name": "14",
                "type": "text",
                "label": "(O)"
              },
              {
                "name": "15",
                "type": "text",
                "label": "(P)"
              },
              {
                "name": "16",
                "type": "text",
                "label": "(Q)"
              },
              {
                "name": "17",
                "type": "text",
                "label": "(R)"
              },
              {
                "name": "18",
                "type": "text",
                "label": "(S)"
              },
              {
                "name": "19",
                "type": "text",
                "label": "(T)"
              },
              {
                "name": "20",
                "type": "text",
                "label": "(U)"
              },
              {
                "name": "21",
                "type": "text",
                "label": "(V)"
              },
              {
                "name": "22",
                "type": "text",
                "label": "(W)"
              },
              {
                "name": "23",
                "type": "text",
                "label": "(X)"
              },
              {
                "name": "24",
                "type": "text",
                "label": "(Y)"
              },
              {
                "name": "25",
                "type": "text",
                "label": "(Z)"
              }
            ],
            "parameters": [
              {
                "name": "__IMTCONN__",
                "type": "account:google",
                "label": "Connection",
                "required": true
              }
            ]
          },
          "parameters": {
            "__IMTCONN__": 5312076
          }
        },
        {
          "id": 5,
          "mapper": null,
          "module": "builtin:BasicRouter",
          "routes": [
            {
              "flow": [
                {
                  "id": 6,
                  "mapper": {
                    "from": "drive",
                    "mode": "select",
                    "values": {
                      "0": "{{3.phone}}",
                      "1": "{{3.sender_name}}",
                      "2": "whatsapp",
                      "3": "{{3.message_text}}",
                      "4": "{{now}}",
                      "5": "new_lead",
                      "6": "[]",
                      "7": "0",
                      "8": "1"
                    },
                    "sheetId": "Sheet1",
                    "spreadsheetId": "/1tRKEmJAnxF0GLD8dkwLLvk8zChG-Ccos-20xR8W-ZQI",
                    "includesHeaders": true,
                    "insertDataOption": "INSERT_ROWS",
                    "valueInputOption": "USER_ENTERED",
                    "insertUnformatted": false
                  },
                  "module": "google-sheets:addRow",
                  "version": 2,
                  "metadata": {
                    "expect": [
                      {
                        "name": "mode",
                        "type": "select",
                        "label": "Search Method",
                        "required": true,
                        "validate": {
                          "enum": [
                            "select",
                            "fromAll",
                            "map"
                          ]
                        }
                      },
                      {
                        "name": "insertUnformatted",
                        "type": "boolean",
                        "label": "Unformatted",
                        "required": true
                      },
                      {
                        "name": "valueInputOption",
                        "type": "select",
                        "label": "Value input option",
                        "validate": {
                          "enum": [
                            "USER_ENTERED",
                            "RAW"
                          ]
                        }
                      },
                      {
                        "name": "insertDataOption",
                        "type": "select",
                        "label": "Insert data option",
                        "validate": {
                          "enum": [
                            "INSERT_ROWS",
                            "OVERWRITE"
                          ]
                        }
                      },
                      {
                        "name": "from",
                        "type": "select",
                        "label": "Drive",
                        "required": true,
                        "validate": {
                          "enum": [
                            "drive",
                            "share",
                            "team"
                          ]
                        }
                      },
                      {
                        "name": "spreadsheetId",
                        "type": "file",
                        "label": "Spreadsheet ID",
                        "required": true
                      },
                      {
                        "name": "sheetId",
                        "type": "select",
                        "label": "Sheet Name",
                        "required": true
                      },
                      {
                        "name": "includesHeaders",
                        "type": "select",
                        "label": "Table contains headers",
                        "required": true,
                        "validate": {
                          "enum": [
                            true,
                            false
                          ]
                        }
                      },
                      {
                        "name": "values",
                        "spec": [
                          {
                            "name": "0",
                            "type": "text",
                            "label": "user_id (A)"
                          },
                          {
                            "name": "1",
                            "type": "text",
                            "label": "name (B)"
                          },
                          {
                            "name": "2",
                            "type": "text",
                            "label": "platform (C)"
                          },
                          {
                            "name": "3",
                            "type": "text",
                            "label": "first_message (D)"
                          },
                          {
                            "name": "4",
                            "type": "text",
                            "label": "last_message_date (E)"
                          },
                          {
                            "name": "5",
                            "type": "text",
                            "label": "status (F)"
                          },
                          {
                            "name": "6",
                            "type": "text",
                            "label": "conversation_history (G)"
                          },
                          {
                            "name": "7",
                            "type": "text",
                            "label": "lead_score (H)"
                          },
                          {
                            "name": "8",
                            "type": "text",
                            "label": "message_count (I)"
                          },
                          {
                            "name": "9",
                            "type": "text",
                            "label": "(J)"
                          },
                          {
                            "name": "10",
                            "type": "text",
                            "label": "(K)"
                          },
                          {
                            "name": "11",
                            "type": "text",
                            "label": "(L)"
                          },
                          {
                            "name": "12",
                            "type": "text",
                            "label": "(M)"
                          },
                          {
                            "name": "13",
                            "type": "text",
                            "label": "(N)"
                          },
                          {
                            "name": "14",
                            "type": "text",
                            "label": "(O)"
                          },
                          {
                            "name": "15",
                            "type": "text",
                            "label": "(P)"
                          },
                          {
                            "name": "16",
                            "type": "text",
                            "label": "(Q)"
                          },
                          {
                            "name": "17",
                            "type": "text",
                            "label": "(R)"
                          },
                          {
                            "name": "18",
                            "type": "text",
                            "label": "(S)"
                          },
                          {
                            "name": "19",
                            "type": "text",
                            "label": "(T)"
                          },
                          {
                            "name": "20",
                            "type": "text",
                            "label": "(U)"
                          },
                          {
                            "name": "21",
                            "type": "text",
                            "label": "(V)"
                          },
                          {
                            "name": "22",
                            "type": "text",
                            "label": "(W)"
                          },
                          {
                            "name": "23",
                            "type": "text",
                            "label": "(X)"
                          },
                          {
                            "name": "24",
                            "type": "text",
                            "label": "(Y)"
                          },
                          {
                            "name": "25",
                            "type": "text",
                            "label": "(Z)"
                          }
                        ],
                        "type": "collection",
                        "label": "Values"
                      }
                    ],
                    "restore": {
                      "expect": {
                        "from": {
                          "label": "My Drive"
                        },
                        "mode": {
                          "label": "Search by path"
                        },
                        "sheetId": {
                          "label": "Sheet1"
                        },
                        "spreadsheetId": {
                          "path": [
                            "Omni Channel Sheet"
                          ]
                        },
                        "includesHeaders": {
                          "label": "Yes",
                          "nested": [
                            {
                              "name": "values",
                              "spec": [
                                {
                                  "name": "0",
                                  "type": "text",
                                  "label": "user_id (A)"
                                },
                                {
                                  "name": "1",
                                  "type": "text",
                                  "label": "name (B)"
                                },
                                {
                                  "name": "2",
                                  "type": "text",
                                  "label": "platform (C)"
                                },
                                {
                                  "name": "3",
                                  "type": "text",
                                  "label": "first_message (D)"
                                },
                                {
                                  "name": "4",
                                  "type": "text",
                                  "label": "last_message_date (E)"
                                },
                                {
                                  "name": "5",
                                  "type": "text",
                                  "label": "status (F)"
                                },
                                {
                                  "name": "6",
                                  "type": "text",
                                  "label": "conversation_history (G)"
                                },
                                {
                                  "name": "7",
                                  "type": "text",
                                  "label": "lead_score (H)"
                                },
                                {
                                  "name": "8",
                                  "type": "text",
                                  "label": "message_count (I)"
                                },
                                {
                                  "name": "9",
                                  "type": "text",
                                  "label": "(J)"
                                },
                                {
                                  "name": "10",
                                  "type": "text",
                                  "label": "(K)"
                                },
                                {
                                  "name": "11",
                                  "type": "text",
                                  "label": "(L)"
                                },
                                {
                                  "name": "12",
                                  "type": "text",
                                  "label": "(M)"
                                },
                                {
                                  "name": "13",
                                  "type": "text",
                                  "label": "(N)"
                                },
                                {
                                  "name": "14",
                                  "type": "text",
                                  "label": "(O)"
                                },
                                {
                                  "name": "15",
                                  "type": "text",
                                  "label": "(P)"
                                },
                                {
                                  "name": "16",
                                  "type": "text",
                                  "label": "(Q)"
                                },
                                {
                                  "name": "17",
                                  "type": "text",
                                  "label": "(R)"
                                },
                                {
                                  "name": "18",
                                  "type": "text",
                                  "label": "(S)"
                                },
                                {
                                  "name": "19",
                                  "type": "text",
                                  "label": "(T)"
                                },
                                {
                                  "name": "20",
                                  "type": "text",
                                  "label": "(U)"
                                },
                                {
                                  "name": "21",
                                  "type": "text",
                                  "label": "(V)"
                                },
                                {
                                  "name": "22",
                                  "type": "text",
                                  "label": "(W)"
                                },
                                {
                                  "name": "23",
                                  "type": "text",
                                  "label": "(X)"
                                },
                                {
                                  "name": "24",
                                  "type": "text",
                                  "label": "(Y)"
                                },
                                {
                                  "name": "25",
                                  "type": "text",
                                  "label": "(Z)"
                                }
                              ],
                              "type": "collection",
                              "label": "Values"
                            }
                          ]
                        },
                        "insertDataOption": {
                          "mode": "chose",
                          "label": "Insert rows"
                        },
                        "valueInputOption": {
                          "mode": "chose",
                          "label": "User entered"
                        },
                        "insertUnformatted": {
                          "mode": "chose"
                        }
                      },
                      "parameters": {
                        "__IMTCONN__": {
                          "data": {
                            "scoped": "true",
                            "connection": "google"
                          },
                          "label": "My Google connection (abdullahlinkrypt@gmail.com)"
                        }
                      }
                    },
                    "designer": {
                      "x": 1638,
                      "y": -260
                    },
                    "parameters": [
                      {
                        "name": "__IMTCONN__",
                        "type": "account:google",
                        "label": "Connection",
                        "required": true
                      }
                    ]
                  },
                  "parameters": {
                    "__IMTCONN__": 5312076
                  }
                }
              ]
            },
            {
              "flow": [
                {
                  "id": 7,
                  "mapper": {
                    "model": "gpt-5-chat-latest",
                    "top_p": "1",
                    "select": "chat",
                    "messages": [
                      {
                        "role": "system",
                        "content": "You are Alex, the AI Sales Strategist for Antigravity - a premium AI agency that helps businesses scale through intelligent automation, performance marketing, and brand transformation.\n\nYour Communication Style (Alex Hormozi-inspired):\n- Speak with absolute conviction\n- Be direct but warm - no corporate jargon\n- Use analogies and metaphors\n- Quantify everything\n- Create urgency without desperation\n\nAntigravity Services:\n1. \ud83e\udd16 AI Automations - Custom AI systems that run business on autopilot\n2. \ud83d\udcc8 AI for Marketing - Smart marketing that learns and optimizes itself\n3. \ud83c\udfaf Meta Ads - Performance marketing that delivers ROI\n4. \ud83c\udfa8 Branding & Creative - Build brands that command premium prices\n\nUse the CLOSER framework:\nC - Clarify why they're here\nL - Label their problem\nO - Overview past pain\nS - Sell the vacation (paint the after picture)\nE - Explain away concerns\nR - Reinforce their decision\n\nPlatform: WhatsApp\nKeep responses under 500 characters. Be conversational. Use 1-2 emojis max. Always end with a question or clear CTA."
                      },
                      {
                        "role": "user",
                        "content": "Contact: {{3.sender_name}}\nPrevious conversation: {{ifempty(4.G; \"New contact\")}}\n\nNew message: {{3.message_text}}\n\nRespond as Alex."
                      }
                    ],
                    "max_tokens": "250",
                    "temperature": "0.7",
                    "n_completions": "1",
                    "response_format": "text"
                  },
                  "module": "openai-gpt-3:CreateCompletion",
                  "version": 1,
                  "metadata": {
                    "expect": [
                      {
                        "name": "select",
                        "type": "select",
                        "label": "Select Method",
                        "required": true,
                        "validate": {
                          "enum": [
                            "chat",
                            "prompt"
                          ]
                        }
                      },
                      {
                        "name": "temperature",
                        "type": "number",
                        "label": "Temperature",
                        "validate": {
                          "max": 2,
                          "min": 0
                        }
                      },
                      {
                        "name": "top_p",
                        "type": "number",
                        "label": "Top P",
                        "validate": {
                          "max": 1,
                          "min": 0
                        }
                      },
                      {
                        "name": "n_completions",
                        "type": "number",
                        "label": "Number"
                      },
                      {
                        "name": "frequency_penalty",
                        "type": "number",
                        "label": "Frequency Penalty",
                        "validate": {
                          "max": 2,
                          "min": -2
                        }
                      },
                      {
                        "name": "presence_penalty",
                        "type": "number",
                        "label": "Presence Penalty",
                        "validate": {
                          "max": 2,
                          "min": -2
                        }
                      },
                      {
                        "name": "logit_bias",
                        "spec": {
                          "name": "value",
                          "spec": [
                            {
                              "name": "token",
                              "type": "text",
                              "label": "Token ID",
                              "required": true
                            },
                            {
                              "name": "probability",
                              "type": "number",
                              "label": "Probability",
                              "required": true,
                              "validate": {
                                "max": 100,
                                "min": -100
                              }
                            }
                          ],
                          "type": "collection",
                          "label": "Token Probability"
                        },
                        "type": "array",
                        "label": "Token Probability"
                      },
                      {
                        "name": "seed",
                        "type": "integer",
                        "label": "Seed"
                      },
                      {
                        "name": "tool_choice",
                        "type": "select",
                        "label": "Tool Choice",
                        "validate": {
                          "enum": [
                            "none",
                            "auto",
                            "required"
                          ]
                        }
                      },
                      {
                        "name": "stop",
                        "spec": {
                          "name": "value",
                          "type": "text",
                          "label": "Stop Sequence"
                        },
                        "type": "array",
                        "label": "Stop Sequences",
                        "validate": {
                          "maxItems": 4
                        }
                      },
                      {
                        "name": "additionalParameters",
                        "spec": {
                          "name": "value",
                          "spec": [
                            {
                              "name": "key",
                              "type": "text",
                              "label": "Parameter Name",
                              "required": true
                            },
                            {
                              "name": "type",
                              "type": "select",
                              "label": "Input Type",
                              "options": [
                                {
                                  "label": "Text",
                                  "value": "text",
                                  "nested": [
                                    {
                                      "name": "value",
                                      "type": "text",
                                      "label": "Parameter Value"
                                    }
                                  ],
                                  "default": true
                                },
                                {
                                  "label": "Number",
                                  "value": "number",
                                  "nested": [
                                    {
                                      "name": "value",
                                      "type": "number",
                                      "label": "Parameter Value"
                                    }
                                  ]
                                },
                                {
                                  "label": "Boolean",
                                  "value": "boolean",
                                  "nested": [
                                    {
                                      "name": "value",
                                      "type": "boolean",
                                      "label": "Parameter Value"
                                    }
                                  ]
                                },
                                {
                                  "label": "Date",
                                  "value": "date",
                                  "nested": [
                                    {
                                      "name": "value",
                                      "type": "date",
                                      "label": "Parameter Value"
                                    }
                                  ]
                                },
                                {
                                  "label": "Any",
                                  "value": "any",
                                  "nested": [
                                    {
                                      "name": "value",
                                      "type": "any",
                                      "label": "Parameter Value"
                                    }
                                  ]
                                }
                              ]
                            }
                          ],
                          "type": "collection",
                          "label": "Input Parameter"
                        },
                        "type": "array",
                        "label": "Other Input Parameters"
                      },
                      {
                        "name": "model",
                        "type": "select",
                        "label": "Model",
                        "required": true
                      },
                      {
                        "name": "max_tokens",
                        "type": "uinteger",
                        "label": "Max Output Tokens"
                      },
                      {
                        "name": "messages",
                        "spec": {
                          "name": "value",
                          "spec": [
                            {
                              "name": "role",
                              "type": "select",
                              "label": "Role",
                              "options": {
                                "store": [
                                  {
                                    "label": "User",
                                    "value": "user",
                                    "nested": [
                                      {
                                        "help": "Text content of the message on behalf of the selected __Role__.",
                                        "name": "content",
                                        "type": "text",
                                        "label": "Text Content"
                                      }
                                    ],
                                    "default": true
                                  },
                                  {
                                    "label": "Assistant",
                                    "value": "assistant",
                                    "nested": [
                                      {
                                        "help": "Text content of the message on behalf of the selected __Role__.",
                                        "name": "content",
                                        "type": "text",
                                        "label": "Text Content"
                                      },
                                      {
                                        "mode": "edit",
                                        "name": "tool_calls",
                                        "spec": {
                                          "spec": [
                                            {
                                              "name": "type",
                                              "type": "hidden",
                                              "default": "function"
                                            },
                                            {
                                              "help": "Map this directly from the output of a previous **Create a Completion** module. Look for `Choices[]: Message.Tool Calls[]: ID`.",
                                              "name": "id",
                                              "type": "text",
                                              "label": "Tool call ID"
                                            },
                                            {
                                              "name": "function",
                                              "spec": [
                                                {
                                                  "help": "The name of the function previously called.",
                                                  "name": "name",
                                                  "type": "text",
                                                  "label": "Name",
                                                  "required": true
                                                },
                                                {
                                                  "help": "The arguments previously output by the AI.",
                                                  "name": "arguments",
                                                  "type": "text",
                                                  "label": "Arguments",
                                                  "required": true
                                                }
                                              ],
                                              "type": "collection",
                                              "label": "Function"
                                            }
                                          ],
                                          "type": "collection",
                                          "label": "Tool Call"
                                        },
                                        "type": "array",
                                        "label": "Tool Calls",
                                        "labels": {
                                          "add": "Add tool call"
                                        },
                                        "mappable": {
                                          "help": "You can map the entire `Choices[]: Message.Tool Calls` array from a previous Create a Completion module here."
                                        }
                                      }
                                    ]
                                  },
                                  {
                                    "label": "Developer / System",
                                    "value": "system",
                                    "nested": [
                                      {
                                        "help": "Text content of the message on behalf of the selected __Role__.",
                                        "name": "content",
                                        "type": "text",
                                        "label": "Text Content"
                                      }
                                    ]
                                  },
                                  {
                                    "label": "Tool",
                                    "value": "tool",
                                    "nested": [
                                      {
                                        "help": "The return of the function. This role should only be used when you have processed a previous function call and want to send the output of the function execution back to the AI.",
                                        "name": "content",
                                        "type": "text",
                                        "label": "Text Content",
                                        "required": true
                                      },
                                      {
                                        "help": "Map this directly from the output of a previous **Create a Completion** module. Look for `Choices[]: Message.Tool Calls[]: ID`.",
                                        "name": "tool_call_id",
                                        "type": "text",
                                        "label": "Tool Call ID.",
                                        "required": true
                                      }
                                    ]
                                  }
                                ]
                              },
                              "required": true
                            }
                          ],
                          "type": "collection",
                          "label": "Message"
                        },
                        "type": "array",
                        "label": "Messages",
                        "required": true
                      },
                      {
                        "name": "response_format",
                        "type": "select",
                        "label": "Response Format",
                        "validate": {
                          "enum": [
                            "text",
                            "json_object"
                          ]
                        }
                      },
                      {
                        "name": "reasoning_effort",
                        "type": "select",
                        "label": "Reasoning Effort",
                        "validate": {
                          "enum": [
                            "minimal",
                            "low",
                            "medium",
                            "high"
                          ]
                        }
                      }
                    ],
                    "restore": {
                      "expect": {
                        "stop": {
                          "mode": "chose"
                        },
                        "model": {
                          "mode": "chose",
                          "label": "gpt-5-chat-latest (system)GPT-5 model used in ChatGPT"
                        },
                        "select": {
                          "label": "Create a Chat Completion (GPT and o1 models)"
                        },
                        "messages": {
                          "mode": "chose",
                          "items": [
                            {
                              "role": {
                                "mode": "chose",
                                "label": "Developer / System"
                              }
                            },
                            {
                              "role": {
                                "mode": "chose",
                                "label": "User"
                              }
                            }
                          ]
                        },
                        "logit_bias": {
                          "mode": "chose"
                        },
                        "tool_choice": {
                          "mode": "chose",
                          "label": "Empty"
                        },
                        "response_format": {
                          "mode": "chose",
                          "label": "Text"
                        },
                        "reasoning_effort": {
                          "mode": "chose",
                          "label": "Empty"
                        },
                        "additionalParameters": {
                          "mode": "chose"
                        }
                      },
                      "parameters": {
                        "__IMTCONN__": {
                          "data": {
                            "scoped": "true",
                            "connection": "openai-gpt-3"
                          },
                          "label": "My OpenAI connection"
                        }
                      }
                    },
                    "designer": {
                      "x": 1547,
                      "y": 6
                    },
                    "interface": [
                      {
                        "name": "result",
                        "type": "any",
                        "label": "Result"
                      },
                      {
                        "name": "id",
                        "type": "text",
                        "label": "ID"
                      },
                      {
                        "name": "object",
                        "type": "text",
                        "label": "Object"
                      },
                      {
                        "name": "created",
                        "type": "date",
                        "label": "Created"
                      },
                      {
                        "name": "model",
                        "type": "text",
                        "label": "Model"
                      },
                      {
                        "name": "choices",
                        "spec": [
                          {
                            "name": "text",
                            "type": "text",
                            "label": "Text"
                          },
                          {
                            "name": "index",
                            "type": "number",
                            "label": "Index"
                          },
                          {
                            "name": "logprobs",
                            "type": "text",
                            "label": "Log Probs"
                          },
                          {
                            "name": "finish_reason",
                            "type": "text",
                            "label": "Finish Reason"
                          },
                          {
                            "name": "message",
                            "spec": [
                              {
                                "name": "role",
                                "type": "text",
                                "label": "Role"
                              },
                              {
                                "name": "content",
                                "type": "text",
                                "label": "Content"
                              },
                              {
                                "name": "tool_calls",
                                "spec": [
                                  {
                                    "name": "id",
                                    "type": "text",
                                    "label": "ID"
                                  },
                                  {
                                    "name": "type",
                                    "type": "text",
                                    "label": "Type"
                                  },
                                  {
                                    "name": "function",
                                    "spec": [
                                      {
                                        "name": "name",
                                        "type": "text",
                                        "label": "Name"
                                      },
                                      {
                                        "name": "arguments",
                                        "type": "text",
                                        "label": "Arguments"
                                      }
                                    ],
                                    "type": "collection",
                                    "label": "Function"
                                  }
                                ],
                                "type": "array",
                                "label": "Tool Calls"
                              },
                              {
                                "name": "refusal",
                                "type": "text",
                                "label": "Refusal"
                              },
                              {
                                "name": "annotations",
                                "spec": [
                                  {
                                    "name": "type",
                                    "type": "text",
                                    "label": "Type"
                                  },
                                  {
                                    "name": "url_citation",
                                    "spec": [
                                      {
                                        "name": "end_index",
                                        "type": "number",
                                        "label": "End Index"
                                      },
                                      {
                                        "name": "start_index",
                                        "type": "number",
                                        "label": "Start Index"
                                      },
                                      {
                                        "name": "title",
                                        "type": "text",
                                        "label": "Title"
                                      },
                                      {
                                        "name": "url",
                                        "type": "text",
                                        "label": "URL"
                                      }
                                    ],
                                    "type": "collection",
                                    "label": "URL Citation"
                                  }
                                ],
                                "type": "array",
                                "label": "Annotations"
                              }
                            ],
                            "type": "collection",
                            "label": "Message"
                          }
                        ],
                        "type": "array",
                        "label": "Choices"
                      },
                      {
                        "name": "usage",
                        "spec": [
                          {
                            "name": "prompt_tokens",
                            "type": "number",
                            "label": "Prompt Tokens"
                          },
                          {
                            "name": "completion_tokens",
                            "type": "text",
                            "label": "Completion Tokens"
                          },
                          {
                            "name": "total_tokens",
                            "type": "number",
                            "label": "Total Tokens"
                          },
                          {
                            "name": "prompt_tokens_details",
                            "spec": [
                              {
                                "name": "cached_tokens",
                                "type": "uinteger",
                                "label": "Cached Tokens"
                              },
                              {
                                "name": "text_tokens",
                                "type": "uinteger",
                                "label": "Text Tokens"
                              },
                              {
                                "name": "image_tokens",
                                "type": "uinteger",
                                "label": "Image Tokens"
                              },
                              {
                                "name": "audio_tokens",
                                "type": "uinteger",
                                "label": "Audio Tokens"
                              }
                            ],
                            "type": "collection",
                            "label": "Prompt Tokens Details"
                          },
                          {
                            "name": "completion_tokens_details",
                            "spec": [
                              {
                                "name": "reasoning_tokens",
                                "type": "uinteger",
                                "label": "Reasoning Tokens"
                              },
                              {
                                "name": "text_tokens",
                                "type": "uinteger",
                                "label": "Text Tokens"
                              },
                              {
                                "name": "audio_tokens",
                                "type": "uinteger",
                                "label": "Audio Tokens"
                              },
                              {
                                "name": "accepted_prediction_tokens",
                                "type": "uinteger",
                                "label": "Accepted Prediction Tokens"
                              },
                              {
                                "name": "rejected_prediction_tokens",
                                "type": "uinteger",
                                "label": "Rejected Prediction Tokens"
                              }
                            ],
                            "type": "collection",
                            "label": "Completion Tokens Details"
                          }
                        ],
                        "type": "collection",
                        "label": "Usage"
                      },
                      {
                        "name": "service_tier",
                        "type": "text",
                        "label": "Service Tier"
                      },
                      {
                        "name": "system_fingerprint",
                        "type": "text",
                        "label": "System Fingerprint"
                      }
                    ],
                    "parameters": [
                      {
                        "name": "__IMTCONN__",
                        "type": "account:openai-gpt-3",
                        "label": "Connection",
                        "required": true
                      }
                    ]
                  },
                  "parameters": {
                    "__IMTCONN__": 3029843
                  }
                },
                {
                  "id": 8,
                  "mapper": {
                    "name": "ai_response",
                    "value": "{{7.choices[].message.content}}"
                  },
                  "module": "util:SetVariable",
                  "version": 1,
                  "metadata": {
                    "designer": {
                      "x": 1926,
                      "y": 0
                    }
                  }
                },
                {
                  "id": 9,
                  "mapper": null,
                  "module": "builtin:BasicRouter",
                  "routes": [
                    {
                      "flow": [
                        {
                          "id": 11,
                          "mapper": {
                            "url": "https://graph.facebook.com/v18.0/{{PHONE_NUMBER_ID}}/messages",
                            "body": "{\"messaging_product\": \"whatsapp\", \"to\": \"{{3.phone}}\", \"type\": \"text\", \"text\": {\"body\": \"{{8.ai_response}}\"}}",
                            "method": "POST",
                            "headers": [
                              {
                                "name": "Authorization",
                                "value": "Bearer {{ACCESS_TOKEN}}"
                              },
                              {
                                "name": "Content-Type",
                                "value": "application/json"
                              }
                            ],
                            "bodyType": "raw"
                          },
                          "module": "http:ActionSendData",
                          "version": 3,
                          "metadata": {
                            "designer": {
                              "x": 2400,
                              "y": 14,
                              "messages": [
                                {
                                  "message": "Value must not be empty.",
                                  "category": "setup",
                                  "severity": "error"
                                }
                              ]
                            }
                          }
                        },
                        {
                          "id": 12,
                          "mapper": {
                            "values": {
                              "4": "{{now}}",
                              "8": "{{add(ifempty(4.I; 0); 1)}}"
                            },
                            "sheetId": "",
                            "rowNumber": "{{ifempty(4.__ROW_NUMBER__; 6.__ROW_NUMBER__)}}",
                            "spreadsheetId": ""
                          },
                          "module": "google-sheets:updateRow",
                          "version": 2,
                          "metadata": {
                            "designer": {
                              "x": 2700,
                              "y": 0,
                              "messages": [
                                {
                                  "message": "Referenced module 'Google Sheets - Add a Row' [6] is not accessible.",
                                  "category": "reference",
                                  "severity": "warning"
                                }
                              ]
                            }
                          },
                          "parameters": {
                            "__IMTCONN__": null
                          }
                        }
                      ]
                    }
                  ],
                  "version": 1,
                  "metadata": {
                    "designer": {
                      "x": 2185,
                      "y": 0
                    }
                  },
                  "parameters": {
                    "else": 0
                  }
                }
              ]
            }
          ],
          "version": 1,
          "metadata": {
            "designer": {
              "x": 1200,
              "y": 0
            }
          },
          "parameters": {
            "else": 0
          }
        }
      ],
      "name": "Antigravity WhatsApp AI Agent",
      "metadata": {
        "instant": true,
        "version": 1,
        "designer": {
          "orphans": []
        },
        "scenario": {
          "dlq": false,
          "slots": null,
          "dataloss": false,
          "maxErrors": 3,
          "autoCommit": true,
          "roundtrips": 1,
          "sequential": false,
          "confidential": false,
          "freshVariables": false,
          "autoCommitTriggerLast": true
        }
      }
    },
    "scheduling": {
      "type": "immediately"
    },
    "concept": false,
    "created": "2025-12-30T01:09:37.886Z",
    "last_edit": "2025-12-30T01:09:37.886Z",
    "metadata": {
      "input_spec": [],
      "output_spec": []
    },
    "idSequence": 15
  }
}