Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update README.md #62

Merged
merged 1 commit into from
Mar 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 74 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,90 @@
# ONLYOFFICE Zapier Integration
# Zapier ONLYOFFICE integration app

This app allows users to create their own DocSpace integration and configure actions of the *"If X happens, then you need to do Y"* format without any programming. These interactions are called *Zaps*.

## Installing Zapier ONLYOFFICE integration app

1. Register for a [Zapier account](https://zapier.com/sign-up) or [log in](https://zapier.com/app/login).
2. In the top menu, go to **My Apps**.
3. Click **Connect a new account...** and find ONLYOFFICE DocSpace.
4. Enter [URL](https://api.onlyoffice.com/docspace/backend/howitworks/auth) to your DocSpace, email and password to connect your account.
5. Start automating by selecting an existing Zap or creating a new one with the Zap Editor, which will guide you through each step.

For examples and ideas, explore available ONLYOFFICE integrations with Zapier.

This Zapier integration allows you to create your own DocSpace integration.

## Features

### Authentication

- Session authentication.
The Zapier app implements session authentication. To log in, the user must enter the DocSpace URL, username and password.

### Triggers

- Triggers when a room is created.
At the moment, the following triggers are implemented in DocSpace:

| Trigger | Fields |
| ------------- | ------------- |
| File Created | Room id, Folder id |
| File Created in My Documents | Folder id |
| File Deleted | Room id, Folder id |
| File Deleted from My Documents | Folder id |
| Folder Created | Room id, Folder id |
| Folder Created in My Documents | Folder id |
| Folder Deleted | Room id, Folder id |
| Folder Deleted from My Documents | Folder id |
| Room Archived | - |
| Room Created | - |
| User Joined | Room id, active |
| User Added | - |

In the free version, the trigger is called every 10 minutes. When a trigger is activated, it makes a request to DocSpace, for example to get a list of rooms. The response from Zapier returns an array of all rooms with the *id* field.

Zapier compares this array with the previous result. If there are new elements in the array, Zap is called for each new element and performs a chain of actions.

For example, if 3 new rooms appear in 10 minutes, a Zap will be called for each new room, and the corresponding chain of actions will be performed for it.

### Actions

At the moment, the following actions are available in DocSpace:

| Actions | API method | Fields |
| ------------- | ------------- | ------------- |
| Archive Room | [PUT api/2.0/files/rooms/{id}/archive](https://api.onlyoffice.com/docspace/method/files/put/api/2.0/files/rooms/%7bid%7d/archive) | Room id |
| Create File | [POST api/2.0/files/{folderId}/file](https://api.onlyoffice.com/docspace/method/files/post/api/2.0/files/%7bfolderid%7d/file) | Room id, Folder id, Title |
| Create File in My Documents | [POST api/2.0/files/@my/file](https://api.onlyoffice.com/docspace/method/files/post/api/2.0/files/%40my/file) | Folder id, Title |
| Create Folder | [POST api/2.0/files/folder/{folderId}](https://api.onlyoffice.com/docspace/method/files/post/api/2.0/files/folder/%7bfolderid%7d) | Room id, Folder id, Title |
| Create Folder in My Documents | [POST api/2.0/files/folder/{folderId}](https://api.onlyoffice.com/docspace/method/files/post/api/2.0/files/folder/%7bfolderid%7d) | Folder id, Title |
| Delete Folder | [DELETE api/2.0/files/folder/{folderId}](https://api.onlyoffice.com/docspace/method/files/delete/api/2.0/files/folder/%7bfolderid%7d) | Room id, Folder id |
| Delete Folder from My Documents | [DELETE api/2.0/files/folder/{folderId}](https://api.onlyoffice.com/docspace/method/files/delete/api/2.0/files/folder/%7bfolderid%7d) | Folder id |
| Download File | [GET api/2.0/files/file/{fileId}/presigned](https://api.onlyoffice.com/docspace/method/files/get/api/2.0/files/file/%7bfileid%7d/presigned) | Room id, Folder id, File id |
| Download File from My Documents | [GET api/2.0/files/file/{fileId}/presigned](https://api.onlyoffice.com/docspace/method/files/get/api/2.0/files/file/%7bfileid%7d/presigned) | Folder id, File id |
| Get External Link | [GET api/2.0/files/rooms/{id}/link](https://api.onlyoffice.com/docspace/method/files/get/api/2.0/files/rooms/%7bid%7d/link) | Room id |
| Create Room | [POST api/2.0/files/rooms](https://api.onlyoffice.com/docspace/method/files/post/api/2.0/files/rooms) | Title, Type |
| Share Room | [GET api/2.0/files/rooms/{id}/share](https://api.onlyoffice.com/docspace/method/files/get/api/2.0/files/rooms/%7Bid%7D/share) | Room id, User id, Role |
| Upload File | [POST api/2.0/files/{folderId}/upload/create_session](https://api.onlyoffice.com/docspace/method/files/post/api/2.0/files/%7bfolderid%7d/upload/create_session) | Room id, Folder id, URL or File |
| Upload File to My Documents | [POST api/2.0/files/{folderId}/upload/create_session](https://api.onlyoffice.com/docspace/method/files/post/api/2.0/files/%7bfolderid%7d/upload/create_session) | Folder id, URL or File |
| Invite User | [POST api/2.0/people/invite](https://api.onlyoffice.com/docspace/method/people/post/api/2.0/people/invite) | Email, Role |

When creating a new Zap, we set up a chain of actions that follows the trigger. Zapier automatically performs these actions on new data when the trigger fires. You can manually start the Zap by clicking the **Run Zap** button.

### Search

Search is used to return the most suitable value for the request.

At the moment, search for folders and files by name is available through the sections or rooms.

**Search through a section**

### Creations
1. Open the *Section* tab.
2. Choose a section for search (My Documents, Rooms, Archive, Trash).
3. Specify the file/folder name.

- Create a file.
- Create a file in the My Documents directory.
**Search through a room**

## Installation
1. Open the *Custom* tab.
2. Specify the room ID from the trigger.

...

## Contribution

Expand Down
Loading