{"section":"tutorials","requestedLocale":"en","requestedSlug":"using-active-triggering-of-flows","locale":"en","slug":"using-active-triggering-of-flows","path":"docs/en/tutorials/weni-by-vtex/chats/using-active-triggering-of-flows.md","branch":"main","content":"The active flow trigger allows an agent to send a flow to one or more contacts and contact groups, also enabling the initiation of a conversation with desired contacts through WhatsApp message templates.\n\nIn this article, we will cover:\n\n- Enabling an existing flow for sending in Chats\n- Creating a flow that sends a message template\n- Activating the flow trigger function in Chats settings\n- Triggering a flow in Chats\n\n**Enabling an Existing Flow for Sending in Chats**\n\nAny existing flow can be triggered through Chats. To do this, simply access\n**Flows**.\n\n![](https://cdn.statically.io/gh/vtexdocs/help-center-content/refs/heads/main/docs/en/tutorials/weni-by-vtex/chats/using-active-triggering-of-flows_1.png)\n\nNext, select the desired flow and click on the **label** button.\n\n![](https://cdn.statically.io/gh/vtexdocs/help-center-content/refs/heads/main/docs/en/tutorials/weni-by-vtex/chats/using-active-triggering-of-flows_2.png)\n\nFor the flow to be available in Chats, it needs to have a label named **chats**. If it's not available, create a new label named **chats** as shown in the example:\n\n![](https://cdn.statically.io/gh/vtexdocs/help-center-content/refs/heads/main/docs/en/tutorials/weni-by-vtex/chats/using-active-triggering-of-flows_3.png)\n\nBy clicking **create**, your flow will automatically have the created label and will be available for use in Chats.\n\n## Creating a flow to send a message template\n\nFlow creation is reserved for manager users, meaning only users with\nadministrator, moderator, and collaborator permissions can create flows.\n\nTo send message templates, they must already be registered and approved by\nWhatsApp. See [this\narticle](/en/docs/tutorials/whatsapp-how-to-create-template-messages)\nif you have any questions.\n\nAccess your project, then go to the **Flows** module:\n\n![](https://cdn.statically.io/gh/vtexdocs/help-center-content/refs/heads/main/docs/en/tutorials/weni-by-vtex/chats/using-active-triggering-of-flows_4.png)\n\nClick the **Create Flow** button:\n\n![](https://cdn.statically.io/gh/vtexdocs/help-center-content/refs/heads/main/docs/en/tutorials/weni-by-vtex/chats/using-active-triggering-of-flows_5.png)\n\nNext, provide the details about your flow:\n\n![](https://cdn.statically.io/gh/vtexdocs/help-center-content/refs/heads/main/docs/en/tutorials/weni-by-vtex/chats/using-active-triggering-of-flows_6.png)\n\nInsira os cards de acordo com as ações que desejar no seu fluxo, para que o fluxo seja de envio de modelo de mensagens, selecione o card do tipo enviar mensagem e clique em **whatsapp.**\n\n![](https://cdn.statically.io/gh/vtexdocs/help-center-content/refs/heads/main/docs/en/tutorials/weni-by-vtex/chats/using-active-triggering-of-flows_7.png)\n\nYour registered templates should appear. Select the desired one and insert the variable if applicable, click OK and finalize your flow.\n\n## Enabling the flow trigger function in Chats settings\n\nFor the flow trigger function to be available to agents, it must first be\nenabled in the desired department settings.\n\nGo to **Settings \\> Chats \\> Open**.\n\n![](https://cdn.statically.io/gh/vtexdocs/help-center-content/refs/heads/main/docs/en/tutorials/weni-by-vtex/chats/using-active-triggering-of-flows_8.png)\n\nOn the first screen of the department, you will see the button to activate the flow trigger. It will be deactivated; **activate** it and click **save**.\n\n![](https://cdn.statically.io/gh/vtexdocs/help-center-content/refs/heads/main/docs/en/tutorials/weni-by-vtex/chats/using-active-triggering-of-flows_9.png)\n\n### Triggering a flow in Chats\n\nAccess **Chats**.\n\n![](https://cdn.statically.io/gh/vtexdocs/help-center-content/refs/heads/main/docs/en/tutorials/weni-by-vtex/chats/using-active-triggering-of-flows_10.png)\n\nOn the Chats screen, click the button below **Preferences \\> Flows**, as shown in the example:\n\n![](https://cdn.statically.io/gh/vtexdocs/help-center-content/refs/heads/main/docs/en/tutorials/weni-by-vtex/chats/using-active-triggering-of-flows_11.png)\n\nSelect the desired contacts and click **Continue**.\n\n![](https://cdn.statically.io/gh/vtexdocs/help-center-content/refs/heads/main/docs/en/tutorials/weni-by-vtex/chats/using-active-triggering-of-flows_12.png)\n\nSelect the desired flow, then click the **Send** button.\n\n![](https://cdn.statically.io/gh/vtexdocs/help-center-content/refs/heads/main/docs/en/tutorials/weni-by-vtex/chats/using-active-triggering-of-flows_13.png)\n\nThat's it! The contacts who received the flows will appear in a waiting list, and once the contact responds, you will be able to start the chat normally with them."}