GithubHelp home page GithubHelp logo

googlecloudplatform / dialogflow-integrations Goto Github PK

View Code? Open in Web Editor NEW
254.0 42.0 500.0 17.45 MB

Dialogflow integrations with multiple platforms including KIK, Skype, Spark, Twlio, Twitter and Viber

Home Page: https://cloud.google.com/dialogflow/

License: Apache License 2.0

Dockerfile 0.53% JavaScript 70.60% HTML 0.47% CSS 0.92% TypeScript 15.90% Jupyter Notebook 11.57%

dialogflow-integrations's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dialogflow-integrations's Issues

high latency of detectintent

I am testing viberbot, key file is set to environment.
I am using ngrok for test chat bot in local.

The issue is when calling detectIntent it will take nearly 8 seconds to get seponse.
const answer = (await sessionClient.detectIntent(message.text, sessionId, message))
Any reason for this ?

How to integrate Dialogflow with Microsoft Teams.

As I have noticed in official document, Teams integration is not part of built in integrations supported by Google. It being an independent integration, can someone help me with trusted third party organization to do the same?

No outbound messages with Twilio text messaging service - Twilio Error code: 11200

I carefully followed the instructions for Twilio (Text Messaging ) and been successful till the last step of successful deployment on gcloud. I also have the URL being generated by executing gcloud run command and pasted it in Twilio "When a message comes in" field.

Now when I send a message to my active Twilio number on which sms services are being enabled, I only receive incoming messages which I can see in Twilio logs but no outgoing messages. In fact I receive an error code on Twilio: 11200 which is timeout error and nothing of google cloud logs other than successful deployment.

image

Below is the snippet of successful deployment.

image

Does anyone knows what's going on or what I am doing wrong? I followed the instructions multiple times though.

JsonToProto returns empty payload

jsonToProto functions seems to return proto object but when sent as request object to the fullfilment it returns empty payload.

const payload = {
data: {
SmsSid: "SM1eb889baa86d1887d14c6007a6c5684a",
Body: "Hola",
SmsStatus: "received",
MessageSid: "SM1eb889baa86d1887d14c6007a6c5684a",
ApiVersion: "2010-04-01",
From: "whatsapp:+5218717953912",
AccountSid: "ACf71ea17bda8928547c7f0fa3f13d384b",
NumMedia: "0",
To: "whatsapp:+14155238886",
SmsMessageSid: "SM1eb889baa86d1887d14c6007a6c5684a",
NumSegments: "1"
}
};

const request = {
  session: sessionPath,
  queryInput: {
    text: {
      text: "Hola",
      languageCode: LANGUAGE_CODE
    }
  },
  queryParams: {
    payload: this.jsonValueToProto(payload)
  }
};

Dialogflow send empty response to twilio when a new conversation is started

HelloWorld, I'm having an issue with dialogflow, it is sending empty responses to twilio when a new conversation start. Im getting the error Warning - 14103 Invalid Body in the twilio debugger.

  • Im sure the webhook is sending a response to dialogflow but dialogflow is sending an empty response to twilio.
  • The request takes less than one second
  • Dialogflow bot send rigth answers after the third interaction

image

this is an example of how im sending the responses from the webhook

image

How to change "language_code" for the Twilio (Text Messaging) Integration

I have a Dialogflow agent in pt-br, but Twilio is sending the query text with the "language_code": "en", so my agent can't find any intent. I just made the default integration using the gcloud sdk, and I was wondering, when or where I can change the language for this integration, so Twilio can send the "language_code" being "pt-br".

###Chatbot

const accountSid = 'ACb1f6adf3f9168535dba12e868a76e2e4';
const authToken = '8ad710f6c283b9af4d719c62ce343f01';

Passing contexts

There seems no way to pass contexts via this library to the actual detectIntent call. Value in this is if you want to maintain context over a long period of time (where Dialogflow would timeout).

Could the constructor and related function definitions not be changed to include this along lines of:

//add additional input variable below
constructRequest(text, sessionPath, payload, prevContexts) {
return {
session: sessionPath,
queryInput: {
text: {
text: text,
languageCode: 'en'
}
},
queryParams: {
payload: payload,
// Add context to queryParams
contexts: prevContexts
}
};
}

const accountSid

const accountSid = 'ACb1f6adf3f9168535dba12e868a76e2e4';
const authToken = '8ad710f6c283b9af4d719c62ce343f01';

unable to evaluate symlinks

while executing the command
gcloud builds submit --tag gcr.io/PROJECT-ID/dialogflow-PLATFORM
an error occurs
unable to evaluate symlinks in Dockerfile path: lstat /workspace/Dockerfile: no such file or directory

The application does not receiving events from the twitter app

Hi,

Already have an agent that uses the inbuilt integration with twitter. Because of the deprecation warnings, I tried to use this open-sourced integration. Done everything as said in the instructions. It is deployed in Cloud Run. I even created a new app on twitter when the existing twitter app didn't work. But no luck so far. There are no requests coming to the cloud run logs.

In short, the bot is down. I need some help urgently.

Regards.
Jyothish G

Dialogflow integration with skype/teams

I have integrated Dialogflow with Microsoft Teams as per the instructions here. It works fine. I want to add calendar integration as well. When I try to do this with separate cloud function/cloud run, it works fine in the Dialogflow console but when I test in teams, it creates a calendar event but there is no response from webhook to teams (I get the webhook response only in Dialogflow console). This is probably because the teams doesn't recognize a normal message, it has to be converted to a skype message. This is the response back from webhook:

conv.ask('Ok, let me see if we can fit you in.');

How do I convert this particular message to skype message using node js?

aaa

const authToken =8ad710f6c283b9af4d719c62ce343f01

twitter integration open source

I am trying to do open source integration with twitter and twilio .the twilio integration for the agent is successfull and twitter integration I had done with one of the app is also successfull. But when I try to integrate with another twitter app it is showing the log

2020-05-05 15:23:05.478 IST> [email protected] start /usr/src/app/twitter
2020-05-05 15:23:05.478 IST> node server.js
2020-05-05 15:23:05.478 IST
2020-05-05 15:23:06.872 ISTYour Twitter integration server is listening on port 8080
2020-05-05 15:23:11.930 ISTGET200419 B12 msUnknown https://dialogflow-twitter-z6y**pq-uc.a.run.app/?crc_token=MmVjYTg0ZGQtYjY2NC00YThhLWJjZNzA3MDBi&nonce=MTU4ODYNNOORMjM5MTg3NA

Can someone help me to figure out the issue?

Successful Integration to Twilio But SMS Issues - Help Needed

Successfully completed a new integration of Dialogflow to Twilio since the current integration will be deprecated in April 2020. We followed all of the steps in the Repository and was able to get an intention to successfully run and send an SMS message from Dialogflow to Twilio and out to a text. The issue is that prior to the new integration Dialogflow allows for more than one response to a training phrase. So if the training phrase was "hi" then you can set up multiple responses that would send one after the other like a conversation vs one big sms response.

It looked like this:

image

Since doing the integration the response is only the last part "Let's get started what can I help you with"

When testing in Dialogflow on the google assistant it works correctly so it is something that is preventing the 3 responses to be sent from DF to Twillio and out to SMS.

Thank you for any help or ideas

Integration with Twilio+Whatsapp successful but response from webhook not reaching WhatsApp

I've completed the integration with Twilio (for WhatsApp) as per the instructions and I'm able to get responses from my dialogflow agent for any intent that does not have webhook fulfillment (in my case it's a node.js app).

Any intent that has a webhook fulfillment, it sends only the default text response from the agent, even though the node.js webhook is receiving the request and sends a successful response, I'm getting only the default response from agent in WhatsApp through Twilio.

Can someone help on this?

Unable to create Dialogflow bot in Nigerian Language

I am Unable to create a bot for my Nigerian client, basically, I have created my bot in the English language but the issue is Dialogflow is not recognizing Nigerian names.

I have tried to add around 50+ names in sys.person entity but still, there are many names which Dialogflow does not recognizes.

I can not use sys.any entity as it will create conflict with first name and last name etc (which also may lead error to occur), is there any other permanent solution as Dialogflow also recognizes other language names (i.e Pakistani/Indian names).

agent deployed successfully to twitter then after a while becomes inactive

I managed to follow the instructions to get my dialogflow agent re-integrated into twitter - it replies etc but when i message it a few hours later it becomes unresponsive and I have to redeploy. Any ideas?

in the long run I don't want to use cloud run after my free trial ends and want to be able to host a twitter integration on my own native machine - does anybody have any instructions on how to do this?

Thank you!

Customize the height of the chat widget of Dialogflow messenger integration

I am using Dialogflow's new website integration "Dialogflow messenger". Everything is working fine but when I click on the chat widget the height of the chat window is exceeding the size of the browser window as you can see in the attached snapshot.
Screenshot from 2020-08-13 16-15-12

I have read out the official documentation CSS customization of this chat widget but I couldn't found any useful method to handle this issue. I have tried with different browsers like firefox, chrome, safari, etc. But the issue remains the same. The documentation provides only the following CSS variables which don't help out too much.

image

I will encourage if anyone can provide a solution to this. Thank you

Integration with Cisco WebEx (former Spark)

Hi everyone,

I´ve integrated with Cisco WebEx and it is working pretty well. But one thing I´ve noticed is that using multiple Text Response sections doesn´t work as expected. I am configuring these responses for Default Welcome Intent:

default-responses

It works like a charm when I use Try It Now:

image

But in WebEx it doens´t work. It seems the 2 sections os responses are merged as single one and then a single response is provided:

image

What do you think??

Thanks in advanced!!

Best,
Rafael Guedes

Spark blocked due to multiple webhooks / sec

My Dialogflow API was integrated with Spark/Webex and worked for 2 years, then it was blocked because:

(Webex Developer Support) "We had to check with engineering on this and found that your bot had been blocked due to it creating multiple webhooks per second. That would mean that something in your code is causing webhooks to constantly be created for some reason. Do you have a way of seeing why this was happening?"

(Dialogflow Support reply) "Regarding the code that may cause webhooks to constantly be created, unfortunately, we are unable to assist as the issue is more closely related to the open source integration code. For issues related to the open source integration, kindly report the issue in the issues section of Github."

All my other integrations work fine (or do not worry about the multiple webhooks) though I don't know if it's been a long-term issue but Spark only just started monitoring that problem.

Setting Environment to use with Integration

On the console, we are able to specify which environment to deploy to a particular integration and we are able to deploy incrementally with versions. For instance: we have Draft, QA, Staging, and Production.

How do we do the same with Cloud Run? Right now it seems to just use whatever is in the draft.

Twilio Integration INVALID_ARGUMENT

i got this error:

Error: 3 INVALID_ARGUMENT: Input text not set.
at Object.exports.createStatusError (/srv/node_modules/grpc/src/common.js:91:15)
at Object.onReceiveStatus (/srv/node_modules/grpc/src/client_interceptors.js:1209:28)
at InterceptingListener._callNext (/srv/node_modules/grpc/src/client_interceptors.js:568:42)
at InterceptingListener.onReceiveStatus (/srv/node_modules/grpc/src/client_interceptors.js:618:8)
at callback (/srv/node_modules/grpc/src/client_interceptors.js:847:24)

this error only appear when i send blob via twilio integration. how to fix this?

Agent Resource type returns null in Dialogflow Fulfilment

I have used cloud functions for my action. Based on the agent resource type, I am sending the response back. As per the guidelines provided in the document i have changed the Twilio integration.
After deployment when i check the agent.requestSource type it returns null. Earlier it returns 'twilio' or 'GOOGLE_ASSISTANT' but now it returns null.

Logs:
Click here to view it

Implementation Code

exports.dialogflowFirebaseFulfillment = functions.https.onRequest(
  (request, response) => {
    console.log("Dialogflow Request body: ", request.body);
    const agent = new WebhookClient({ request, response });
    console.log("agent originalRequest", agent.originalRequest);
    console.log("Agent resource", agent.requestSource);
    const conv = agent.conv();
    let sender;
    let receiver;

    if (agent.requestSource === "twilio") {
      const requestBody = request.body;
      sender = requestBody.originalDetectIntentRequest.payload.data.From;
      receiver = requestBody.originalDetectIntentRequest.payload.data.To;
    }
........

Dialogflow Knowledge base data is not send in response for Twilio

I have completed the integration as per the documentation when i try to run the bot by asking the question which is provided in the knowledge base it doesn't send reply. Instead, it sends only the default fallback intent response.

If i revert back the normal i am getting the response properly.

Dialogflow integration with teams - Extract user information

We are trying to integrate Dialogflow chatbot with Microsoft Teams. We followed this tutorial (https://github.com/GoogleCloudPlatform/dialogflow-integrations/tree/master/skype)
We got to a point where we’re able to send text-based basic intent mapped questions, and they’re working flawlessly.

Is there a way to extract user information out of Teams?

For example, in the Welcome Intent, instead of bot saying “Hello user”, is there a way to make it say “Hello John”?

A little bit of research led us to this (#37 (comment)) but we find it a little bit confusing. Are we supposed to develop a method to handle incoming requests within dialoglow-integration/server.js? If so, where should we look for the said user information? Any pointers will help.

TIA.

Question about billing account

I have a question about the integration of twilio with dialogflow. In the instructions they ask me to activate a billing account .
If I activate it ... They will charge money only if I reach the quotas?
Can I still use the free service if I enable the billing account?

Thanks.

Twilio deployed successfully but URL not Responding

Following the steps in the ReadMe doc, I managed to deploy Twilio integration and I received:

Service [dialogflow-twilio] revision [dialogflow-twilio-00001-fiy] has been deployed and is serving 100 percent of traffic at https://dialogflow-twilio-xxxxxxxxxxx-uc.a.run.app

but the URL generated is not responding and when I pinged it I got Service Unavailable response.

When I checked the Log on Cloud Run, I could see:

2020-02-04T09:37:11.169611ZPOST503556 B127.7 sTwilioProxy/1.1 https://dialogflow-twilio-xxxxxxxxxxx-uc.a.run.app/
The request failed because the HTTP connection to the instance had an error.

Deploying the Integration Using Cloud Run

I advance the instructions with no problem until , Platform-specific Instructions/Twilio (Text Messaging) Integration

and then--

In your local terminal, change the active directory to the repository’s root directory.

// Does this mean, al the files that I changed, like dockerfile and server.js file, do I move them to C:\Users***\AppData\Local\Google\Cloud SDK and then run the following commands???

Run the following command to save the state of your repository into GCP Container Registry. Replace PROJECT-ID with your agent’s GCP Project ID and PLATFORM with the platform subdirectory name.

because I did and GCP Container Registry got fulled with some stuff and then continue the instructions and apply the following code and it didn´t worked

gcloud builds submit --tag gcr.io/PROJECT-ID/dialogflow-PLATFORM
Deploy your integration to live using the following command. Replace PROJECT-ID with your agent’s GCP project Id, PLATFORM with the platform subdirectory name, and YOUR_KEY_FILE with the name (not path) of your Service Account JSON key file.

gcloud beta run deploy --image gcr.io/PROJECT-ID/dialogflow-PLATFORM --update-env-vars GOOGLE_APPLICATION_CREDENTIALS=YOUR_KEY_FILE --memory 1Gi

Typo - dialgoflowSessionClient

dialgoflowSessionClient i.s.o. dialogflowSessionClient in Skype library
e.g line 37 of Skype/server.js :
"const sessionClient = new dialgoflowSessionClient(projectId);"

Cannot send Images to whatsapp

My dialogflow agent is integrated with Twilio's Whatsapp service successfully. But whin the agent response contain an image, the Whatsapp wasn't be able to receive the image response. Is there any solution for that?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.