I am using an exteranl API that do some work for 15min, when it finish it will call any URL you define in your initial request to send the results to.
Is it possible for dialogFlow to accept this result in 15min? Is there like a built-in async response handler in DialogFlow?
If you are calling external APIs via webhook, it would be subject to the maximum webhook timeout limit of 30 seconds. After the response timeout is exceeded, Dialogflow invokes a webhook error or timeout built-in event and continues processing as usual. Therefore, Dialogflow would no longer accept webhook responses more than the set timeout limit.
Note that conversational interfaces are meant to be designed as a continuous message exchange between the end user and the app/bot. If your web service requires more time for executing operations in the background and this cannot be optimized, consider redesigning the conversation flow in such a way that end users don't wait for the app/bot to reply for more than the set webhook timeout limit.
If you have your own custom application (integrated using APIs or Client Libraries), you can instead call/invoke the function that needs 15 minutes of work (let’s call this function_1) from your custom application.
Here’s a basic setup:
User enters a query from the interface of your custom application.
Your custom application sends the user query with the Detect Intent request to the Dialogflow agent (using APIs or Client Libraries).
After your custom application receives a Detect Intent response from the agent, you can create code to get the intent name or event name from the detectIntentResponse.queryResult.match.intent.displayName or match.event response json respectively and then call/invoke function_1 based on the intent or event matched.
Once function_1 is finished processing, you can either send a direct response to the user in your custom application’s interface or send a Detect Intent request to your agent so it matches an Intent and sends the intent response back to your custom application.