- π Hi, Iβm @Gensimmy
- π Iβm interested in ... from flask import Flask, request from twilio.twiml.messaging_response import MessagingResponse
app = Flask(name)
@app.route("/whatsapp", methods=['POST']) def whatsapp_reply(): incoming_msg = request.values.get('Body', '').lower() resp = MessagingResponse() msg = resp.message()
if 'hello' in incoming_msg:
msg.body("Hi! How can I help you?")
else:
msg.body("I'm a bot, reply with 'hello' to start!")
return str(resp)
if name == "main": app.run(debug=True)