Created
May 28, 2024 14:57
-
-
Save picsoung/d393eb78f2eccbe683b10693fa131f6f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flask import Flask | |
from flask import request | |
app = Flask(__name__) | |
@app.route('/') | |
def index(): | |
return 'Hello from Nico!' | |
@app.route('/webhook', methods=['POST']) | |
def typeform_webhook(): | |
print(request.json) | |
request_data = request.get_json() | |
print(request_data['form_response']['answers'][0]['choice']['label']) | |
return 'Typeform webhook' | |
if __name__ == '__main__': | |
app.run(host='0.0.0.0', port=5000) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment