Hi Team,
We are a Freshworks SI Partner, and we have developed a custom app on Freshservice. Currently, we are facing an issue with Object Storage.
We followed the Object Storage section in the Freshworks Developer Documentation and implemented the server-side logic in our Freshservice instance. It is working as expected in our own Freshservice account. However it is not working in the customer’s instance. (PFA screenshots).
I’ve also included the code (manifest.json and server.js) for your reference.
manifest.json
{
"platform-version": "2.3",
"product": {
"freshservice": {
"events": {
"onAppInstall": {
"handler": "onAppInstallHandler"
},
"afterAppUpdate": {
"handler": "afterAppUpdateCallback"
}
}
}
},
"engines": {
"node": "18.19.1",
"fdk": "9.7.4"
},
"dependencies": {
"fs-extra": "11.3.0"
}
}
server.js
const fs = require("fs-extra");
const dummyData = [
{
"value": "13000300438",
"text": "1"
},
{
"value": "13000301049",
"text": "1234-test"
},
{
"value": "13000284413",
"text": "AI"
}
];
exports = {
onAppInstallHandler: async function () {
try {
console.info("--------- On App Install Handler ---------");
await this.updateField();
console.info('--------- App Installed Successfully ---------');
renderData();
} catch (err) {
console.log('Error in app installation', err);
renderData({message: "Error in app installation."});
}
},
afterAppUpdateCallback: async function() {
try {
console.info("--------- After App Update Callback ---------");
await this.updateField();
console.info('--------- App Updated Successfully ---------');
renderData();
} catch (error) {
console.log('Error in app installation', error);
renderData({message: "Error in app update."});
}
},
updateField: async function() {
try {
console.info('--------- Updating JSON Field ---------');
const fileContent = JSON.stringify(dummyData, null, 2);
// Get server sandbox path
const sandboxPath = $files.getSandboxedPath();
const jsonFilePath = `${sandboxPath}/locationData.json`;
await fs.outputFile(jsonFilePath, fileContent);
const result = await $files.upload({
"file": jsonFilePath,
"description": "Location choices data",
});
if (!result?.id) throw new Error("Upload failed - no ID in response");
console.log("JSON Response : ", result);
console.info('--------- JSON Field Updated Successfully ---------');
} catch (error) {
console.error("Error uploading location choices file:", error);
}
try {
console.info('--------- Uploading Sample CSV File ---------');
// Create file content
const csvData = [
['id', 'name', 'status'],
['1', 'Router A', 'Active'],
['2', 'Router B', 'Inactive'],
['3', 'Router C', 'Active']
].map(row => row.join(',')).join('\n');
// Get Serverless app sandbox path
const sandboxPath = $files.getSandboxedPath();
const csvFilePath = `${sandboxPath}/sample.csv`;
// Write the file into the path
fs.writeFileSync(csvFilePath, csvData);
// Upload the file from the sandbox path
const result = await $files.upload({
"file": csvFilePath,
"description": "kyc approve document",
});
console.log("CSV Response : ", result);
console.info('--------- Sample CSV File Uploaded Successfully ---------');
} catch (error) {
console.error("Error uploading CSV file:", error);
}
}
};
Client Instance Error Logs
Our Instance Success Logs

