diff --git a/packages/noco-docs/docs/100.collaboration/010.overview.md b/packages/noco-docs/docs/100.collaboration/010.overview.md index b0f29c3b50..48cffbf698 100644 --- a/packages/noco-docs/docs/100.collaboration/010.overview.md +++ b/packages/noco-docs/docs/100.collaboration/010.overview.md @@ -5,7 +5,6 @@ tags: ['collaboration', 'workspace collaboration', 'base collaboration', 'share keywords: ['Collaboration overview', 'Workspace collaboration', 'Base collaboration', 'Share base', 'Share view', 'Team collaboration', 'Workspace management', 'Workspace settings', 'Workspace administration', 'Member invitation', 'User access', 'Member management', 'Workspace teamwork', 'Workspace organization'] --- - At NocoDB, our passion lies in promoting teamwork, and it's a significant factor contributing to our popularity. Through NocoDB's collaborative functionalities, you have the ability to foster effective task distribution and team communication by extending invitations to others for seamless cooperation. In this segment, we'll discuss various collaboration features that NocoDB offers. diff --git a/packages/noco-docs/docs/110.automation/010.overview.md b/packages/noco-docs/docs/110.automation/010.overview.md deleted file mode 100644 index 94fa6c1b97..0000000000 --- a/packages/noco-docs/docs/110.automation/010.overview.md +++ /dev/null @@ -1,3 +0,0 @@ ---- -title: 'Automation overview' ---- \ No newline at end of file diff --git a/packages/noco-docs/docs/110.automation/020.webhook/010.webhook-overview.md b/packages/noco-docs/docs/110.automation/020.webhook/010.webhook-overview.md index f8070d7eaa..60be5af822 100644 --- a/packages/noco-docs/docs/110.automation/020.webhook/010.webhook-overview.md +++ b/packages/noco-docs/docs/110.automation/020.webhook/010.webhook-overview.md @@ -1,3 +1,12 @@ --- title: 'Webhook overview' --- + +You can employ webhooks to notify external systems whenever there are additions, updates, or removals of rows within NocoDB. This feature allows you to receive instantaneous notifications for any changes made to your database. NocoDB also offers webhooks for bulk endpoints for creating, updating, or deleting multiple records simultaneously. + +Note that, Webhooks currently are specific for associated table. + +- [Create Webhook](create-webhook) +- [Modify Webhook](actions-on-webhook) +- [Delete Webhook](delete-webhook) + diff --git a/packages/noco-docs/docs/110.automation/020.webhook/020.create-webhook.md b/packages/noco-docs/docs/110.automation/020.webhook/020.create-webhook.md index 10613c7197..7300f5013a 100644 --- a/packages/noco-docs/docs/110.automation/020.webhook/020.create-webhook.md +++ b/packages/noco-docs/docs/110.automation/020.webhook/020.create-webhook.md @@ -1,3 +1,261 @@ --- title: 'Create webhook' --- + +## Create Webhook + +### Accessing Webhook + +1. Click on table for which webhook needs to be configured on the left sidebar +2. Open `Details` tab in topbar, +3. Click on `Webhooks` tab +4. Click `Add New Webhook` + +![Accessing webhook](/img/v2/webhook/create-webhook-1.png) + +### Configuring webhook + +1. Webhook Name: Name of the webhook +2. Event: Select the event for which webhook needs to be triggered + +| Trigger | Details | +|-------------------|-------------------------------------| +| After Insert | After a single record is inserted | +| After Update | After a single record is updated | +| After Delete | After a single record is deleted | +| After Bulk Insert | After bulk records are inserted | +| After Bulk Update | After bulk records are updated | +| After Bulk Delete | After bulk records are deleted | + +3. Method & URL: Configure the endpoint to which webhook needs to be triggered. Supported methods are GET, POST, DELETE, PUT, HEAD, PATCH + +4. [Optional] Headers & Parameters: Configure Request headers & parameters (if any) + +5. [Optional] Condition: Only records meeting the criteria will trigger webhook + +6. [Optional] Test: Test webhook (with sample payload) to verify if parameter are configured appropriately + +7. Save: Save the webhook + +![Configuring webhook](/img/v2/webhook/create-webhook-2.png) + +### Webhook Response Sample + + + + +```bash +{ + "type": "records.after.insert", + "id": "9dac1c54-b3be-49a1-a676-af388145fa8c", + "data": { + "table_id": "md_xzru7dcqrecc60", + "table_name": "Film", + "view_id": "vw_736wrpoas7tr0c", + "view_name": "Film", + "rows": [ + { + "FilmId": 1011, + "Title": "FOO", + "Language": { + "LanguageId": 1, + "Name": "English" + }, + } + ] + } +} +``` + + + + +```bash +{ + "type": "records.after.update", + "id": "6a6ebfe4-b0b5-434e-b5d6-5212adbf82fa", + "data": { + "table_id": "md_xzru7dcqrecc60", + "table_name": "Film", + "view_id": "vw_736wrpoas7tr0c", + "view_name": "Film", + "previous_rows": [ + { + "FilmId": 1, + "Title": "ACADEMY DINOSAUR", + "Description": "A Epic Drama of a Feminist in The Canadian Rockies", + "Actor List": [ + { + "ActorId": 10, + "FirstName": "CHRISTIAN" + } + ], + } + ], + "rows": [ + { + "FilmId": 1, + "Title": "ACADEMY DINOSAUR (Edited)", + "Actor List": [ + { + "ActorId": 10, + "FirstName": "CHRISTIAN" + } + ], + } + ] + } +} +``` + + + + +```bash +{ + "type": "records.after.delete", + "id": "e593079f-70e5-4965-8944-5ff7aeed005c", + "data": { + "table_id": "md_xzru7dcqrecc60", + "table_name": "Film", + "view_id": "vw_736wrpoas7tr0c", + "view_name": "Film", + "rows": [ + { + "FilmId": 1010, + "Title": "ALL-EDITED", + "Language": { + "LanguageId": 1, + "Name": "English" + }, + } + ] + } +} +``` + + + + +``` +{ + "type": "records.after.bulkInsert", + "id": "f8397b06-a399-4a3a-b6b0-6d1c0c2f7578", + "data": { + "table_id": "md_xzru7dcqrecc60", + "table_name": "Film", + "view_id": "vw_3fq2e9q8drkblw", + "view_name": "GridView", + "rows_inserted": 2 + } +} +``` + + + + +``` +{ + "type": "records.after.bulkUpdate", + "id": "e983cea5-8e38-438e-96a0-048751f6830b", + "data": { + "table_id": "md_xzru7dcqrecc60", + "table_name": "Film", + "view_id": "vw_3fq2e9q8drkblw", + "view_name": "Sheet-1", + "previous_rows": [ + [ + { + "FilmId": 1005, + "Title": "Q", + "Language": { + "LanguageId": 1, + "Name": "English" + }, + }, + { + "FilmId": 1004, + "Title": "P", + "Language": { + "LanguageId": 1, + "Name": "English" + } + } + ] + ], + "rows": [ + [ + { + "FilmId": 1005, + "Title": "Q-EDITED", + "Language": { + "LanguageId": 1, + "Name": "English" + } + }, + { + "FilmId": 1004, + "Title": "P-EDITED", + "Language": { + "LanguageId": 1, + "Name": "English" + }, + } + ] + ] + } +} +``` + + + + +``` +{ + "type": "records.after.bulkDelete", + "id": "e7f1f4e5-7052-4ca2-9355-241ceb836f43", + "data": { + "table_id": "md_xzru7dcqrecc60", + "table_name": "Film", + "view_id": "vw_3fq2e9q8drkblw", + "view_name": "Sheet-1", + "rows": [ + [ + { + "FilmId": 1022, + "Title": "x", + "Language": { + "LanguageId": 1, + "Name": "English" + }, + }, + { + "FilmId": 1023, + "Title": "x", + "Language": { + "LanguageId": 1, + "Name": "English" + }, + } + ] + ] + } +} +``` + + +> + + + +## Call Log + +Call Log allows user to check the call history of the hook. By default, it has been disabled. However, it can be configured by using environment variable `NC_AUTOMATION_LOG_LEVEL`. + +- `NC_AUTOMATION_LOG_LEVEL=OFF`: No logs will be displayed and no history will be inserted to meta database. +- `NC_AUTOMATION_LOG_LEVEL=ERROR`: only error logs will be displayed and history of error logs will be inserted to meta database. +- `NC_AUTOMATION_LOG_LEVEL=ALL`: Both error and success logs will be displayed and history of both types of logs will be inserted to meta database. **This option is only available for Enterprise Edition.** + +![image](https://user-images.githubusercontent.com/35857179/228790148-1e3f21c7-9385-413a-843f-b93073ca6bea.png) + + diff --git a/packages/noco-docs/docs/110.automation/020.webhook/030.delete-webhook.md b/packages/noco-docs/docs/110.automation/020.webhook/030.delete-webhook.md deleted file mode 100644 index 8906e15b44..0000000000 --- a/packages/noco-docs/docs/110.automation/020.webhook/030.delete-webhook.md +++ /dev/null @@ -1,3 +0,0 @@ ---- -title: 'Delete webhook' ---- diff --git a/packages/noco-docs/docs/110.automation/020.webhook/040.actions-on-webhook.md b/packages/noco-docs/docs/110.automation/020.webhook/040.actions-on-webhook.md index 86dfe2ee20..49ae43beaa 100644 --- a/packages/noco-docs/docs/110.automation/020.webhook/040.actions-on-webhook.md +++ b/packages/noco-docs/docs/110.automation/020.webhook/040.actions-on-webhook.md @@ -1,3 +1,35 @@ --- title: 'Actions on webhook' --- + +### Enable/Disable Webhook + +To disable a Webhook +- Open `Webhook` tab to find list of webhooks created +- Toggle `Activate` button to enable/disable + +![Screenshot 2023-09-01 at 3 59 28 PM](https://github.com/nocodb/nocodb/assets/86527202/c62cca12-6164-46a8-87e5-179d28c989b6) + + +### Delete Webhook + +To delete a Webhook +- Open `Webhook` tab to find list of webhooks created +- Click on `...` actions button associated with the webhook to be deleted +- Select `Delete` + +![Screenshot 2023-09-01 at 4 01 46 PM](https://github.com/nocodb/nocodb/assets/86527202/23a8aec1-ba29-4be4-8143-f3c94198a88c) + + +### Duplicate Webhook + +To duplicate a Webhook +- Open `Webhook` tab to find list of webhooks created +- Click on `...` actions button associated with the webhook to be duplicate +- Select `Duplicate` + +![Screenshot 2023-09-01 at 4 01 46 PM](https://github.com/nocodb/nocodb/assets/86527202/23a8aec1-ba29-4be4-8143-f3c94198a88c) + +A copy of the webhook will be created (disabled by default) with a suffix ` - Copy` + + diff --git a/packages/noco-docs/static/img/v2/webhook/create-webhook-1.png b/packages/noco-docs/static/img/v2/webhook/create-webhook-1.png new file mode 100644 index 0000000000..0c6d91a2bd Binary files /dev/null and b/packages/noco-docs/static/img/v2/webhook/create-webhook-1.png differ diff --git a/packages/noco-docs/static/img/v2/webhook/create-webhook-2.png b/packages/noco-docs/static/img/v2/webhook/create-webhook-2.png new file mode 100644 index 0000000000..149e580f6f Binary files /dev/null and b/packages/noco-docs/static/img/v2/webhook/create-webhook-2.png differ