mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
⚡ Added create folder operation
This commit is contained in:
@@ -193,6 +193,16 @@ export class MicrosoftOneDrive implements INodeType {
|
||||
}
|
||||
}
|
||||
if (resource === 'folder') {
|
||||
//https://docs.microsoft.com/en-us/onedrive/developer/rest-api/api/driveitem_post_children?view=odsp-graph-online
|
||||
if (operation === 'create') {
|
||||
const name = this.getNodeParameter('name', i) as string;
|
||||
const body: IDataObject = {
|
||||
name,
|
||||
folder: {},
|
||||
};
|
||||
responseData = await microsoftApiRequest.call(this, 'POST', '/drive/root/children', body);
|
||||
returnData.push(responseData);
|
||||
}
|
||||
//https://docs.microsoft.com/en-us/onedrive/developer/rest-api/api/driveitem_list_children?view=odsp-graph-online
|
||||
if (operation === 'getChildren') {
|
||||
const folderId = this.getNodeParameter('folderId', i) as string;
|
||||
|
||||
Reference in New Issue
Block a user