SlideShare a Scribd company logo
Building a YellowAnt
application with Ruby on
Rails
Basics first
Every application on YellowAnt has an invoke name
Every application on YellowAnt comprises of commands
A command may or may not have arguments
An argument can be of different types: int, string, boolean etc.
An argument may or may not be required for the command
Every command returns a YellowAnt message
A command may optionally return some data along with the message to be used
in workflows
How users will use your application
A user will first authenticate your application with his/her YellowAnt account
You will receive an oAuth code in your redirect_url
You will exchange that code for a permanent user token
You will create a user integration
Your application will then show in the list of integrated applications for the user
The user will then be able to command your application through Dialogs,
commands, buttons or workflows from Slack or Teams
Example
You create an GMail application integration with invoke name “gmail”
You create commands : send(takes inputs to, subject and body) and list(take
args label)
The user authenticates your application with his/her YellowAnt account and then
authenticated his/her GMail application. You create a new user integration “gmail”
and store the Gmail credentials against the user integration id
The user can then go to Slack.Teams and command:
gmail send to “vishwa@yellowant.com” subject “Test” body “Test”
You process the send command and send back a confirmation message
Example - continued
The user can also integrate another Gmail account. In this case, when the you
create a new user integration after authenticating the user’s YellowAnt and GMail
account, the new invoke name for the user will be gmail-1, since gmail is already
being used. You store the new Gmail credentials against this new user integration
id
To send an email, now from a different account, the user can command:
gmail-1 send to “vishwa@yellowant.com” subject “Test” body “Test”
If the user integrated a third email account, the new user integration id will be
gmail-3… and so on
Application OAuthentication flow
Application
1. User visits application page
2. Application redirects to YellowAnt
authentication page
3.
User grants
access
5.
App exchanges auth
code with long-lived token
4.
Server returns
authorization code
6. App creates user integration
What we will be building
A YellowAnt bot with invoke name “todo” that creates a to-do list and allows users
to
● Create an item
● List all items
● Update an item
● Delete an item
Database we will query through YellowAnt
Step 1: Define the application, commands and args
1. create_item
2. deleteitem
3. getitem
4. get_list
5. updateitem
Setting up user authentication
Redirect to YellowAnt Authentication URL
Obtain authentication code
Exchange auth code with token
Fetch User details
Create new application integration for the user
Command flow
Application
1.User executes
command in
client(YellowAnt Web
/Slack/Teams)
2.YellowAnt send
command object to
application api_url
3.Application processes
command and send back
message object
4.YellowAnt renders
message object in client
Processing commands
Verify verification_token
Check event_type
For “event_type” == “command”: get function name and parameters. Process
command.
Construct Message Object
Append some data to the message
Return Message
Formatting: Attachments
1. title
2. text
3. images
Formatting: Fields
1. title
2. text
Formatting: Buttons
1. Encoding command in buttons
2. Asking user for additional inputs
Adding data to response
1. Defining output keys
2. Adding output keys to functions
3. Appending data to message object

More Related Content

What's hot

React refs
React refsReact refs
React refs
Ducat
 
Leture5 exercise onactivities
Leture5 exercise onactivitiesLeture5 exercise onactivities
Leture5 exercise onactivities
maamir farooq
 
LambdaTest + GitHub = Seamless Software Testing Experience 🚀😍
LambdaTest + GitHub = Seamless Software Testing Experience 🚀😍LambdaTest + GitHub = Seamless Software Testing Experience 🚀😍
LambdaTest + GitHub = Seamless Software Testing Experience 🚀😍
Sarah Elson
 
Android User Interface Tutorial: DatePicker, TimePicker & Spinner
Android User Interface Tutorial: DatePicker, TimePicker & SpinnerAndroid User Interface Tutorial: DatePicker, TimePicker & Spinner
Android User Interface Tutorial: DatePicker, TimePicker & Spinner
Ahsanul Karim
 
Android User Interface: Basic Form Widgets
Android User Interface: Basic Form WidgetsAndroid User Interface: Basic Form Widgets
Android User Interface: Basic Form Widgets
Ahsanul Karim
 
Reactivation
ReactivationReactivation
Reactivation
Raj Ghosh
 
Android Intent.pptx
Android Intent.pptxAndroid Intent.pptx
Android Intent.pptx
vishal choudhary
 
OpenSocial Intro
OpenSocial IntroOpenSocial Intro
OpenSocial Intro
Pamela Fox
 
Day 8: Dealing with Lists and ListViews
Day 8: Dealing with Lists and ListViewsDay 8: Dealing with Lists and ListViews
Day 8: Dealing with Lists and ListViews
Ahsanul Karim
 
AI: Mobile Apps That Understands Your Intention When You Typed
AI: Mobile Apps That Understands Your Intention When You TypedAI: Mobile Apps That Understands Your Intention When You Typed
AI: Mobile Apps That Understands Your Intention When You Typed
Marvin Heng
 
Aspnet mvc tutorial_01_cs
Aspnet mvc tutorial_01_csAspnet mvc tutorial_01_cs
Aspnet mvc tutorial_01_cs
Alfa Gama Omega
 
Correlation id token in share point 2010
Correlation id token in share point 2010Correlation id token in share point 2010
Correlation id token in share point 2010
UGAIA
 
Build Restful Service using ADFBC
Build Restful Service using ADFBCBuild Restful Service using ADFBC
Build Restful Service using ADFBC
shravan kumar chelika
 
Google+ sign in for mobile & web apps
Google+ sign in for mobile & web appsGoogle+ sign in for mobile & web apps
Google+ sign in for mobile & web apps
Lakhdar Meftah
 
Login and private message
Login and private messageLogin and private message
Login and private message
gueste832a8e
 
Create an android app for database creation using.pptx
Create an android app for database creation using.pptxCreate an android app for database creation using.pptx
Create an android app for database creation using.pptx
vishal choudhary
 
Step1customer sendsorder
Step1customer sendsorderStep1customer sendsorder
Step1customer sendsorder
Hüseyin Çakır
 
Write an application that draws basic graphical primitives.pptx
Write an application that draws basic graphical primitives.pptxWrite an application that draws basic graphical primitives.pptx
Write an application that draws basic graphical primitives.pptx
vishal choudhary
 

What's hot (18)

React refs
React refsReact refs
React refs
 
Leture5 exercise onactivities
Leture5 exercise onactivitiesLeture5 exercise onactivities
Leture5 exercise onactivities
 
LambdaTest + GitHub = Seamless Software Testing Experience 🚀😍
LambdaTest + GitHub = Seamless Software Testing Experience 🚀😍LambdaTest + GitHub = Seamless Software Testing Experience 🚀😍
LambdaTest + GitHub = Seamless Software Testing Experience 🚀😍
 
Android User Interface Tutorial: DatePicker, TimePicker & Spinner
Android User Interface Tutorial: DatePicker, TimePicker & SpinnerAndroid User Interface Tutorial: DatePicker, TimePicker & Spinner
Android User Interface Tutorial: DatePicker, TimePicker & Spinner
 
Android User Interface: Basic Form Widgets
Android User Interface: Basic Form WidgetsAndroid User Interface: Basic Form Widgets
Android User Interface: Basic Form Widgets
 
Reactivation
ReactivationReactivation
Reactivation
 
Android Intent.pptx
Android Intent.pptxAndroid Intent.pptx
Android Intent.pptx
 
OpenSocial Intro
OpenSocial IntroOpenSocial Intro
OpenSocial Intro
 
Day 8: Dealing with Lists and ListViews
Day 8: Dealing with Lists and ListViewsDay 8: Dealing with Lists and ListViews
Day 8: Dealing with Lists and ListViews
 
AI: Mobile Apps That Understands Your Intention When You Typed
AI: Mobile Apps That Understands Your Intention When You TypedAI: Mobile Apps That Understands Your Intention When You Typed
AI: Mobile Apps That Understands Your Intention When You Typed
 
Aspnet mvc tutorial_01_cs
Aspnet mvc tutorial_01_csAspnet mvc tutorial_01_cs
Aspnet mvc tutorial_01_cs
 
Correlation id token in share point 2010
Correlation id token in share point 2010Correlation id token in share point 2010
Correlation id token in share point 2010
 
Build Restful Service using ADFBC
Build Restful Service using ADFBCBuild Restful Service using ADFBC
Build Restful Service using ADFBC
 
Google+ sign in for mobile & web apps
Google+ sign in for mobile & web appsGoogle+ sign in for mobile & web apps
Google+ sign in for mobile & web apps
 
Login and private message
Login and private messageLogin and private message
Login and private message
 
Create an android app for database creation using.pptx
Create an android app for database creation using.pptxCreate an android app for database creation using.pptx
Create an android app for database creation using.pptx
 
Step1customer sendsorder
Step1customer sendsorderStep1customer sendsorder
Step1customer sendsorder
 
Write an application that draws basic graphical primitives.pptx
Write an application that draws basic graphical primitives.pptxWrite an application that draws basic graphical primitives.pptx
Write an application that draws basic graphical primitives.pptx
 

Similar to Building a YellowAnt Application with Ruby on Rails

Fraudpointer - Google Apps integration
Fraudpointer  - Google Apps integrationFraudpointer  - Google Apps integration
Fraudpointer - Google Apps integration
Fraudpointer.com
 
Google external login setup in ASP (1).pdf
Google external login setup in ASP  (1).pdfGoogle external login setup in ASP  (1).pdf
Google external login setup in ASP (1).pdf
findandsolve .com
 
Securing Serverless Workloads with Cognito and API Gateway Part II - AWS Secu...
Securing Serverless Workloads with Cognito and API Gateway Part II - AWS Secu...Securing Serverless Workloads with Cognito and API Gateway Part II - AWS Secu...
Securing Serverless Workloads with Cognito and API Gateway Part II - AWS Secu...
Amazon Web Services
 
Mobile 2.0 Open Ideas WorkShop: Building Social Media Enabled Apps on Android
Mobile 2.0 Open Ideas WorkShop: Building Social Media Enabled Apps on AndroidMobile 2.0 Open Ideas WorkShop: Building Social Media Enabled Apps on Android
Mobile 2.0 Open Ideas WorkShop: Building Social Media Enabled Apps on Android
Alberto Ruibal
 
Introduction to Google Apps Platform
Introduction to Google Apps PlatformIntroduction to Google Apps Platform
Introduction to Google Apps Platform
Prasetyo Andy Wicaksono
 
Add User Sign in and Management to your Apps with Amazon Cognito
Add User Sign in and Management to your Apps with Amazon CognitoAdd User Sign in and Management to your Apps with Amazon Cognito
Add User Sign in and Management to your Apps with Amazon Cognito
Amazon Web Services
 
Introduction to Google App Engine
Introduction to Google App EngineIntroduction to Google App Engine
Introduction to Google App Engine
Kanda Runapongsa Saikaew
 
Add End User Sign-in, User Management, and Security to Your Mobile and Web Ap...
Add End User Sign-in, User Management, and Security to Your Mobile and Web Ap...Add End User Sign-in, User Management, and Security to Your Mobile and Web Ap...
Add End User Sign-in, User Management, and Security to Your Mobile and Web Ap...
Amazon Web Services
 
User Forms & API integration
User Forms & API integrationUser Forms & API integration
User Forms & API integration
Knoldus Inc.
 
How to Develop Slack Bot Using Golang.pdf
How to Develop Slack Bot Using Golang.pdfHow to Develop Slack Bot Using Golang.pdf
How to Develop Slack Bot Using Golang.pdf
Katy Slemon
 
Deep Dive on Amazon Cognito - March 2017 AWS Online Tech Talks
Deep Dive on Amazon Cognito - March 2017 AWS Online Tech TalksDeep Dive on Amazon Cognito - March 2017 AWS Online Tech Talks
Deep Dive on Amazon Cognito - March 2017 AWS Online Tech Talks
Amazon Web Services
 
Introduction to OAuth2
Introduction to OAuth2Introduction to OAuth2
Introduction to OAuth2
Kumaresh Chandra Baruri
 
Getting Started with Cognito User Pools - September Webinar Series
Getting Started with Cognito User Pools - September Webinar SeriesGetting Started with Cognito User Pools - September Webinar Series
Getting Started with Cognito User Pools - September Webinar Series
Amazon Web Services
 
Testing Connection Between Server to Server with TelegramBot & Googlesheet
Testing Connection Between Server to Server with TelegramBot & Googlesheet Testing Connection Between Server to Server with TelegramBot & Googlesheet
Testing Connection Between Server to Server with TelegramBot & Googlesheet
kimsrung lov
 
Automated Testing Of Web Applications Using XML
Automated  Testing Of  Web  Applications Using  XMLAutomated  Testing Of  Web  Applications Using  XML
Automated Testing Of Web Applications Using XML
diongillard
 
Oauth
OauthOauth
Oauth
Rob Paok
 
SpoofedMe - Intruding Accounts using Social Login Providers
SpoofedMe - Intruding Accounts using Social Login Providers SpoofedMe - Intruding Accounts using Social Login Providers
SpoofedMe - Intruding Accounts using Social Login Providers
IBM Security
 
Angular 11 google social login or sign in tutorial using angularx social-login
Angular 11 google social login or sign in tutorial using angularx social-loginAngular 11 google social login or sign in tutorial using angularx social-login
Angular 11 google social login or sign in tutorial using angularx social-login
Katy Slemon
 
Online sales: Select product, create quote, accept and ship (from warehouse)....
Online sales: Select product, create quote, accept and ship (from warehouse)....Online sales: Select product, create quote, accept and ship (from warehouse)....
Online sales: Select product, create quote, accept and ship (from warehouse)....
112Motion
 
Android chat in the cloud
Android chat in the cloudAndroid chat in the cloud
Android chat in the cloud
firenze-gtug
 

Similar to Building a YellowAnt Application with Ruby on Rails (20)

Fraudpointer - Google Apps integration
Fraudpointer  - Google Apps integrationFraudpointer  - Google Apps integration
Fraudpointer - Google Apps integration
 
Google external login setup in ASP (1).pdf
Google external login setup in ASP  (1).pdfGoogle external login setup in ASP  (1).pdf
Google external login setup in ASP (1).pdf
 
Securing Serverless Workloads with Cognito and API Gateway Part II - AWS Secu...
Securing Serverless Workloads with Cognito and API Gateway Part II - AWS Secu...Securing Serverless Workloads with Cognito and API Gateway Part II - AWS Secu...
Securing Serverless Workloads with Cognito and API Gateway Part II - AWS Secu...
 
Mobile 2.0 Open Ideas WorkShop: Building Social Media Enabled Apps on Android
Mobile 2.0 Open Ideas WorkShop: Building Social Media Enabled Apps on AndroidMobile 2.0 Open Ideas WorkShop: Building Social Media Enabled Apps on Android
Mobile 2.0 Open Ideas WorkShop: Building Social Media Enabled Apps on Android
 
Introduction to Google Apps Platform
Introduction to Google Apps PlatformIntroduction to Google Apps Platform
Introduction to Google Apps Platform
 
Add User Sign in and Management to your Apps with Amazon Cognito
Add User Sign in and Management to your Apps with Amazon CognitoAdd User Sign in and Management to your Apps with Amazon Cognito
Add User Sign in and Management to your Apps with Amazon Cognito
 
Introduction to Google App Engine
Introduction to Google App EngineIntroduction to Google App Engine
Introduction to Google App Engine
 
Add End User Sign-in, User Management, and Security to Your Mobile and Web Ap...
Add End User Sign-in, User Management, and Security to Your Mobile and Web Ap...Add End User Sign-in, User Management, and Security to Your Mobile and Web Ap...
Add End User Sign-in, User Management, and Security to Your Mobile and Web Ap...
 
User Forms & API integration
User Forms & API integrationUser Forms & API integration
User Forms & API integration
 
How to Develop Slack Bot Using Golang.pdf
How to Develop Slack Bot Using Golang.pdfHow to Develop Slack Bot Using Golang.pdf
How to Develop Slack Bot Using Golang.pdf
 
Deep Dive on Amazon Cognito - March 2017 AWS Online Tech Talks
Deep Dive on Amazon Cognito - March 2017 AWS Online Tech TalksDeep Dive on Amazon Cognito - March 2017 AWS Online Tech Talks
Deep Dive on Amazon Cognito - March 2017 AWS Online Tech Talks
 
Introduction to OAuth2
Introduction to OAuth2Introduction to OAuth2
Introduction to OAuth2
 
Getting Started with Cognito User Pools - September Webinar Series
Getting Started with Cognito User Pools - September Webinar SeriesGetting Started with Cognito User Pools - September Webinar Series
Getting Started with Cognito User Pools - September Webinar Series
 
Testing Connection Between Server to Server with TelegramBot & Googlesheet
Testing Connection Between Server to Server with TelegramBot & Googlesheet Testing Connection Between Server to Server with TelegramBot & Googlesheet
Testing Connection Between Server to Server with TelegramBot & Googlesheet
 
Automated Testing Of Web Applications Using XML
Automated  Testing Of  Web  Applications Using  XMLAutomated  Testing Of  Web  Applications Using  XML
Automated Testing Of Web Applications Using XML
 
Oauth
OauthOauth
Oauth
 
SpoofedMe - Intruding Accounts using Social Login Providers
SpoofedMe - Intruding Accounts using Social Login Providers SpoofedMe - Intruding Accounts using Social Login Providers
SpoofedMe - Intruding Accounts using Social Login Providers
 
Angular 11 google social login or sign in tutorial using angularx social-login
Angular 11 google social login or sign in tutorial using angularx social-loginAngular 11 google social login or sign in tutorial using angularx social-login
Angular 11 google social login or sign in tutorial using angularx social-login
 
Online sales: Select product, create quote, accept and ship (from warehouse)....
Online sales: Select product, create quote, accept and ship (from warehouse)....Online sales: Select product, create quote, accept and ship (from warehouse)....
Online sales: Select product, create quote, accept and ship (from warehouse)....
 
Android chat in the cloud
Android chat in the cloudAndroid chat in the cloud
Android chat in the cloud
 

Recently uploaded

Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectorsConnector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
DianaGray10
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Tosin Akinosho
 
Harnessing the Power of NLP and Knowledge Graphs for Opioid Research
Harnessing the Power of NLP and Knowledge Graphs for Opioid ResearchHarnessing the Power of NLP and Knowledge Graphs for Opioid Research
Harnessing the Power of NLP and Knowledge Graphs for Opioid Research
Neo4j
 
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Pitangent Analytics & Technology Solutions Pvt. Ltd
 
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
Fwdays
 
Principle of conventional tomography-Bibash Shahi ppt..pptx
Principle of conventional tomography-Bibash Shahi ppt..pptxPrinciple of conventional tomography-Bibash Shahi ppt..pptx
Principle of conventional tomography-Bibash Shahi ppt..pptx
BibashShahi
 
Essentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation ParametersEssentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation Parameters
Safe Software
 
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
Alex Pruden
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
Jakub Marek
 
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
saastr
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
ssuserfac0301
 
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
saastr
 
Y-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PPY-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PP
c5vrf27qcz
 
Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving
 
“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
Edge AI and Vision Alliance
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
Tatiana Kojar
 
JavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green MasterplanJavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green Masterplan
Miro Wengner
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
akankshawande
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 

Recently uploaded (20)

Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectorsConnector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
 
Harnessing the Power of NLP and Knowledge Graphs for Opioid Research
Harnessing the Power of NLP and Knowledge Graphs for Opioid ResearchHarnessing the Power of NLP and Knowledge Graphs for Opioid Research
Harnessing the Power of NLP and Knowledge Graphs for Opioid Research
 
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
 
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
 
Principle of conventional tomography-Bibash Shahi ppt..pptx
Principle of conventional tomography-Bibash Shahi ppt..pptxPrinciple of conventional tomography-Bibash Shahi ppt..pptx
Principle of conventional tomography-Bibash Shahi ppt..pptx
 
Essentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation ParametersEssentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation Parameters
 
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
 
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
 
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
 
Y-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PPY-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PP
 
Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024
 
“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
 
JavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green MasterplanJavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green Masterplan
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 

Building a YellowAnt Application with Ruby on Rails

  • 1. Building a YellowAnt application with Ruby on Rails
  • 2. Basics first Every application on YellowAnt has an invoke name Every application on YellowAnt comprises of commands A command may or may not have arguments An argument can be of different types: int, string, boolean etc. An argument may or may not be required for the command Every command returns a YellowAnt message A command may optionally return some data along with the message to be used in workflows
  • 3. How users will use your application A user will first authenticate your application with his/her YellowAnt account You will receive an oAuth code in your redirect_url You will exchange that code for a permanent user token You will create a user integration Your application will then show in the list of integrated applications for the user The user will then be able to command your application through Dialogs, commands, buttons or workflows from Slack or Teams
  • 4. Example You create an GMail application integration with invoke name “gmail” You create commands : send(takes inputs to, subject and body) and list(take args label) The user authenticates your application with his/her YellowAnt account and then authenticated his/her GMail application. You create a new user integration “gmail” and store the Gmail credentials against the user integration id The user can then go to Slack.Teams and command: gmail send to “vishwa@yellowant.com” subject “Test” body “Test” You process the send command and send back a confirmation message
  • 5. Example - continued The user can also integrate another Gmail account. In this case, when the you create a new user integration after authenticating the user’s YellowAnt and GMail account, the new invoke name for the user will be gmail-1, since gmail is already being used. You store the new Gmail credentials against this new user integration id To send an email, now from a different account, the user can command: gmail-1 send to “vishwa@yellowant.com” subject “Test” body “Test” If the user integrated a third email account, the new user integration id will be gmail-3… and so on
  • 6. Application OAuthentication flow Application 1. User visits application page 2. Application redirects to YellowAnt authentication page 3. User grants access 5. App exchanges auth code with long-lived token 4. Server returns authorization code 6. App creates user integration
  • 7. What we will be building A YellowAnt bot with invoke name “todo” that creates a to-do list and allows users to ● Create an item ● List all items ● Update an item ● Delete an item
  • 8. Database we will query through YellowAnt
  • 9. Step 1: Define the application, commands and args 1. create_item 2. deleteitem 3. getitem 4. get_list 5. updateitem
  • 10. Setting up user authentication Redirect to YellowAnt Authentication URL Obtain authentication code Exchange auth code with token Fetch User details Create new application integration for the user
  • 11. Command flow Application 1.User executes command in client(YellowAnt Web /Slack/Teams) 2.YellowAnt send command object to application api_url 3.Application processes command and send back message object 4.YellowAnt renders message object in client
  • 12. Processing commands Verify verification_token Check event_type For “event_type” == “command”: get function name and parameters. Process command. Construct Message Object Append some data to the message Return Message
  • 15. Formatting: Buttons 1. Encoding command in buttons 2. Asking user for additional inputs
  • 16. Adding data to response 1. Defining output keys 2. Adding output keys to functions 3. Appending data to message object