Dialogflow fulfillment using HTTP responses
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}
I have an azure function that gets json and returns json.
I want that upon intent being invoked on dialogflow, the function will be called and the response will be shown to the user. Because I'm using multiple intents, I can't put it simply in the webhook because I don't want the same logic for every intent.
I've tried to use the Inline editor and upon intent to make an HTTP request to my Azure function. However, whenever I tried using JavaScript library for HTTP ( Ajax
etc.. ) the Inline editor didn't recognize the library
If anyoune has an example of how to make HTTP Post Request with json parameters this would be a great help !
database azure actions-on-google dialogflow
add a comment |
I have an azure function that gets json and returns json.
I want that upon intent being invoked on dialogflow, the function will be called and the response will be shown to the user. Because I'm using multiple intents, I can't put it simply in the webhook because I don't want the same logic for every intent.
I've tried to use the Inline editor and upon intent to make an HTTP request to my Azure function. However, whenever I tried using JavaScript library for HTTP ( Ajax
etc.. ) the Inline editor didn't recognize the library
If anyoune has an example of how to make HTTP Post Request with json parameters this would be a great help !
database azure actions-on-google dialogflow
Can you update your question to include your code, the package.json, and any errors that you may be encountering? medium.com/google-developer-experts/…
– Prisoner
Nov 26 '18 at 15:29
add a comment |
I have an azure function that gets json and returns json.
I want that upon intent being invoked on dialogflow, the function will be called and the response will be shown to the user. Because I'm using multiple intents, I can't put it simply in the webhook because I don't want the same logic for every intent.
I've tried to use the Inline editor and upon intent to make an HTTP request to my Azure function. However, whenever I tried using JavaScript library for HTTP ( Ajax
etc.. ) the Inline editor didn't recognize the library
If anyoune has an example of how to make HTTP Post Request with json parameters this would be a great help !
database azure actions-on-google dialogflow
I have an azure function that gets json and returns json.
I want that upon intent being invoked on dialogflow, the function will be called and the response will be shown to the user. Because I'm using multiple intents, I can't put it simply in the webhook because I don't want the same logic for every intent.
I've tried to use the Inline editor and upon intent to make an HTTP request to my Azure function. However, whenever I tried using JavaScript library for HTTP ( Ajax
etc.. ) the Inline editor didn't recognize the library
If anyoune has an example of how to make HTTP Post Request with json parameters this would be a great help !
database azure actions-on-google dialogflow
database azure actions-on-google dialogflow
asked Nov 26 '18 at 13:32
CmpScience LearnerCmpScience Learner
397
397
Can you update your question to include your code, the package.json, and any errors that you may be encountering? medium.com/google-developer-experts/…
– Prisoner
Nov 26 '18 at 15:29
add a comment |
Can you update your question to include your code, the package.json, and any errors that you may be encountering? medium.com/google-developer-experts/…
– Prisoner
Nov 26 '18 at 15:29
Can you update your question to include your code, the package.json, and any errors that you may be encountering? medium.com/google-developer-experts/…
– Prisoner
Nov 26 '18 at 15:29
Can you update your question to include your code, the package.json, and any errors that you may be encountering? medium.com/google-developer-experts/…
– Prisoner
Nov 26 '18 at 15:29
add a comment |
2 Answers
2
active
oldest
votes
If you need to add a library to the Dialogflow Inline Editor, you can click on the "package.json" tab and edit it to include the npm specification for the package you wish to include.
Well that's what I tried. However, using the library in the index.js using require emit an error that the package doesn't exist
– CmpScience Learner
Nov 26 '18 at 14:50
add a comment |
SOLVED - if anyone else comes across this problem, make sure your Azure function returns Google.Cloud.Dialogflow.V2 . This way it matches the DialogFlow and he can understand your response easily :)
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53482249%2fdialogflow-fulfillment-using-http-responses%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
If you need to add a library to the Dialogflow Inline Editor, you can click on the "package.json" tab and edit it to include the npm specification for the package you wish to include.
Well that's what I tried. However, using the library in the index.js using require emit an error that the package doesn't exist
– CmpScience Learner
Nov 26 '18 at 14:50
add a comment |
If you need to add a library to the Dialogflow Inline Editor, you can click on the "package.json" tab and edit it to include the npm specification for the package you wish to include.
Well that's what I tried. However, using the library in the index.js using require emit an error that the package doesn't exist
– CmpScience Learner
Nov 26 '18 at 14:50
add a comment |
If you need to add a library to the Dialogflow Inline Editor, you can click on the "package.json" tab and edit it to include the npm specification for the package you wish to include.
If you need to add a library to the Dialogflow Inline Editor, you can click on the "package.json" tab and edit it to include the npm specification for the package you wish to include.
answered Nov 26 '18 at 14:04
PrisonerPrisoner
36k33562
36k33562
Well that's what I tried. However, using the library in the index.js using require emit an error that the package doesn't exist
– CmpScience Learner
Nov 26 '18 at 14:50
add a comment |
Well that's what I tried. However, using the library in the index.js using require emit an error that the package doesn't exist
– CmpScience Learner
Nov 26 '18 at 14:50
Well that's what I tried. However, using the library in the index.js using require emit an error that the package doesn't exist
– CmpScience Learner
Nov 26 '18 at 14:50
Well that's what I tried. However, using the library in the index.js using require emit an error that the package doesn't exist
– CmpScience Learner
Nov 26 '18 at 14:50
add a comment |
SOLVED - if anyone else comes across this problem, make sure your Azure function returns Google.Cloud.Dialogflow.V2 . This way it matches the DialogFlow and he can understand your response easily :)
add a comment |
SOLVED - if anyone else comes across this problem, make sure your Azure function returns Google.Cloud.Dialogflow.V2 . This way it matches the DialogFlow and he can understand your response easily :)
add a comment |
SOLVED - if anyone else comes across this problem, make sure your Azure function returns Google.Cloud.Dialogflow.V2 . This way it matches the DialogFlow and he can understand your response easily :)
SOLVED - if anyone else comes across this problem, make sure your Azure function returns Google.Cloud.Dialogflow.V2 . This way it matches the DialogFlow and he can understand your response easily :)
answered Nov 27 '18 at 14:52
CmpScience LearnerCmpScience Learner
397
397
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53482249%2fdialogflow-fulfillment-using-http-responses%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Can you update your question to include your code, the package.json, and any errors that you may be encountering? medium.com/google-developer-experts/…
– Prisoner
Nov 26 '18 at 15:29