Skip to content

Instantly share code, notes, and snippets.

@bastienbot
Last active June 18, 2020 10:25
Show Gist options
  • Save bastienbot/3dfeb288798955e601737109d2719ab1 to your computer and use it in GitHub Desktop.
Save bastienbot/3dfeb288798955e601737109d2719ab1 to your computer and use it in GitHub Desktop.
start:
say "Hello stranger, I'm here to help you register to an awesome event 🥳"
goto name
name:
say Typing(2000)
say "My name is Eventobot, what's yours ?"
hold
remember firstname = event
say "Nice to meet you {{firstname}} 😎"
say Typing(2000)
say "I'd also need your last name just in case there is more than one {{firstname}} registered 😉."
hold
remember lastname = event
say "Perfect, now let me send you a confirmation for the event."
goto email
email:
say Typing(2000)
say "what's your email address ?"
hold
if (!Find("@", in=event)) {
say "It looks like your email is not valid 🤨"
goto email
}
remember email = event
do fields = { "firstname": firstname, "lastname": lastname, "email": email }
do newRecord = Fn("airtable", method="createRecord", spreadsheet_id="mydatabaseid", table_name="my_table_name", fields=fields)
say "I got everything I need, see you on tuesday for the awesome event!"
say "Bye! 👋"
goto end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment