Skip to content

Instantly share code, notes, and snippets.

@isamarietr
Created January 4, 2019 20:13
Show Gist options
  • Save isamarietr/b399bbdb66c089765fd5eadfc38457d8 to your computer and use it in GitHub Desktop.
Save isamarietr/b399bbdb66c089765fd5eadfc38457d8 to your computer and use it in GitHub Desktop.
{
"name": "send-personal-reminder",
"intents": [
{
"intent": "response_yes",
"examples": [
{
"text": "sounds good"
},
{
"text": "that's right"
},
{
"text": "of course"
},
{
"text": "right"
},
{
"text": "okay"
},
{
"text": "ok"
},
{
"text": "perfect"
},
{
"text": "sure"
},
{
"text": "exactly"
},
{
"text": "correct"
},
{
"text": "yes"
},
{
"text": "okie dokie"
},
{
"text": "I guess"
},
{
"text": "I suppose"
},
{
"text": "yup"
},
{
"text": "yah"
}
]
},
{
"intent": "response_change",
"examples": [
{
"text": "let's try again"
},
{
"text": "no, I want to change it"
},
{
"text": "I want to rewrite it"
},
{
"text": "change it"
},
{
"text": "modify"
},
{
"text": "I want to modify"
},
{
"text": "I want to set a different one"
},
{
"text": "no, let me tell you again"
},
{
"text": "no, I want to do it again"
}
],
"description": ""
},
{
"intent": "response_no",
"examples": [
{
"text": "forget it"
},
{
"text": "I don't think so"
},
{
"text": "nah"
},
{
"text": "quit"
},
{
"text": "exit"
},
{
"text": "incorrect"
},
{
"text": "not right"
},
{
"text": "not really"
},
{
"text": "nope"
},
{
"text": "not"
},
{
"text": "no"
},
{
"text": "that's wrong"
},
{
"text": "scratch that"
}
]
},
{
"intent": "add_reminder",
"examples": [
{
"text": "can you remind me to put the clothes in the dryer when I get home?"
},
{
"text": "I need to remember to pay the bills tonight"
},
{
"text": "can you remind me to call the doctor tomorrow?"
},
{
"text": "remind me to take out the trash"
},
{
"text": "remind me to look for flights for Florida"
},
{
"text": "I need to talk to John tonight, can you remind me?"
}
],
"description": "Create a reminder to do something. I'll send myself an email."
}
],
"entities": [],
"language": "en",
"metadata": {
"api_version": {
"major_version": "v1",
"minor_version": "2018-09-20"
}
},
"description": "",
"dialog_nodes": [
{
"type": "standard",
"title": "No, change it",
"output": {
"generic": [
{
"values": [
{
"text": "OK, we can change it... What would you want me to remind you?"
}
],
"response_type": "text",
"selection_policy": "sequential"
}
]
},
"parent": "node_5_1546530407565",
"metadata": {},
"next_step": {
"behavior": "jump_to",
"selector": "user_input",
"dialog_node": "node_2_1546542011168"
},
"conditions": "#response_change",
"dialog_node": "node_1_1546532166373",
"previous_sibling": "node_6_1546531855877"
},
{
"type": "standard",
"title": "No, cancel",
"output": {
"generic": [
{
"values": [
{
"text": "OK, I'll be here in case you'd like me to send you any other reminders..."
}
],
"response_type": "text",
"selection_policy": "sequential"
}
]
},
"parent": "node_5_1546530407565",
"metadata": {},
"conditions": "true",
"dialog_node": "node_2_1546532432186",
"previous_sibling": "node_1_1546532166373"
},
{
"type": "standard",
"title": "Yes, send email",
"output": {
"generic": []
},
"parent": "node_5_1546530407565",
"actions": [
{
"name": "YOUR-CF-NAMESPACE-HERE/examples/send-email-reminder",
"type": "server",
"parameters": {
"email": "$destination_email",
"reminder": "$reminder",
"conversation_id": "$conversation_id"
},
"credentials": "$private.cf_creds",
"result_variable": "context.cf_response"
}
],
"metadata": {},
"next_step": {
"behavior": "skip_user_input"
},
"conditions": "#response_yes",
"dialog_node": "node_6_1546531855877"
},
{
"type": "standard",
"title": "Email not sent",
"output": {
"generic": [
{
"values": [
{
"text": "Uh oh... something happened... Try again later..."
}
],
"response_type": "text",
"selection_policy": "sequential"
}
]
},
"parent": "node_6_1546531855877",
"metadata": {},
"conditions": "true",
"dialog_node": "node_2_1546534218626",
"previous_sibling": "node_1_1546534141746"
},
{
"type": "standard",
"title": "Email sent",
"output": {
"generic": [
{
"values": [
{
"text": "Cool! I just sent you an e-mail reminder ;-)"
}
],
"response_type": "text",
"selection_policy": "sequential"
}
]
},
"parent": "node_6_1546531855877",
"metadata": {},
"conditions": "$cf_response && $cf_response.code == 200",
"dialog_node": "node_1_1546534141746"
},
{
"type": "standard",
"title": "Confirm reminder",
"output": {
"generic": [
{
"values": [
{
"text": "You'd like me to remind you $reminder. Is that right?"
}
],
"response_type": "text",
"selection_policy": "sequential"
},
{
"title": "",
"options": [
{
"label": "Yes, that's tright",
"value": {
"input": {
"text": "yes"
}
}
},
{
"label": "No, I want to change it",
"value": {
"input": {
"text": "change"
}
}
},
{
"label": "No, forget it",
"value": {
"input": {
"text": "no"
}
}
}
],
"response_type": "option"
}
]
},
"parent": "node_4_1546530022022",
"metadata": {},
"conditions": "$reminder != null",
"dialog_node": "node_5_1546530407565",
"previous_sibling": "node_2_1546542011168"
},
{
"type": "standard",
"title": "Set reminder",
"output": {
"generic": []
},
"parent": "node_4_1546530022022",
"context": {
"reminder": "<? input.text.extract('to [a-zA-Z0-9\\s]+',0) ?>"
},
"metadata": {},
"next_step": {
"behavior": "jump_to",
"selector": "body",
"dialog_node": "node_5_1546530407565"
},
"conditions": "true",
"dialog_node": "node_2_1546542011168"
},
{
"type": "standard",
"title": "Initial configuration",
"output": {
"generic": []
},
"context": {
"private": {
"cf_creds": {
"api_key": "YOUR-CF-API-KEY-HERE"
}
},
"reminder": null,
"destination_email": "YOUR-DESTINATION-EMAIL-HERE"
},
"metadata": {},
"conditions": "false",
"digress_in": "does_not_return",
"dialog_node": "node_3_1546532706022",
"previous_sibling": "Welcome"
},
{
"type": "folder",
"title": "Send reminder",
"metadata": {},
"conditions": "#add_reminder",
"dialog_node": "node_4_1546530022022",
"previous_sibling": "node_3_1546532706022"
},
{
"type": "standard",
"title": "Anything else",
"output": {
"generic": [
{
"values": [
{
"text": "Sorry, I didn't get that. Right now, I can only help you with reminders. You can say something like 'remind me to call Mom' or 'can you remind me to take out the trash?'..."
}
],
"response_type": "text",
"selection_policy": "sequential"
}
]
},
"metadata": {},
"conditions": "anything_else",
"dialog_node": "Anything else",
"previous_sibling": "node_4_1546530022022"
},
{
"type": "standard",
"title": "Welcome",
"output": {
"generic": [
{
"values": [
{
"text": "Hi! How can I help you?"
}
],
"response_type": "text",
"selection_policy": "sequential"
}
]
},
"metadata": {},
"next_step": {
"behavior": "jump_to",
"selector": "body",
"dialog_node": "node_3_1546532706022"
},
"conditions": "welcome",
"digress_in": "not_available",
"dialog_node": "Welcome",
"digress_out": "allow_all"
}
],
"workspace_id": "9e446f1f-5ef3-4adb-9eac-f820317a26b0",
"counterexamples": [],
"system_settings": {
"tooling": {
"store_generic_responses": true
}
},
"learning_opt_out": false,
"status": "Available"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment