Skip to content

Instantly share code, notes, and snippets.

@picsoung
Created May 28, 2024 14:57
Show Gist options
  • Save picsoung/d393eb78f2eccbe683b10693fa131f6f to your computer and use it in GitHub Desktop.
Save picsoung/d393eb78f2eccbe683b10693fa131f6f to your computer and use it in GitHub Desktop.
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