{
  "version": "6.1",
  "id": "clvqpyldu0005pub4sj4fi9sx",
  "name": "Calculadora ràpida de glúcids",
  "events": [
    {
      "id": "idpi6p77jtl07g95i59472ov",
      "outgoingEdgeId": "u6s1xbl0f22isp1yw59wgjpc",
      "graphCoordinates": {
        "x": 0,
        "y": 0
      },
      "type": "start"
    }
  ],
  "groups": [
    {
      "id": "x2x6f3wzxrtym647g57e4382",
      "title": "Esport",
      "graphCoordinates": {
        "x": 190.73,
        "y": 331.22
      },
      "blocks": [
        {
          "id": "vivxy8mvydql0e5u6tecpx1q",
          "type": "text",
          "content": {
            "richText": [
              {
                "type": "p",
                "children": [
                  {
                    "text": "Benvingut a la Calculadora ràpida de carbohidrats!"
                  }
                ]
              }
            ]
          }
        },
        {
          "id": "dcopvbfbdvhq0te4g760pgn2",
          "type": "text",
          "content": {
            "richText": [
              {
                "type": "p",
                "children": [
                  {
                    "text": "T'ajudaré a calcular quant combustible necessites per rendir al màxim. Comencem! 🚴‍♂️🏃"
                  }
                ]
              }
            ]
          }
        },
        {
          "id": "jdvfdtxzdce1busleqs9ure0",
          "type": "text",
          "content": {
            "richText": [
              {
                "type": "p",
                "children": [
                  {
                    "text": "Swimrun 🏊‍♂️🏃"
                  }
                ]
              }
            ]
          }
        },
        {
          "id": "yura2cvzxy8qea4x1m71ulcy",
          "outgoingEdgeId": "gnwha6pow6q6occm6gn3d9o3",
          "type": "choice input",
          "items": [
            {
              "id": "omopw9oy3srowddb0o3f4xs5",
              "content": "Nage 🏊‍♂️"
            },
            {
              "id": "anpwbn8hvolyod2vsh06et68",
              "content": "Vélo 🚴‍♂️"
            },
            {
              "id": "uto1ghh5c6icwygszercxybz",
              "content": "Course 🏃"
            },
            {
              "id": "sau0amab8nmeqfqyhhzle03v",
              "content": "Triatló 🏊‍♂️🚴‍♂️🏃"
            },
            {
              "id": "tqvjhk0qmvn43h5hyc9ibdd3",
              "content": "Swimrun 🏊‍♂️🏃"
            },
            {
              "id": "mu0m5v7m55vfikbs29lpcm3h",
              "outgoingEdgeId": "hbh8d8q39wzgy1foclpy15s2",
              "content": "Autre"
            }
          ],
          "options": {
            "variableId": "vc5qxl1y2rzmy7uqeasq8bd3q"
          }
        }
      ]
    },
    {
      "id": "fdcibngr9fycd37o46dwlvuq",
      "title": "Durada",
      "graphCoordinates": {
        "x": 589.06,
        "y": 781.87
      },
      "blocks": [
        {
          "id": "lglw9gtixolxnch9sqy4djyj",
          "type": "text",
          "content": {
            "richText": [
              {
                "type": "p",
                "children": [
                  {
                    "text": "Genial! Quant de temps faràs aquesta activitat?"
                  }
                ]
              }
            ]
          }
        },
        {
          "id": "hcp2ebjsxmzjydpp6qkym5fo",
          "outgoingEdgeId": "pow7libu0danm0n84k5dvrh2",
          "type": "text input",
          "options": {
            "variableId": "vc5qxl1y2rzmy7uqeasq8bd3q"
          }
        }
      ]
    },
    {
      "id": "ujeec2r6ph4l0gbdlzvfen9c",
      "title": "Intensitat",
      "graphCoordinates": {
        "x": 605.2,
        "y": 329.71
      },
      "blocks": [
        {
          "id": "gt4pnocv289vzg7lbrqvuld6",
          "type": "text",
          "content": {
            "richText": [
              {
                "type": "p",
                "children": [
                  {
                    "text": "Fàcil"
                  }
                ]
              }
            ]
          }
        },
        {
          "id": "je03xo9p9vipnvw07y859ng7",
          "outgoingEdgeId": "ee0zj9456t8oj1cbgn0d5pci",
          "type": "text input",
          "options": {
            "variableId": "veiz4m7fe9er6k5qy676qwhfb"
          }
        }
      ]
    },
    {
      "id": "n45do8ao8c2fzgu107wdsrr3",
      "title": "Generat per IA",
      "graphCoordinates": {
        "x": 1008.15,
        "y": 332.34
      },
      "blocks": [
        {
          "id": "zm8sjanqyezg1pk427t1ywph",
          "type": "text",
          "content": {
            "richText": [
              {
                "type": "p",
                "children": [
                  {
                    "text": "D’accord ! À quel intensité vas-tu ?"
                  }
                ]
              }
            ]
          }
        },
        {
          "id": "zxvlig3wytb4n7s81prfszau",
          "outgoingEdgeId": "r0sy9h8oux00p1pqkuczhg9n",
          "type": "rating input",
          "options": {
            "variableId": "vprpht8foqzxv4bs8hlozqoq7",
            "length": 7,
            "startsAt": 1,
            "labels": {
              "left": "Easy",
              "right": "Racing"
            }
          }
        }
      ]
    },
    {
      "id": "er51741iln7nja5jn8qrkyeh",
      "title": "IA générative",
      "graphCoordinates": {
        "x": 1730.53,
        "y": 325.38
      },
      "blocks": [
        {
          "id": "cnof27ok7s9d2ly8psdyoe4y",
          "type": "openai",
          "options": {
            "credentialsId": "clvqq3hey0007pub4almxnhk2",
            "action": "Create chat completion",
            "model": "gpt-4-turbo",
            "messages": [
              {
                "role": "system",
                "content": "La teva tasca és estimar quants carbohidrats ha d'ingerir un atleta durant una cursa. També has de generar una estratègia de nutrició senzilla.\n\nTreballes per a una empresa anomenada Precision Hydration i vens gels de 30g amb o sense cafeïna i gels de 90g amb o sense cafeïna.\n\nLa teva resposta s'ha de basar en el context dins de l'element XML <context>\n\n<context>\nEstic entrenant per {{Sport}}. El meu objectiu de temps és {{Duration}}. En una escala d'1 a 7, sent 1 fàcil i 7 cursa intensa, diria {{Intensity}}.\n</context>\n\nEvita explicar massa la teva suposició, proporciona directament els carbohidrats totals, després una breu explicació i finalment l'estratègia de nutrició."
              }
            ],
            "responseMapping": [
              {
                "variableId": "vi3aeka9tjab0hmuqnc1uvzjz"
              }
            ]
          }
        },
        {
          "id": "ncqf0arxg4a4gry512dqk2v7",
          "type": "text",
          "content": {
            "richText": [
              {
                "type": "p",
                "children": [
                  {
                    "text": "{{Assistant message}}"
                  }
                ]
              }
            ]
          }
        },
        {
          "id": "peycxrwyv23d396c27j75nsy",
          "outgoingEdgeId": "bk3wsui0h91kbf9zobqh15pb",
          "type": "Email",
          "options": {
            "isCustomBody": true,
            "recipients": [
              "{{Email}}"
            ],
            "subject": "El teu pla de nutrició",
            "body": "Hola,\n\nGràcies per respondre...\n\nAquesta és l'estimació:\n\n{{Assistant message}}\n\nFins aviat,\nPerformance Hydration."
          }
        }
      ]
    },
    {
      "id": "i477wpsojbu2fbqct541qqa1",
      "title": "Correu electrònic",
      "graphCoordinates": {
        "x": 1370.12,
        "y": 338.17
      },
      "blocks": [
        {
          "id": "ro1y65vqxcozqxla4ghgrvs1",
          "type": "text",
          "content": {
            "richText": [
              {
                "type": "p",
                "children": [
                  {
                    "text": "Pour garder une trace de tes calculs de glucides et pour une référence facile à l’avenir, pourrais-tu me donner ton adresse e-mail ?\nThis way, je peux t’envoyer un résumé personnalisé de ton plan de carburant. 📧"
                  }
                ]
              }
            ]
          }
        },
        {
          "id": "u9vbh5h4009ujs3a2meknec5",
          "type": "text",
          "content": {
            "richText": [
              {
                "type": "p",
                "children": [
                  {
                    "text": "Així, et puc enviar un resum personalitzat del teu pla d'alimentació. 📧"
                  }
                ]
              }
            ]
          }
        },
        {
          "id": "prd6ni8tnjoi62tj29dnthlj",
          "outgoingEdgeId": "d7ihuksdgn0gdqm7138xnzf4",
          "type": "email input",
          "options": {
            "variableId": "vb0jqpcdbqr7c2fq1ijs7j3wt"
          }
        }
      ]
    },
    {
      "id": "h709w0mid2cu06xe0vu5agj1",
      "title": "CTA",
      "graphCoordinates": {
        "x": 2080.11,
        "y": 324.59
      },
      "blocks": [
        {
          "id": "q7w7wypml8fpoqmrwdyv5zfm",
          "type": "text",
          "content": {
            "richText": [
              {
                "type": "p",
                "children": [
                  {
                    "text": "Maintenant que tu connais tes besoins en glucides, souhaites-tu consulter notre sélection des meilleurs gels énergétiques et autres produits de carburant ? 🛒"
                  }
                ]
              }
            ]
          }
        },
        {
          "id": "g0nd8jfs64h90lxy41ztufkf",
          "type": "choice input",
          "items": [
            {
              "id": "y7w3u1i6np6umnwxfs7u7x4a",
              "outgoingEdgeId": "nnaxabsjpk161s6kygdxm68k",
              "content": "Acheter maintenant"
            }
          ]
        }
      ]
    },
    {
      "id": "d5ihz070zlpirjzz26hx8ak4",
      "title": "",
      "graphCoordinates": {
        "x": 2425.42,
        "y": 591.25
      },
      "blocks": [
        {
          "id": "tukplu3km8f59cuqyrwhlnjz",
          "type": "Redirect",
          "options": {
            "url": "https://www.precisionhydration.com/eu/en/products/pf-30-gel/"
          }
        }
      ]
    },
    {
      "id": "irklbryotgaxozsrot5qxeoc",
      "title": "",
      "graphCoordinates": {
        "x": 269.91,
        "y": -3.13
      },
      "blocks": [
        {
          "id": "jl3b2nltipe5b5ejtqbfgx9j",
          "type": "text",
          "content": {
            "richText": [
              {
                "type": "p",
                "children": [
                  {
                    "text": "Tu dois ajouter tes identifiants OpenAI pour activer ce bot. 🪄\nUne fois terminé, supprime ce groupe et connecte le Start avec le groupe Sport,\n🚀"
                  }
                ]
              }
            ]
          }
        },
        {
          "id": "mnakzjvql9qrsctwscctzx74",
          "type": "text",
          "content": {
            "richText": [
              {
                "type": "p",
                "children": [
                  {
                    "text": "Quan estigui fet, esborra aquest grup i connecta el "
                  },
                  {
                    "bold": true,
                    "text": "Començar"
                  },
                  {
                    "text": " esdeveniment amb "
                  },
                  {
                    "bold": true,
                    "text": "Grup esportiu"
                  },
                  {
                    "text": " 🚀"
                  }
                ]
              }
            ]
          }
        }
      ]
    }
  ],
  "edges": [
    {
      "id": "hbh8d8q39wzgy1foclpy15s2",
      "from": {
        "blockId": "yura2cvzxy8qea4x1m71ulcy",
        "itemId": "mu0m5v7m55vfikbs29lpcm3h"
      },
      "to": {
        "groupId": "fdcibngr9fycd37o46dwlvuq"
      }
    },
    {
      "id": "gnwha6pow6q6occm6gn3d9o3",
      "from": {
        "blockId": "yura2cvzxy8qea4x1m71ulcy"
      },
      "to": {
        "groupId": "ujeec2r6ph4l0gbdlzvfen9c"
      }
    },
    {
      "id": "pow7libu0danm0n84k5dvrh2",
      "from": {
        "blockId": "hcp2ebjsxmzjydpp6qkym5fo"
      },
      "to": {
        "groupId": "ujeec2r6ph4l0gbdlzvfen9c"
      }
    },
    {
      "id": "ee0zj9456t8oj1cbgn0d5pci",
      "from": {
        "blockId": "je03xo9p9vipnvw07y859ng7"
      },
      "to": {
        "groupId": "n45do8ao8c2fzgu107wdsrr3"
      }
    },
    {
      "id": "r0sy9h8oux00p1pqkuczhg9n",
      "from": {
        "blockId": "zxvlig3wytb4n7s81prfszau"
      },
      "to": {
        "groupId": "i477wpsojbu2fbqct541qqa1"
      }
    },
    {
      "id": "d7ihuksdgn0gdqm7138xnzf4",
      "from": {
        "blockId": "prd6ni8tnjoi62tj29dnthlj"
      },
      "to": {
        "groupId": "er51741iln7nja5jn8qrkyeh"
      }
    },
    {
      "id": "bk3wsui0h91kbf9zobqh15pb",
      "from": {
        "blockId": "peycxrwyv23d396c27j75nsy"
      },
      "to": {
        "groupId": "h709w0mid2cu06xe0vu5agj1"
      }
    },
    {
      "id": "nnaxabsjpk161s6kygdxm68k",
      "from": {
        "blockId": "g0nd8jfs64h90lxy41ztufkf",
        "itemId": "y7w3u1i6np6umnwxfs7u7x4a"
      },
      "to": {
        "groupId": "d5ihz070zlpirjzz26hx8ak4"
      }
    },
    {
      "from": {
        "eventId": "idpi6p77jtl07g95i59472ov"
      },
      "to": {
        "groupId": "irklbryotgaxozsrot5qxeoc"
      },
      "id": "u6s1xbl0f22isp1yw59wgjpc"
    }
  ],
  "variables": [
    {
      "id": "vc5qxl1y2rzmy7uqeasq8bd3q",
      "name": "Sport",
      "isSessionVariable": true
    },
    {
      "id": "veiz4m7fe9er6k5qy676qwhfb",
      "name": "Duration",
      "isSessionVariable": true
    },
    {
      "id": "vprpht8foqzxv4bs8hlozqoq7",
      "name": "Intensity",
      "isSessionVariable": true
    },
    {
      "id": "vi3aeka9tjab0hmuqnc1uvzjz",
      "name": "Assistant message",
      "isSessionVariable": true
    },
    {
      "id": "vb0jqpcdbqr7c2fq1ijs7j3wt",
      "name": "Email",
      "isSessionVariable": true
    }
  ],
  "theme": {},
  "selectedThemeTemplateId": null,
  "settings": {},
  "createdAt": "2024-05-03T13:37:03.426Z",
  "updatedAt": "2024-05-03T13:48:08.061Z",
  "icon": "🏃‍♂️",
  "folderId": null,
  "publicId": "quick-carb-calculator-j4fi9sx",
  "customDomain": null,
  "workspaceId": "proWorkspace",
  "resultsTablePreferences": null,
  "isArchived": false,
  "isClosed": false,
  "whatsAppCredentialsId": null,
  "riskLevel": null,
  "organizationId": null
}