from kapso.builder.flows import Flow
from kapso.builder.flows.nodes import StartNode, SendTextNode, WaitForResponseNode
# Replace with your WhatsApp config ID from Kapso
WHATSAPP_CONFIG_ID = 'replace_with_your_whatsapp_config_id_from_kapso'
# Create the flow
flow = Flow(
name="My First Flow",
description="A basic flow template"
)
# Add nodes and edges
start_node = StartNode(id="start")
welcome_node = SendTextNode(
id="welcome",
whatsapp_config_id=WHATSAPP_CONFIG_ID,
text="Welcome! How can I help you today?"
)
flow.add_node(start_node)
flow.add_node(welcome_node)
flow.add_edge("start", "welcome")