Skip to content

Instantly share code, notes, and snippets.

@pash90
Created February 3, 2020 21:55
Show Gist options
  • Save pash90/7a4b14adedcd701d23f61a66d205355a to your computer and use it in GitHub Desktop.
Save pash90/7a4b14adedcd701d23f61a66d205355a to your computer and use it in GitHub Desktop.
Bolt
bot:
format: chat
flows:
- name: Welcome
entry_flow: true
flow_elements:
- message_thread:
name: Introduction
entry_element: true
messages:
- text:
text: "Hello, \U0001F916!\n\nI'm Bolt ⚡"
- user_input_group:
require_confirmation: false
items:
- text:
slot_name: name
label: name
prompt: What's your name?
- text:
text: 'Great! Nice to meet you ${name}'
continue_to: '_:Add to HubSpot'
- message_thread:
name: Check for Signup
quick_nav:
prompt: Would you like to sign up for our newsletter?
choices:
- display_name: Yes ✅
continue_to: '_:Sign Up for Newsletter'
- display_name: No ❌
continue_to: '_:Handle Exit'
- message_thread:
name: Sign Up for Newsletter
messages:
- text:
text: Awesome!
- user_input_group:
require_confirmation: false
items:
- email:
slot_name: email
label: email
prompt: Can I have your email address?
continue_to: '_:Say Welcome'
- code:
name: Say Welcome
handler: sendWelcomeEmailToUser
continue_to: 'Welcome:Handle Success'
- code:
name: Add to HubSpot
handler: addUserToHubSpot
continue_to: 'Welcome:Check for Signup'
- message_thread:
name: Handle Exit
messages:
- text:
text: "No problems! Have a nice day \U0001F600"
- message_thread:
name: Handle Success
messages:
- text:
text: Thanks for signing up! You should get a welcome email soon.
- text:
text: "Have an amazing rest of the day \U0001F600"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment