Skip to content

Instantly share code, notes, and snippets.

@MKtalk
Created August 17, 2018 07:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MKtalk/740250aa2e00af32714f2681ae2a9a21 to your computer and use it in GitHub Desktop.
Save MKtalk/740250aa2e00af32714f2681ae2a9a21 to your computer and use it in GitHub Desktop.
간단한 설문 조사 챗봇과 구글 설문지 연동
def set_pools(self, event, context, **kwargs):
q1 = kwargs.get('question1') # slots id 와 대응
q2 = kwargs.get('question2')
form_url = 'https://docs.google.com/forms/d/e/1FAIpQLScsCKP5Arszf84igEzoL5Yrbr5qcZIND9a4NeJyNw_onUUavw/formResponse'
params = '?entry.1894278833={}&entry.281957015={}'.format(q1, q2)
url = form_url + params
requests.post(url)
msg = '설문이 등록 되었습니다.'.format(q1, q2)
self.send_message(msg)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment