Skip to content

Commit 00eb93a

Browse files
committed
feat: Initial implementation of SharePoint upload
Add docs
1 parent 6cfc248 commit 00eb93a

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

README.md

+22-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,28 @@ npm run import -- --urls tools/importer/urls.txt --importjs tools/importer/impor
4242
The `import.js` file you provide will be automatically bundled and sent to the Import as a Service API, so referencing
4343
other local scripts (such as transformers) is supported.
4444

45-
Once complete, a pre-signed URL to download the import result (as a .zip archive) from S3 will be printed to the console.
45+
Once complete, a pre-signed URL to download the import result (as a .zip archive) from S3 will be printed to the console.
46+
47+
#### SharePoint upload
48+
49+
Optionally, the [m365 CLI](https://pnp.github.io/cli-microsoft365/) can be installed and configured to upload the import result to SharePoint.
50+
You will need your `tenantId` and the `clientId` of a [Microsoft Entra application](https://pnp.github.io/cli-microsoft365/user-guide/using-own-identity/) (on your SharePoint) to setup the CLI:
51+
52+
```
53+
m365 setup
54+
m365 login
55+
```
56+
57+
Copy a link from SharePoint to the directory you'd like to upload to. This can be done from the SharePoint web UI, via the "Copy link" button.
58+
Your new link should take the following form: `https://example.sharepoint.com/:f:/r/sites/example/Shared%20Documents/destination-directory`
59+
60+
Once logged in to SharePoint with the `m365` CLI, pass the SharePoint link as a param to the aem-import-helper:
61+
62+
```
63+
npm run import -- --urls urls.txt --sharepointurl https://example.sharepoint.com/:f:/r/sites/example/Shared%20Documents/destination-directory
64+
```
65+
66+
Once the import job is complete, the import result will be downloaded from S3, extracted, and each document will be uploaded to the specified SharePoint directory.
4667

4768
### Bundle
4869

0 commit comments

Comments
 (0)