SlideShare una empresa de Scribd logo
1 de 16
Descargar para leer sin conexión
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

Más contenido relacionado

La actualidad más candente

React refs
React refsReact refs
React refsDucat
 
Leture5 exercise onactivities
Leture5 exercise onactivitiesLeture5 exercise onactivities
Leture5 exercise onactivitiesmaamir 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 & SpinnerAhsanul Karim
 
Android User Interface: Basic Form Widgets
Android User Interface: Basic Form WidgetsAndroid User Interface: Basic Form Widgets
Android User Interface: Basic Form WidgetsAhsanul Karim
 
Reactivation
ReactivationReactivation
ReactivationRaj Ghosh
 
OpenSocial Intro
OpenSocial IntroOpenSocial Intro
OpenSocial IntroPamela 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 ListViewsAhsanul 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 TypedMarvin Heng
 
Aspnet mvc tutorial_01_cs
Aspnet mvc tutorial_01_csAspnet mvc tutorial_01_cs
Aspnet mvc tutorial_01_csAlfa 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 2010UGAIA
 
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 appsLakhdar Meftah
 
Login and private message
Login and private messageLogin and private message
Login and private messagegueste832a8e
 
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.pptxvishal choudhary
 
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.pptxvishal choudhary
 

La actualidad más candente (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 a Build a To-Do List App with Ruby on Rails on YellowAnt

Fraudpointer - Google Apps integration
Fraudpointer  - Google Apps integrationFraudpointer  - Google Apps integration
Fraudpointer - Google Apps integrationFraudpointer.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).pdffindandsolve .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 AndroidAlberto Ruibal
 
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 CognitoAmazon Web Services
 
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 integrationKnoldus 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.pdfKaty 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 TalksAmazon Web Services
 
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 SeriesAmazon 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 XMLdiongillard
 
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-loginKaty 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 cloudfirenze-gtug
 

Similar a Build a To-Do List App with Ruby on Rails on YellowAnt (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
 

Último

Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 

Último (20)

Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 

Build a To-Do List App with Ruby on Rails on YellowAnt

  • 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