How to post with a custom tool using zoho API #2179
Replies: 1 comment
-
solved I have using a conversiational agent instead of a agent |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi I need your help i create a tool called add sales, to Post in a zoho form the sales of one user pass when chat with the assistant but I try many ways to pass the info and even the bot say the info was posted I can see it in Zoho here is my function :
const fetch = require('node-fetch');
const url = 'https://creator.zoho.com/api/v2.1/myportal/myapp/form/myform';
const sales = {data: {"Sales": $sales}};
const options = {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Zoho-oauthtoken 1xxxxxxxxxxxxxxxxxxxxxxxxxx57'
},
body: JSON.stringify(sales)
};
try {
const response = await fetch(url, options);
const text = await response.text();
return text;
} catch (error) {
console.error(error);
return '';
}
just for your information when I use post man the RAW body that I use is {data{"Sales":123}}
Beta Was this translation helpful? Give feedback.
All reactions