Share feedback, ideas and get community help

Home
Members
Nícollas Rocha
N
Nícollas Rocha
Offline, last seen 3 months ago
Joined September 13, 2024
Hello everything is fine?

I'm trying to import a flow via api.

I'm passing it on the body

{
"workspaceId": "<Workspace ID>",
"typebot": "<Typebot ID>"
}


as well as in the documentation.

But I'm getting the following error:

----

Status code 400
{"message":"Input validation failed","code":"BAD_REQUEST","issues":[{"code":"invalid_type","expected":"string","received":"undefined"," path":["typebot","name"],"message":"Required"},{"code":"invalid_type","expected":"array","received":"undefined","path" :["typebot","variables"],"message":"Required"},{"code":"invalid_type","expected":"object","received":"undefined","path":[ "typebot","theme"],"message":"Required"},{"code":"invalid_type","expected":"object","received":"undefined","path":["typebot ","settings"],"message":"Required"},{"code":"invalid_type","expected":"string","received":"undefined","path":["typebot", "icon"],"message":"Required"},{"code":"invalid_type","expected":"string","received":"undefined","path":["typebot","folderId "],"message":"Required"}]}

-----

Does anyone know why?

Thank you very much
9 comments
B
N
hello everything is fine?

Can I create a custom trigger, for example a specific word?
4 comments
n
N
B
Hi everyone, good afternoon.

I'm running a chat here and saving the bot's response in the response variable

Then I show a button on the screen that runs the following script

var resposta = {{resposta}};

function copyToClipboard() {
var textToCopy = resposta;
var tempInput = document.createElement("textarea");
tempInput.value = textToCopy;
document.body.appendChild(tempInput);
tempInput.select();
document.execCommand("copy");
document.body.removeChild(tempInput);
alert(resposta);
}

console.log(resposta);


However, instead of saving the content of the response variable to the work area, it saves all the code to the work area.

What am I doing wrong?
1 comment
B