Back
[SOLVED]How to get ID from Node server SDK to create unique ID , everytime I create a Document.
- 0
- Databases
- Web

I am writing a function, and I want to generate an unique ID to create a document, How to import ID from appwrite in Node Server SDK?
TL;DR
Solution:
To generate a unique ID every time you create a document using the Node Server SDK for Appwrite, you can use the `createDocument` function along with the `generateUUID` method provided by the SDK. Here's how you can do it:
1. Import the required modules:
```javascript
const { Client, Database } = require('appwrite');
```
2. Create a new instance of the `Client` and `Database` classes:
```javascript
const client = new Client();
const database = new Database(client);
```
3. Use the `generateUUID` method from the SDK to generate a unique
How to get ID from Node server SDK to create unique ID , everytime I create a Document.


Yes, Thanks sir 🙂

[SOLVED]How to get ID from Node server SDK to create unique ID , everytime I create a Document.
Recommended threads
- A feature/Fix request
Whenever I use Appwrite then to see the items of document I've to click "columns" option and select those items that I want to see then if I refresh browser/pa...
- 401 - Project is not accessible in this ...
This is on the app write console https://screen.aryanwadhera.tech/7YTVhLTf
- functions page returns 500
I am running selfhosted appwrite version 1.6.0 and all of a sudden my functions page stopped working, returning a 500. I don't see anything in the logs that wo...
