Voiceflow PartnersVPVoiceflow Partners
Powered by
atta866A
Voiceflow Partners•8mo ago
atta866

Send message to Voiceflow from external app

I have this code

if (vfUserId) {
try {
console.log("Triggering Voiceflow custom action for user:", vfUserId)
const continueResponse = await fetch(
https://general-runtime.voiceflow.com/state/user/userID/interact
https://general-runtime.voiceflow.com/state/user/userID/interact
,
{
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: "VF.DM.68725b6764978a40d4cd4e4d.RXxxvHEA2cMn0MSq",
},
body: JSON.stringify({
action: {type: "next"}
}),
},
)
const traces = await continueResponse.json();
console.log("Continue response traces:", traces)
if(continueResponse.ok){
const customActionTrace = traces[traces.length - 1
if (customActionTrace && customActionTrace.type === "return_confirmation") {
const resultResponse = await fetch(
https://general-runtime.voiceflow.com/state/user/userID/interact
https://general-runtime.voiceflow.com/state/user/userID/interact
,
{
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: "VF.DM.68725b6764978a40d4cd4e4d.RXxxvHEA2cMn0MSq",
},
body: JSON.stringify({
request: {
type: "intent",
payload: {
intent: {
name: "confirm_return" }
........
)
....


and this does responds me in my external app but on request i want to send success and i am redirecting back to voicflow so chat resumes ,
I have custom action waiting there for reply ,

Or is there a way i can just launch a intent from external app.
On button click i am redirecting back to voiceflow so there intent should be launched.
Voiceflow Partners banner
Voiceflow PartnersJoin
Exclusive community for Voiceflow Solutions Providers & Content Creators.
13,076Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

send data from zapier to voiceflow
generous-coffeeGgenerous-coffee / ❓┃ask-a-question
2y ago
Take userId from web to voiceflow
Tico | Voiceflow AssistantTTico | Voiceflow Assistant / ❓┃ask-a-question
2y ago
Sending Data from Zapier to Voiceflow
faint-whiteFfaint-white / ❓┃ask-a-question
2y ago
#How to Skip a Message Step in Voiceflow
Rick BldRRick Bld / ❓┃ask-a-question
8mo ago
Recent Announcements
jacklyn

# Let your agents search the web 🔎 Hey everyone! We just released the web search tool for the agent step! Your agents can now automatically search the web for information, letting your agent supplement the LLM's knowledge and the data in its knowledge base with live, up-to-date information. Plus.... * You can restrict searches to specific domains, so your agent only searches sites that you own * This is a tool, so you remain in control of when the agent searches the web * Results are automatically summarized in a way that your agent can automatically understand Under the hood, we're using OpenAI's web search API. Give it a try, and let us know what you think! https://docs.voiceflow.com/changelog/native-web-search-tool

jacklyn · 4mo ago

jacklyn

jacklynbiggin's Thread

jacklyn · 4mo ago

hurt-tomato

connor_maclean's Thread

hurt-tomato · 4mo ago