(Go: >> BACK << -|- >> HOME <<)

SlideShare a Scribd company logo
Actions on GOOGLE with Drupal
Nishant Kumar
https://drupal.org/u/nishantkumar155
@nishantkumar
● How to use Action-on-Google for a new project and an
existing one?
● How to integrate Google voice assistance with Drupal 8.
Agenda
How to use Action-on-Google for a new project and an
existing one?
By leveraging this application, we can use electronic gadgets to
trigger voice command that can control Drupal command.
● Clear cache
● Count no of node
● Send email
● Run external as well as internal cron
● And many more to control your Drupal application to respond
or insite defined action
How to integrate Google voice assistance with Drupal 8
1->Go to https://console.actions.google.com
Create new project
Create actions on Dialog Flow
Now create dialog flow
Go to intents
Fill below field
User says
Response → Default → “voice control text which can be
speak”
And checked the field of Fulfillment and save
Action on google with Drupal
Now go to Fulfillment
Module development Drupal 8
Create a custom module and a routing file:
okgoogle.test:
path: '/ok-google-test'
defaults:
_controller: 'DrupalokgoogleControllertest::handleRequest'
_title: 'Ok Google'
requirements:
_access: 'TRUE'
Create controller:
<?php
namespace DrupalokgoogleController;
use DrupalCoreControllerControllerBase;
use DrupalCoreLoggerLoggerChannelFactoryInterface;
use SymfonyComponentDependencyInjectionContainerInterface;
use SymfonyComponentHttpFoundationJsonResponse;
use SymfonyComponentHttpFoundationRequestStack;
/**
* Class DefaultController.
class test extends ControllerBase {
/**
* SymfonyComponentHttpFoundationRequestStack definition.
*
* @var SymfonyComponentHttpFoundationRequestStack
*/
protected $requestStack;
/**
* The logger factory.
*
* @var DrupalCoreLoggerLoggerChannelFactoryInterface
*/
protected $loggerFactory;
/**
* Constructs a new DefaultController object.
*/
public function __construct(RequestStack $request_stack, LoggerChannelFactoryInterface
$loggerFactory) {
$this->requestStack = $request_stack;
$this->loggerFactory = $loggerFactory;
}
/**
* {@inheritdoc}
*/
public static function create(ContainerInterface $container) {
return new static(
$container->get('request_stack'),
$container->get('logger.factory')
);
}
/**
* Handlerequest.
*
* @return mixed
* Return Hello string.
*/
public function handleRequest() {
$this->loggerFactory->get('droogle')->info('droogle triggered');
$this->processRequest();
$data = [
'speech' => 'Cache Rebuild Completed for the Site by bisu',
'displayText' => 'Cache Rebuild Completed nishant',
'data' => '',
'contextOut' => [],
'source' => 'uniworld',
];
return JsonResponse::create($data, 200);
}
protected function sent_mail(){
}
protected function processRequest() {
$params = $this->requestStack->getCurrentRequest();
// Here we will process the request to get intent
$to = "neera.prajapati@valuebound.com";
$subject = "Drush cleared";
$txt = "Drush cleared!";
$headers = "From: nishant@valuebound.com" . "rn" ;
"CC: somebodyelse@example.com";
drupal_flush_all_caches();
mail($to,$subject,$txt,$headers);
// and fulfill the action.
}
}
CONCLUSION
THANKS!
QUESTIONS?

More Related Content

Similar to Action on google with Drupal

How to build and publish a google home app with dialogflow
How to build and publish a google home app with dialogflowHow to build and publish a google home app with dialogflow
How to build and publish a google home app with dialogflow
Moses Sam Paul Johnraj
 
[HKDUG] #20151017 - BarCamp 2015 - Drupal 8 is Coming! Are You Ready?
[HKDUG] #20151017 - BarCamp 2015 - Drupal 8 is Coming! Are You Ready?[HKDUG] #20151017 - BarCamp 2015 - Drupal 8 is Coming! Are You Ready?
[HKDUG] #20151017 - BarCamp 2015 - Drupal 8 is Coming! Are You Ready?
Wong Hoi Sing Edison
 
DrupalCampSFL OpenPublic Overview
DrupalCampSFL OpenPublic OverviewDrupalCampSFL OpenPublic Overview
DrupalCampSFL OpenPublic Overview
John Studdard
 
Drupal Console Deep Dive: How to Develop Faster and Smarter on Drupal 8
Drupal Console Deep Dive: How to Develop Faster and Smarter on Drupal 8Drupal Console Deep Dive: How to Develop Faster and Smarter on Drupal 8
Drupal Console Deep Dive: How to Develop Faster and Smarter on Drupal 8
Acquia
 
Drupal Console Deep Dive: How to Develop Faster and Smarter on Drupal 8
Drupal Console Deep Dive: How to Develop Faster and Smarter on Drupal 8Drupal Console Deep Dive: How to Develop Faster and Smarter on Drupal 8
Drupal Console Deep Dive: How to Develop Faster and Smarter on Drupal 8
Jake Borr
 
Choosing Drupal as your Content Management Framework
Choosing Drupal as your Content Management FrameworkChoosing Drupal as your Content Management Framework
Choosing Drupal as your Content Management Framework
Mediacurrent
 
Drupal 8 and Pantheon
Drupal 8 and PantheonDrupal 8 and Pantheon
Drupal 8 and Pantheon
Pantheon
 
Interoperability betweendrupalandgoogleapps
Interoperability betweendrupalandgoogleappsInteroperability betweendrupalandgoogleapps
Interoperability betweendrupalandgoogleapps
Opevel
 
Drupal
DrupalDrupal
_ Drupal and the Art of Scrum _
_ Drupal and the Art of Scrum __ Drupal and the Art of Scrum _
_ Drupal and the Art of Scrum _
Ricardo Amaro
 
Google cloud platform
Google cloud platformGoogle cloud platform
Google cloud platform
Ankit Malviya
 
ACTIONS ON GOOGLE.pptx
ACTIONS ON GOOGLE.pptxACTIONS ON GOOGLE.pptx
ACTIONS ON GOOGLE.pptx
Shwethashwe32
 
Help! I inherited a Drupal Site! - DrupalCamp Atlanta 2016
Help! I inherited a Drupal Site! - DrupalCamp Atlanta 2016Help! I inherited a Drupal Site! - DrupalCamp Atlanta 2016
Help! I inherited a Drupal Site! - DrupalCamp Atlanta 2016
Paul McKibben
 
Project one assessments submission
Project one assessments submissionProject one assessments submission
Project one assessments submission
Eldon Stazz
 
Faster and Smarter Development with Drupal Console
Faster and Smarter Development with Drupal ConsoleFaster and Smarter Development with Drupal Console
Faster and Smarter Development with Drupal Console
FFW
 
Django Article V0
Django Article V0Django Article V0
Django Article V0
Udi Bauman
 
Be agile: take back control over your work
Be agile: take back control over your workBe agile: take back control over your work
Be agile: take back control over your work
Massimo Azzolini
 
DevOps & SRE at Google Scale
DevOps & SRE at Google ScaleDevOps & SRE at Google Scale
DevOps & SRE at Google Scale
Kaushik Bhattacharya
 
Upcoming version of Drupal – Drupal 8
Upcoming version of Drupal – Drupal 8Upcoming version of Drupal – Drupal 8
Upcoming version of Drupal – Drupal 8
Softweb Solutions
 
Fast forward into the future, build and find out your virtually finished pro...
Fast forward into the future, build and find out your  virtually finished pro...Fast forward into the future, build and find out your  virtually finished pro...
Fast forward into the future, build and find out your virtually finished pro...
www.securitysystems.best
 

Similar to Action on google with Drupal (20)

How to build and publish a google home app with dialogflow
How to build and publish a google home app with dialogflowHow to build and publish a google home app with dialogflow
How to build and publish a google home app with dialogflow
 
[HKDUG] #20151017 - BarCamp 2015 - Drupal 8 is Coming! Are You Ready?
[HKDUG] #20151017 - BarCamp 2015 - Drupal 8 is Coming! Are You Ready?[HKDUG] #20151017 - BarCamp 2015 - Drupal 8 is Coming! Are You Ready?
[HKDUG] #20151017 - BarCamp 2015 - Drupal 8 is Coming! Are You Ready?
 
DrupalCampSFL OpenPublic Overview
DrupalCampSFL OpenPublic OverviewDrupalCampSFL OpenPublic Overview
DrupalCampSFL OpenPublic Overview
 
Drupal Console Deep Dive: How to Develop Faster and Smarter on Drupal 8
Drupal Console Deep Dive: How to Develop Faster and Smarter on Drupal 8Drupal Console Deep Dive: How to Develop Faster and Smarter on Drupal 8
Drupal Console Deep Dive: How to Develop Faster and Smarter on Drupal 8
 
Drupal Console Deep Dive: How to Develop Faster and Smarter on Drupal 8
Drupal Console Deep Dive: How to Develop Faster and Smarter on Drupal 8Drupal Console Deep Dive: How to Develop Faster and Smarter on Drupal 8
Drupal Console Deep Dive: How to Develop Faster and Smarter on Drupal 8
 
Choosing Drupal as your Content Management Framework
Choosing Drupal as your Content Management FrameworkChoosing Drupal as your Content Management Framework
Choosing Drupal as your Content Management Framework
 
Drupal 8 and Pantheon
Drupal 8 and PantheonDrupal 8 and Pantheon
Drupal 8 and Pantheon
 
Interoperability betweendrupalandgoogleapps
Interoperability betweendrupalandgoogleappsInteroperability betweendrupalandgoogleapps
Interoperability betweendrupalandgoogleapps
 
Drupal
DrupalDrupal
Drupal
 
_ Drupal and the Art of Scrum _
_ Drupal and the Art of Scrum __ Drupal and the Art of Scrum _
_ Drupal and the Art of Scrum _
 
Google cloud platform
Google cloud platformGoogle cloud platform
Google cloud platform
 
ACTIONS ON GOOGLE.pptx
ACTIONS ON GOOGLE.pptxACTIONS ON GOOGLE.pptx
ACTIONS ON GOOGLE.pptx
 
Help! I inherited a Drupal Site! - DrupalCamp Atlanta 2016
Help! I inherited a Drupal Site! - DrupalCamp Atlanta 2016Help! I inherited a Drupal Site! - DrupalCamp Atlanta 2016
Help! I inherited a Drupal Site! - DrupalCamp Atlanta 2016
 
Project one assessments submission
Project one assessments submissionProject one assessments submission
Project one assessments submission
 
Faster and Smarter Development with Drupal Console
Faster and Smarter Development with Drupal ConsoleFaster and Smarter Development with Drupal Console
Faster and Smarter Development with Drupal Console
 
Django Article V0
Django Article V0Django Article V0
Django Article V0
 
Be agile: take back control over your work
Be agile: take back control over your workBe agile: take back control over your work
Be agile: take back control over your work
 
DevOps & SRE at Google Scale
DevOps & SRE at Google ScaleDevOps & SRE at Google Scale
DevOps & SRE at Google Scale
 
Upcoming version of Drupal – Drupal 8
Upcoming version of Drupal – Drupal 8Upcoming version of Drupal – Drupal 8
Upcoming version of Drupal – Drupal 8
 
Fast forward into the future, build and find out your virtually finished pro...
Fast forward into the future, build and find out your  virtually finished pro...Fast forward into the future, build and find out your  virtually finished pro...
Fast forward into the future, build and find out your virtually finished pro...
 

More from valuebound

Scaling Drupal for High Traffic Websites
Scaling Drupal for High Traffic WebsitesScaling Drupal for High Traffic Websites
Scaling Drupal for High Traffic Websites
valuebound
 
Drupal 7 to Drupal 10 Migration A Fintech Strategic Blueprint (1).pdf
Drupal 7 to Drupal 10 Migration A Fintech Strategic Blueprint (1).pdfDrupal 7 to Drupal 10 Migration A Fintech Strategic Blueprint (1).pdf
Drupal 7 to Drupal 10 Migration A Fintech Strategic Blueprint (1).pdf
valuebound
 
How to Use DDEV to Streamline Your Drupal Development Process.
How to Use DDEV to Streamline Your Drupal Development Process.How to Use DDEV to Streamline Your Drupal Development Process.
How to Use DDEV to Streamline Your Drupal Development Process.
valuebound
 
How to Use AWS to Automate Your IT Operation| Valuebound
How to Use AWS to Automate Your IT Operation| Valuebound How to Use AWS to Automate Your IT Operation| Valuebound
How to Use AWS to Automate Your IT Operation| Valuebound
valuebound
 
How to Use Firebase to Send Push Notifications to React Native and Node.js Apps
How to Use Firebase to Send Push Notifications to React Native and Node.js AppsHow to Use Firebase to Send Push Notifications to React Native and Node.js Apps
How to Use Firebase to Send Push Notifications to React Native and Node.js Apps
valuebound
 
Mastering Drupal Theming
Mastering Drupal ThemingMastering Drupal Theming
Mastering Drupal Theming
valuebound
 
The Benefits of Cloud Engineering
The Benefits of Cloud EngineeringThe Benefits of Cloud Engineering
The Benefits of Cloud Engineering
valuebound
 
Cloud Computing
Cloud ComputingCloud Computing
Cloud Computing
valuebound
 
The Future of Cloud Engineering: Emerging Trends and Technologies to Watch in...
The Future of Cloud Engineering: Emerging Trends and Technologies to Watch in...The Future of Cloud Engineering: Emerging Trends and Technologies to Watch in...
The Future of Cloud Engineering: Emerging Trends and Technologies to Watch in...
valuebound
 
Deep dive into ChatGPT
Deep dive into ChatGPTDeep dive into ChatGPT
Deep dive into ChatGPT
valuebound
 
Content Creation Solution | Valuebound
Content Creation Solution | ValueboundContent Creation Solution | Valuebound
Content Creation Solution | Valuebound
valuebound
 
Road ahead for Drupal 8 contributed projects
Road ahead for Drupal 8 contributed projectsRoad ahead for Drupal 8 contributed projects
Road ahead for Drupal 8 contributed projects
valuebound
 
Chatbot with RASA | Valuebound
Chatbot with RASA | ValueboundChatbot with RASA | Valuebound
Chatbot with RASA | Valuebound
valuebound
 
Drupal and Artificial Intelligence for Personalization
Drupal and Artificial Intelligence for Personalization Drupal and Artificial Intelligence for Personalization
Drupal and Artificial Intelligence for Personalization
valuebound
 
Drupal growth in last year | Valuebound
Drupal growth in last year | ValueboundDrupal growth in last year | Valuebound
Drupal growth in last year | Valuebound
valuebound
 
BE NEW TO THE WORLD "BRAVE FROM CHROME"
BE NEW TO THE WORLD "BRAVE FROM CHROME"BE NEW TO THE WORLD "BRAVE FROM CHROME"
BE NEW TO THE WORLD "BRAVE FROM CHROME"
valuebound
 
Event loop in browser
Event loop in browserEvent loop in browser
Event loop in browser
valuebound
 
The Basics of MongoDB
The Basics of MongoDBThe Basics of MongoDB
The Basics of MongoDB
valuebound
 
React JS: A Secret Preview
React JS: A Secret PreviewReact JS: A Secret Preview
React JS: A Secret Preview
valuebound
 
Dependency Injection in Drupal 8
Dependency Injection in Drupal 8Dependency Injection in Drupal 8
Dependency Injection in Drupal 8
valuebound
 

More from valuebound (20)

Scaling Drupal for High Traffic Websites
Scaling Drupal for High Traffic WebsitesScaling Drupal for High Traffic Websites
Scaling Drupal for High Traffic Websites
 
Drupal 7 to Drupal 10 Migration A Fintech Strategic Blueprint (1).pdf
Drupal 7 to Drupal 10 Migration A Fintech Strategic Blueprint (1).pdfDrupal 7 to Drupal 10 Migration A Fintech Strategic Blueprint (1).pdf
Drupal 7 to Drupal 10 Migration A Fintech Strategic Blueprint (1).pdf
 
How to Use DDEV to Streamline Your Drupal Development Process.
How to Use DDEV to Streamline Your Drupal Development Process.How to Use DDEV to Streamline Your Drupal Development Process.
How to Use DDEV to Streamline Your Drupal Development Process.
 
How to Use AWS to Automate Your IT Operation| Valuebound
How to Use AWS to Automate Your IT Operation| Valuebound How to Use AWS to Automate Your IT Operation| Valuebound
How to Use AWS to Automate Your IT Operation| Valuebound
 
How to Use Firebase to Send Push Notifications to React Native and Node.js Apps
How to Use Firebase to Send Push Notifications to React Native and Node.js AppsHow to Use Firebase to Send Push Notifications to React Native and Node.js Apps
How to Use Firebase to Send Push Notifications to React Native and Node.js Apps
 
Mastering Drupal Theming
Mastering Drupal ThemingMastering Drupal Theming
Mastering Drupal Theming
 
The Benefits of Cloud Engineering
The Benefits of Cloud EngineeringThe Benefits of Cloud Engineering
The Benefits of Cloud Engineering
 
Cloud Computing
Cloud ComputingCloud Computing
Cloud Computing
 
The Future of Cloud Engineering: Emerging Trends and Technologies to Watch in...
The Future of Cloud Engineering: Emerging Trends and Technologies to Watch in...The Future of Cloud Engineering: Emerging Trends and Technologies to Watch in...
The Future of Cloud Engineering: Emerging Trends and Technologies to Watch in...
 
Deep dive into ChatGPT
Deep dive into ChatGPTDeep dive into ChatGPT
Deep dive into ChatGPT
 
Content Creation Solution | Valuebound
Content Creation Solution | ValueboundContent Creation Solution | Valuebound
Content Creation Solution | Valuebound
 
Road ahead for Drupal 8 contributed projects
Road ahead for Drupal 8 contributed projectsRoad ahead for Drupal 8 contributed projects
Road ahead for Drupal 8 contributed projects
 
Chatbot with RASA | Valuebound
Chatbot with RASA | ValueboundChatbot with RASA | Valuebound
Chatbot with RASA | Valuebound
 
Drupal and Artificial Intelligence for Personalization
Drupal and Artificial Intelligence for Personalization Drupal and Artificial Intelligence for Personalization
Drupal and Artificial Intelligence for Personalization
 
Drupal growth in last year | Valuebound
Drupal growth in last year | ValueboundDrupal growth in last year | Valuebound
Drupal growth in last year | Valuebound
 
BE NEW TO THE WORLD "BRAVE FROM CHROME"
BE NEW TO THE WORLD "BRAVE FROM CHROME"BE NEW TO THE WORLD "BRAVE FROM CHROME"
BE NEW TO THE WORLD "BRAVE FROM CHROME"
 
Event loop in browser
Event loop in browserEvent loop in browser
Event loop in browser
 
The Basics of MongoDB
The Basics of MongoDBThe Basics of MongoDB
The Basics of MongoDB
 
React JS: A Secret Preview
React JS: A Secret PreviewReact JS: A Secret Preview
React JS: A Secret Preview
 
Dependency Injection in Drupal 8
Dependency Injection in Drupal 8Dependency Injection in Drupal 8
Dependency Injection in Drupal 8
 

Recently uploaded

WhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdf
WhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdfWhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdf
WhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdf
ArgaBisma
 
“Intel’s Approach to Operationalizing AI in the Manufacturing Sector,” a Pres...
“Intel’s Approach to Operationalizing AI in the Manufacturing Sector,” a Pres...“Intel’s Approach to Operationalizing AI in the Manufacturing Sector,” a Pres...
“Intel’s Approach to Operationalizing AI in the Manufacturing Sector,” a Pres...
Edge AI and Vision Alliance
 
What’s New in Teams Calling, Meetings and Devices May 2024
What’s New in Teams Calling, Meetings and Devices May 2024What’s New in Teams Calling, Meetings and Devices May 2024
What’s New in Teams Calling, Meetings and Devices May 2024
Stephanie Beckett
 
Hire a private investigator to get cell phone records
Hire a private investigator to get cell phone recordsHire a private investigator to get cell phone records
Hire a private investigator to get cell phone records
HackersList
 
The Rise of Supernetwork Data Intensive Computing
The Rise of Supernetwork Data Intensive ComputingThe Rise of Supernetwork Data Intensive Computing
The Rise of Supernetwork Data Intensive Computing
Larry Smarr
 
Running a Go App in Kubernetes: CPU Impacts
Running a Go App in Kubernetes: CPU ImpactsRunning a Go App in Kubernetes: CPU Impacts
Running a Go App in Kubernetes: CPU Impacts
ScyllaDB
 
Observability For You and Me with OpenTelemetry
Observability For You and Me with OpenTelemetryObservability For You and Me with OpenTelemetry
Observability For You and Me with OpenTelemetry
Eric D. Schabell
 
Navigating Post-Quantum Blockchain: Resilient Cryptography in Quantum Threats
Navigating Post-Quantum Blockchain: Resilient Cryptography in Quantum ThreatsNavigating Post-Quantum Blockchain: Resilient Cryptography in Quantum Threats
Navigating Post-Quantum Blockchain: Resilient Cryptography in Quantum Threats
anupriti
 
Quantum Communications Q&A with Gemini LLM
Quantum Communications Q&A with Gemini LLMQuantum Communications Q&A with Gemini LLM
Quantum Communications Q&A with Gemini LLM
Vijayananda Mohire
 
Interaction Latency: Square's User-Centric Mobile Performance Metric
Interaction Latency: Square's User-Centric Mobile Performance MetricInteraction Latency: Square's User-Centric Mobile Performance Metric
Interaction Latency: Square's User-Centric Mobile Performance Metric
ScyllaDB
 
Research Directions for Cross Reality Interfaces
Research Directions for Cross Reality InterfacesResearch Directions for Cross Reality Interfaces
Research Directions for Cross Reality Interfaces
Mark Billinghurst
 
What Not to Document and Why_ (North Bay Python 2024)
What Not to Document and Why_ (North Bay Python 2024)What Not to Document and Why_ (North Bay Python 2024)
What Not to Document and Why_ (North Bay Python 2024)
Margaret Fero
 
Pigging Solutions Sustainability brochure.pdf
Pigging Solutions Sustainability brochure.pdfPigging Solutions Sustainability brochure.pdf
Pigging Solutions Sustainability brochure.pdf
Pigging Solutions
 
Why do You Have to Redesign?_Redesign Challenge Day 1
Why do You Have to Redesign?_Redesign Challenge Day 1Why do You Have to Redesign?_Redesign Challenge Day 1
Why do You Have to Redesign?_Redesign Challenge Day 1
FellyciaHikmahwarani
 
STKI Israeli Market Study 2024 final v1
STKI Israeli Market Study 2024 final  v1STKI Israeli Market Study 2024 final  v1
STKI Israeli Market Study 2024 final v1
Dr. Jimmy Schwarzkopf
 
UiPath Community Day Kraków: Devs4Devs Conference
UiPath Community Day Kraków: Devs4Devs ConferenceUiPath Community Day Kraków: Devs4Devs Conference
UiPath Community Day Kraków: Devs4Devs Conference
UiPathCommunity
 
Transcript: Details of description part II: Describing images in practice - T...
Transcript: Details of description part II: Describing images in practice - T...Transcript: Details of description part II: Describing images in practice - T...
Transcript: Details of description part II: Describing images in practice - T...
BookNet Canada
 
Blockchain and Cyber Defense Strategies in new genre times
Blockchain and Cyber Defense Strategies in new genre timesBlockchain and Cyber Defense Strategies in new genre times
Blockchain and Cyber Defense Strategies in new genre times
anupriti
 
Performance Budgets for the Real World by Tammy Everts
Performance Budgets for the Real World by Tammy EvertsPerformance Budgets for the Real World by Tammy Everts
Performance Budgets for the Real World by Tammy Everts
ScyllaDB
 
Quality Patents: Patents That Stand the Test of Time
Quality Patents: Patents That Stand the Test of TimeQuality Patents: Patents That Stand the Test of Time
Quality Patents: Patents That Stand the Test of Time
Aurora Consulting
 

Recently uploaded (20)

WhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdf
WhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdfWhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdf
WhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdf
 
“Intel’s Approach to Operationalizing AI in the Manufacturing Sector,” a Pres...
“Intel’s Approach to Operationalizing AI in the Manufacturing Sector,” a Pres...“Intel’s Approach to Operationalizing AI in the Manufacturing Sector,” a Pres...
“Intel’s Approach to Operationalizing AI in the Manufacturing Sector,” a Pres...
 
What’s New in Teams Calling, Meetings and Devices May 2024
What’s New in Teams Calling, Meetings and Devices May 2024What’s New in Teams Calling, Meetings and Devices May 2024
What’s New in Teams Calling, Meetings and Devices May 2024
 
Hire a private investigator to get cell phone records
Hire a private investigator to get cell phone recordsHire a private investigator to get cell phone records
Hire a private investigator to get cell phone records
 
The Rise of Supernetwork Data Intensive Computing
The Rise of Supernetwork Data Intensive ComputingThe Rise of Supernetwork Data Intensive Computing
The Rise of Supernetwork Data Intensive Computing
 
Running a Go App in Kubernetes: CPU Impacts
Running a Go App in Kubernetes: CPU ImpactsRunning a Go App in Kubernetes: CPU Impacts
Running a Go App in Kubernetes: CPU Impacts
 
Observability For You and Me with OpenTelemetry
Observability For You and Me with OpenTelemetryObservability For You and Me with OpenTelemetry
Observability For You and Me with OpenTelemetry
 
Navigating Post-Quantum Blockchain: Resilient Cryptography in Quantum Threats
Navigating Post-Quantum Blockchain: Resilient Cryptography in Quantum ThreatsNavigating Post-Quantum Blockchain: Resilient Cryptography in Quantum Threats
Navigating Post-Quantum Blockchain: Resilient Cryptography in Quantum Threats
 
Quantum Communications Q&A with Gemini LLM
Quantum Communications Q&A with Gemini LLMQuantum Communications Q&A with Gemini LLM
Quantum Communications Q&A with Gemini LLM
 
Interaction Latency: Square's User-Centric Mobile Performance Metric
Interaction Latency: Square's User-Centric Mobile Performance MetricInteraction Latency: Square's User-Centric Mobile Performance Metric
Interaction Latency: Square's User-Centric Mobile Performance Metric
 
Research Directions for Cross Reality Interfaces
Research Directions for Cross Reality InterfacesResearch Directions for Cross Reality Interfaces
Research Directions for Cross Reality Interfaces
 
What Not to Document and Why_ (North Bay Python 2024)
What Not to Document and Why_ (North Bay Python 2024)What Not to Document and Why_ (North Bay Python 2024)
What Not to Document and Why_ (North Bay Python 2024)
 
Pigging Solutions Sustainability brochure.pdf
Pigging Solutions Sustainability brochure.pdfPigging Solutions Sustainability brochure.pdf
Pigging Solutions Sustainability brochure.pdf
 
Why do You Have to Redesign?_Redesign Challenge Day 1
Why do You Have to Redesign?_Redesign Challenge Day 1Why do You Have to Redesign?_Redesign Challenge Day 1
Why do You Have to Redesign?_Redesign Challenge Day 1
 
STKI Israeli Market Study 2024 final v1
STKI Israeli Market Study 2024 final  v1STKI Israeli Market Study 2024 final  v1
STKI Israeli Market Study 2024 final v1
 
UiPath Community Day Kraków: Devs4Devs Conference
UiPath Community Day Kraków: Devs4Devs ConferenceUiPath Community Day Kraków: Devs4Devs Conference
UiPath Community Day Kraków: Devs4Devs Conference
 
Transcript: Details of description part II: Describing images in practice - T...
Transcript: Details of description part II: Describing images in practice - T...Transcript: Details of description part II: Describing images in practice - T...
Transcript: Details of description part II: Describing images in practice - T...
 
Blockchain and Cyber Defense Strategies in new genre times
Blockchain and Cyber Defense Strategies in new genre timesBlockchain and Cyber Defense Strategies in new genre times
Blockchain and Cyber Defense Strategies in new genre times
 
Performance Budgets for the Real World by Tammy Everts
Performance Budgets for the Real World by Tammy EvertsPerformance Budgets for the Real World by Tammy Everts
Performance Budgets for the Real World by Tammy Everts
 
Quality Patents: Patents That Stand the Test of Time
Quality Patents: Patents That Stand the Test of TimeQuality Patents: Patents That Stand the Test of Time
Quality Patents: Patents That Stand the Test of Time
 

Action on google with Drupal

  • 1. Actions on GOOGLE with Drupal Nishant Kumar https://drupal.org/u/nishantkumar155 @nishantkumar
  • 2. ● How to use Action-on-Google for a new project and an existing one? ● How to integrate Google voice assistance with Drupal 8. Agenda
  • 3. How to use Action-on-Google for a new project and an existing one? By leveraging this application, we can use electronic gadgets to trigger voice command that can control Drupal command. ● Clear cache ● Count no of node ● Send email ● Run external as well as internal cron ● And many more to control your Drupal application to respond or insite defined action
  • 4. How to integrate Google voice assistance with Drupal 8 1->Go to https://console.actions.google.com
  • 6. Create actions on Dialog Flow
  • 9. Fill below field User says Response → Default → “voice control text which can be speak” And checked the field of Fulfillment and save
  • 11. Now go to Fulfillment
  • 12. Module development Drupal 8 Create a custom module and a routing file: okgoogle.test: path: '/ok-google-test' defaults: _controller: 'DrupalokgoogleControllertest::handleRequest' _title: 'Ok Google' requirements: _access: 'TRUE'
  • 14. <?php namespace DrupalokgoogleController; use DrupalCoreControllerControllerBase; use DrupalCoreLoggerLoggerChannelFactoryInterface; use SymfonyComponentDependencyInjectionContainerInterface; use SymfonyComponentHttpFoundationJsonResponse; use SymfonyComponentHttpFoundationRequestStack; /** * Class DefaultController.
  • 15. class test extends ControllerBase { /** * SymfonyComponentHttpFoundationRequestStack definition. * * @var SymfonyComponentHttpFoundationRequestStack */ protected $requestStack; /** * The logger factory. * * @var DrupalCoreLoggerLoggerChannelFactoryInterface */ protected $loggerFactory; /** * Constructs a new DefaultController object. */
  • 16. public function __construct(RequestStack $request_stack, LoggerChannelFactoryInterface $loggerFactory) { $this->requestStack = $request_stack; $this->loggerFactory = $loggerFactory; } /** * {@inheritdoc} */ public static function create(ContainerInterface $container) { return new static( $container->get('request_stack'), $container->get('logger.factory') ); }
  • 17. /** * Handlerequest. * * @return mixed * Return Hello string. */ public function handleRequest() { $this->loggerFactory->get('droogle')->info('droogle triggered'); $this->processRequest(); $data = [ 'speech' => 'Cache Rebuild Completed for the Site by bisu', 'displayText' => 'Cache Rebuild Completed nishant', 'data' => '', 'contextOut' => [], 'source' => 'uniworld', ]; return JsonResponse::create($data, 200); } protected function sent_mail(){ }
  • 18. protected function processRequest() { $params = $this->requestStack->getCurrentRequest(); // Here we will process the request to get intent $to = "neera.prajapati@valuebound.com"; $subject = "Drush cleared"; $txt = "Drush cleared!"; $headers = "From: nishant@valuebound.com" . "rn" ; "CC: somebodyelse@example.com"; drupal_flush_all_caches(); mail($to,$subject,$txt,$headers); // and fulfill the action. } }