Access monday storage from integrations(node.js app)
Hello there,
We have an app on monday marketplace(hosted on monday code), it has a item view feature only. We are storing key-value pairs in monday.com storage(using monday-sdk-js library’s method storage) and secure storage(monday-code secure storage api).
Now, we are adding an integration feature that needs to get and set the data in the monday.com storage. We can access monday.com secure storage from integrations(node.js app) with the help of monday-apps-sdk, but we need access to data stored in monday.com storage(the data stored using the monday-sdk-js library’s storage method). We have tried to use the monday-sdk-js library in the node.js app but it shows undefined for the storage method.
So is there any way to access the monday storage data from the integrations feature?
Thanks
Page 1 / 1
From the frontend: Access the global storage using monday-sdk-js library: monday.storage
From the backend: Access the global storage using apps-sdk library: JavaScript SDK
Data stored from the client-side will be accessible by your server app.
Your integration can use the shared parameter on storage.set(key, value, options) if you want the data to be accessible from the client-side too.
We have tried to access data stored from monday-sdk-js library’s storage method, using the monday-apps-sdk library’s storage method but getting value as null despite the value exists.
Screenshot named NoValueSS1.png shows what is logged using monday-apps-sdk library’s storage method and Screenshot named ValueSS2.png shows what is logged using monday-sdk-library’s storage method. For the same key.
Where are you setting the data in the storage – on the frontend or backend? If you’re setting it from the frontend, are you using the global storage –
Global storage method:
monday.storage.setItem('serialKey'...)
Instance-level storage method:
monday.storage.instance.setItem('serialKey'...)
Setting data from frontend using the moday-sdk-js library method Storage.
We are using the global storage.
The requirement is we need to access data set from the frontend using monday-sdk-js global storage method in the backend(integrations feature).
Thanks Dipro for your suggestions. I got an email from a monday support team member who is now taking up the issue.
Was there a resolution on this issue? I am having the same issue.
When in a board view I am using monday-sdj-js to save settings to monday.storage ‘board-123456’. On board view refresh i load the data by key ‘board-123456’. No issues there.
import mondaySdk from "monday-sdk-js";
const monday = mondaySdk();
monday.setApiVersion("2025-01");
const result = await monday.storage.getItem(`board-${boardId}`);
Outside the monday context, inside the same app, i have a client side page that also uses monday-sdk-js. Here i am setting the token, which i need to do because we are now outside the boardview and seemless authentication no longer applies:
import mondaySdk from "monday-sdk-js";
const monday = mondaySdk();
monday.setApiVersion("2025-01");
monday.setToken('xxx')
const result = await monday.storage.getItem(`board-${boardId};
console.log("Result:", result);
^^ No matter which monday API KEY i use here, it does not retreive the data. It works on the page that I am embedding into the board view, just not outside.
Then next to test i created a server page
import { Storage } from "@mondaycom/apps-sdk";
//ADD DATA
const storage = new Storage(process.env.MONDAY_TOKEN!);
const { success, error } = await storage.set(key, JSON.stringify(value));
//GET DATA
const storage = new Storage(process.env.MONDAY_TOKEN!);
const { success, value } = await storage.get(key, {
shared: true,
});
This also works. I also believe if I save the data initially from @mondaycom/apps-sdk", with shared:true parameter, i can retrieve that same data from the client.
I assume I am doing something wrong here. Otherwise that means for a simple board view app, I would need to have all users complete oAuth first, so that I can save data to monday.storage on server side using the USERS oauth API KEY rather than my .env personal account API KEY
HI checking again to see what your resolution was?
I have submitted 2 tickets on this but support has not had any idea what I am talking about.
In nodejs (on the server), try this instead when you save data to storage:
const { version, success, error } = await storage.set(
storageKey,
JSON.stringify(payload),
{ shared: true } // so it can be accessed on the client side
);
This will allow it to be available in the browser/on the client side too, using:
import mondaySdk from "monday-sdk-js";
const monday = mondaySdk();
const result = await monday.storage.getItem(storageKey);
And write back from the browser, using:
import mondaySdk from "monday-sdk-js";
const monday = mondaySdk();
...
const result = await monday.storage.setItem(
storageKey,
JSON.stringify(payload)
);
Ok so you are saying in a board view, save using the ‘apps-sdk’ and not the ‘monday-sdk-js’? I say this because the ‘monday-sdk-js’ has setItem, not .set
Just to clarify, I am not current using monday code to host my app, it is on Vercel. But I have been told to use the ‘apps-sdk’ regardless.