{
  "product": "happytree-node.workflow",
  "formatVersion": 1,
  "blueprint": {
    "name": "E06 \u00B7 02 Preparar lembretes para revis\u00E3o",
    "nodes": [
      {
        "id": "fonte",
        "type": "files.read-json",
        "settings": {
          "sourceId": "__htn_configurar__"
        },
        "x": 0,
        "y": 0
      },
      {
        "id": "tabela",
        "type": "tables.from-json",
        "settings": {},
        "x": 290,
        "y": 0
      },
      {
        "id": "autorizados",
        "type": "tables.filter",
        "settings": {
          "comparison": "Igual a",
          "value": "sim",
          "ignoreCase": false,
          "column": "contato_autorizado"
        },
        "x": 580,
        "y": 0
      },
      {
        "id": "entregues",
        "type": "tables.filter",
        "settings": {
          "comparison": "Igual a",
          "value": "entregue",
          "ignoreCase": false,
          "column": "status"
        },
        "x": 870,
        "y": 0
      },
      {
        "id": "janela-inicio",
        "type": "tables.filter",
        "settings": {
          "comparison": "Maior ou igual",
          "value": "5",
          "ignoreCase": false,
          "column": "dias_desde_compra"
        },
        "x": 1160,
        "y": 0
      },
      {
        "id": "janela-fim",
        "type": "tables.filter",
        "settings": {
          "comparison": "Menor ou igual",
          "value": "10",
          "ignoreCase": false,
          "column": "dias_desde_compra"
        },
        "x": 0,
        "y": 180
      },
      {
        "id": "unicos",
        "type": "tables.distinct",
        "settings": {
          "keys": "compra_id",
          "keep": "Primeiro",
          "ignoreCase": false
        },
        "x": 290,
        "y": 180
      },
      {
        "id": "cada-compra",
        "type": "flow.foreach",
        "settings": {
          "maxItems": 100
        },
        "x": 580,
        "y": 180
      },
      {
        "id": "rascunho",
        "type": "communications.whatsapp-data",
        "settings": {
          "key": "guia06-pesquisa-{{/compra_id}}",
          "targetType": "Telefone",
          "to": "{{/telefone}}",
          "body": "Ol\u00E1, {{/cliente}}! Como foi a experi\u00EAncia da compra {{/compra_id}}? Quando puder, responda \u00E0 pesquisa: {{/link_pesquisa}}. Obrigado!",
          "browser": "Google Chrome",
          "sendMode": "Somente preparar",
          "closeAfterSend": true,
          "batchDelaySeconds": 8,
          "attachmentSourceId": "",
          "attachmentMode": "Documento"
        },
        "x": 870,
        "y": 180
      },
      {
        "id": "fim",
        "type": "flow.end",
        "settings": {
          "loopId": "cada-compra"
        },
        "x": 1160,
        "y": 180
      }
    ],
    "edges": [
      {
        "source": "fonte",
        "target": "tabela",
        "order": 0
      },
      {
        "source": "tabela",
        "target": "autorizados",
        "order": 0
      },
      {
        "source": "autorizados",
        "target": "entregues",
        "order": 0
      },
      {
        "source": "entregues",
        "target": "janela-inicio",
        "order": 0
      },
      {
        "source": "janela-inicio",
        "target": "janela-fim",
        "order": 0
      },
      {
        "source": "janela-fim",
        "target": "unicos",
        "order": 0
      },
      {
        "source": "unicos",
        "target": "cada-compra",
        "order": 0
      },
      {
        "source": "cada-compra",
        "target": "rascunho",
        "order": 0
      },
      {
        "source": "rascunho",
        "target": "fim",
        "order": 0
      }
    ],
    "schemaVersion": 1
  },
  "requiredBindings": [
    {
      "nodeId": "fonte",
      "nodeName": "Ler arquivo JSON",
      "property": "sourceId",
      "title": "Fonte do projeto",
      "kind": "project-source"
    }
  ]
}