Hi, I created a custom app that create a PDF with the assets assigned to the employee.
For creating the PDF, I use the Doppio service, this service support only calls in Node.js and other platform.
Node.js is not supported in browser, I’ve tried to add the API call in the app.js but don’t work.
There is an option for doing this call in Freshservice?
Thank in advance
Manuel
var myHeaders = new Headers();
myHeaders.append("Access-Control-Allow-Origin", "*");
myHeaders.append("Content-Type", "application/json");
myHeaders.append("Authorization", "Bearer <!!!>");
var raw = JSON.stringify({
"templateId": "08417d31-a75c-4eb7-98f7-d433bbc18291",
"templateData": {
"DOP_NAME": "Mario Rossi",
"DOP_ITEMS": [
{
"row": 0,
"id": "33246",
"name": "M-PA-RD9XLWV9JF"
},
{
"row": 1,
"id": "63434",
"name": "Magic Mouse"
},
{
"row": 2,
"id": "71412",
"name": "EVOLVE2 30"
}
]
}
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://api.doppio.sh/v1/template/sync", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));