tsx scripts/register-hubspot-action.ts --update [register-hubspot-action] PATCH https://api.hubapi.com/automation/v4/actions/222852/263150482?hapikey=*** [register-hubspot-action] OK: { "actionUrl": "https://prompt-master-platform.replit.app/api/hubspot/workflow-action/execute", "published": true, "inputFields": [ { "typeDefinition": { "name": "template_id", "type": "enumeration", "fieldType": "select", "optionsUrl": "https://prompt-master-platform.replit.app/api/hubspot/workflow-action/definition" }, "supportedValueTypes": [ "STATIC_VALUE" ], "isRequired": true }, { "typeDefinition": { "name": "var_1", "type": "string", "fieldType": "text" }, "supportedValueTypes": [ "STATIC_VALUE" ], "isRequired": false }, { "typeDefinition": { "name": "var_2", "type": "string", "fieldType": "text" }, "supportedValueTypes": [ "STATIC_VALUE" ], "isRequired": false }, { "typeDefinition": { "name": "var_3", "type": "string", "fieldType": "text" }, "supportedValueTypes": [ "STATIC_VALUE" ], "isRequired": false }, { "typeDefinition": { "name": "var_4", "type": "string", "fieldType": "text" }, "supportedValueTypes": [ "STATIC_VALUE" ], "isRequired": false }, { "typeDefinition": { "name": "var_5", "type": "string", "fieldType": "text" }, "supportedValueTypes": [ "STATIC_VALUE" ], "isRequired": false }, { "typeDefinition": { "name": "btn_url_suffix", "type": "string", "fieldType": "text" }, "supportedValueTypes": [ "STATIC_VALUE" ], "isRequired": false } ], "objectRequestOptions": null, "inputFieldDependencies": [ { "dependentFieldNames": [ "var_4", "var_5", "btn_url_suffix", "var_1", "var_2", "var_3" ], "controllingFieldName": "template_id", "dependencyType": "SINGLE_FIELD" } ], "labels": { "en": { "inputFieldLabels": { "template_id": "WhatsApp Template", "var_1": "Variable 1 — fill only if template uses {{1}}", "var_2": "Variable 2 — fill only if template uses {{2}}", "var_3": "Variable 3 — fill only if template uses {{3}}", "var_4": "Variable 4 — fill only if template uses {{4}}", "var_5": "Variable 5 — fill only if template uses {{5}}", "btn_url_suffix": "URL button suffix (only if template has a dynamic URL button)" }, "inputFieldDescriptions": { "template_id": "Each option shows the full body, footer, button URLs and variables used by that template. Choose carefully — only the variables the template actually uses will be sent; extras are ignored.", "var_1": "Fill ONLY if the selected template uses {{1}}. Otherwise leave empty (it will be ignored). Type fixed text or insert a contact property token via the editor's Personalize button.", "var_2": "Fill ONLY if the selected template uses {{2}}. Otherwise leave empty (it will be ignored). Type fixed text or insert a contact property token via the editor's Personalize button.", "var_3": "Fill ONLY if the selected template uses {{3}}. Otherwise leave empty (it will be ignored). Type fixed text or insert a contact property token via the editor's Personalize button.", "var_4": "Fill ONLY if the selected template uses {{4}}. Otherwise leave empty (it will be ignored). Type fixed text or insert a contact property token via the editor's Personalize button.", "var_5": "Fill ONLY if the selected template uses {{5}}. Otherwise leave empty (it will be ignored). Type fixed text or insert a contact property token via the editor's Personalize button.", "btn_url_suffix": "Only used when the selected template has a dynamic URL button (the dropdown option will end with `{btn_url_suffix}` to make this explicit). Do NOT include http:// or https:// — just the suffix (e.g. 'order/12345')." }, "actionName": "Send WhatsApp (OnSMS)", "actionDescription": "Send a WhatsApp template via OnSMS using the WABA service connected to this portal.", "appDisplayName": "OnSMS", "actionCardContent": "Send WhatsApp: {{template_id}}" }, "pt-br": { "inputFieldLabels": { "template_id": "Template WhatsApp", "var_1": "Variável 1 — preencha só se o template usar {{1}}", "var_2": "Variável 2 — preencha só se o template usar {{2}}", "var_3": "Variável 3 — preencha só se o template usar {{3}}", "var_4": "Variável 4 — preencha só se o template usar {{4}}", "var_5": "Variável 5 — preencha só se o template usar {{5}}", "btn_url_suffix": "Sufixo URL do botão (só se o template tiver botão URL dinâmico)" }, "inputFieldDescriptions": { "template_id": "Cada opção mostra o corpo completo, rodapé, URLs dos botões e variáveis usadas pelo template. Escolha com atenção — apenas as variáveis que o template realmente usa serão enviadas; extras são ignoradas.", "var_1": "Preencha APENAS se o template selecionado usar {{1}}. Caso contrário, deixe vazio (será ignorado). Digite texto fixo ou insira um token de propriedade do contato pelo botão Personalize do editor.", "var_2": "Preencha APENAS se o template selecionado usar {{2}}. Caso contrário, deixe vazio (será ignorado). Digite texto fixo ou insira um token de propriedade do contato pelo botão Personalize do editor.", "var_3": "Preencha APENAS se o template selecionado usar {{3}}. Caso contrário, deixe vazio (será ignorado). Digite texto fixo ou insira um token de propriedade do contato pelo botão Personalize do editor.", "var_4": "Preencha APENAS se o template selecionado usar {{4}}. Caso contrário, deixe vazio (será ignorado). Digite texto fixo ou insira um token de propriedade do contato pelo botão Personalize do editor.", "var_5": "Preencha APENAS se o template selecionado usar {{5}}. Caso contrário, deixe vazio (será ignorado). Digite texto fixo ou insira um token de propriedade do contato pelo botão Personalize do editor.", "btn_url_suffix": "Usado apenas quando o template selecionado tem botão URL dinâmico (a opção do dropdown termina com `{btn_url_suffix}` para deixar isso explícito). NÃO inclua http:// ou https:// — apenas o sufixo (ex.: 'pedido/12345')." }, "actionName": "Enviar WhatsApp (OnSMS)", "actionDescription": "Envia um template WhatsApp via OnSMS usando o serviço WABA vinculado a este portal.", "appDisplayName": "OnSMS", "actionCardContent": "Enviar WhatsApp: {{template_id}}" } }, "objectTypes": [ "0-1" ], "id": "263150482", "revisionId": "5", "functions": [] } >>> Guarde o definitionId abaixo para futuros updates: HUBSPOT_ACTION_DEFINITION_ID=263150482