This project provides a service to handle automatically joining sub spaces after joining a main space.
-
Create an App and Install It
- Obtain
client_id,client_secret, andwebhook_signing_secret.
- Obtain
-
Setup Webhooks
- Add a domain name for handling webhooks.
- Add "space_membership.created" and "space_membership.deleted" events.
- Update webhooks.
-
Get an Admin Member ID
- Retrieve it from the "People" tab of the administration panel.
-
Create a
.envFileCLIENT_ID=XXXXXXX-XXXXXXXXXXXXXXXXX CLIENT_SECRET=XXXXXXXXXXXXXXXXXXXXXXXX WEBHOOK_SIGNING_SECRET=XXXXXXXXXXXXXXXXXXXXXXXX ADMIN_MEMBER_ID=XXXXXXXXXXXXXXXX
-
Retrieve Space and Collection IDs
- For each main space, get its
spaceIdandcollectionIdandname(the collection that contains sub spaces of the same space).
[ { spaceId: 'XXXXXXX', name: 'XXXXXXX', collectionId: 'XXXXXXX' }, { spaceId: 'XXXXXXX', name: 'XXXXXXX', collectionId: 'XXXXXXX' }, { spaceId: 'XXXXXXX', name: 'XXXXXXX', collectionId: 'XXXXXXX' }, ... ]; - For each main space, get its
-
Fill in the Blanks in the Project
-
Run the Project
Create a .env file in the root directory of the project and fill it with the following variables:
- Clone the repository:
git clone <https://github.com/AliAghamiriBettermode/AutoJoinSubSpaces>
- Install the dependencies:
npm install
- Run the project:
npm start
- The project will be running on
http://localhost:5000.