diff --git a/docs/src/content/docs/reference/components/zeplin.md b/docs/src/content/docs/reference/components/zeplin.md
index c61261c2497..c1793ec5b28 100644
--- a/docs/src/content/docs/reference/components/zeplin.md
+++ b/docs/src/content/docs/reference/components/zeplin.md
@@ -42,6 +42,37 @@ Version: 1
## Triggers
+### Project Note
+Triggers when new note is created, deleted or updated in specified project.
+
+#### Type: DYNAMIC_WEBHOOK
+#### Properties
+
+| Name | Type | Control Type | Description |
+|:--------------:|:------------:|:--------------------:|:-------------------:|
+| Project | STRING | SELECT | |
+
+
+### Output
+
+
+
+Type: OBJECT
+
+
+#### Properties
+
+| Type | Control Type |
+|:------------:|:--------------------:|
+| {STRING\(id), STRING\(type), {STRING\(id), STRING\(status), [{STRING\(id), {STRING\(id), STRING\(email), STRING\(username)}\(author), STRING\(content)}]\(comments)}\(data)} | OBJECT_BUILDER |
+| STRING | TEXT |
+| STRING | TEXT |
+
+
+
+
+
+
diff --git a/server/libs/modules/components/zeplin/src/main/java/com/bytechef/component/zeplin/ZeplinComponentHandler.java b/server/libs/modules/components/zeplin/src/main/java/com/bytechef/component/zeplin/ZeplinComponentHandler.java
index 04d0e66bf7f..781afe39f29 100644
--- a/server/libs/modules/components/zeplin/src/main/java/com/bytechef/component/zeplin/ZeplinComponentHandler.java
+++ b/server/libs/modules/components/zeplin/src/main/java/com/bytechef/component/zeplin/ZeplinComponentHandler.java
@@ -16,15 +16,20 @@
package com.bytechef.component.zeplin;
+import static com.bytechef.component.zeplin.constant.ZeplinConstants.PROJECT_ID;
+
import com.bytechef.component.OpenApiComponentHandler;
import com.bytechef.component.definition.ActionDefinition;
import com.bytechef.component.definition.ComponentCategory;
import com.bytechef.component.definition.ComponentDsl.ModifiableComponentDefinition;
import com.bytechef.component.definition.ComponentDsl.ModifiableProperty;
import com.bytechef.component.definition.ComponentDsl.ModifiableStringProperty;
+import com.bytechef.component.definition.ComponentDsl.ModifiableTriggerDefinition;
import com.bytechef.component.definition.OptionsDataSource.ActionOptionsFunction;
+import com.bytechef.component.zeplin.trigger.ZeplinProjectNoteTrigger;
import com.bytechef.component.zeplin.util.ZeplinUtils;
import com.google.auto.service.AutoService;
+import java.util.List;
import java.util.Objects;
/**
@@ -33,6 +38,11 @@
@AutoService(OpenApiComponentHandler.class)
public class ZeplinComponentHandler extends AbstractZeplinComponentHandler {
+ @Override
+ public List getTriggers() {
+ return List.of(ZeplinProjectNoteTrigger.TRIGGER_DEFINITION);
+ }
+
@Override
public ModifiableComponentDefinition modifyComponent(ModifiableComponentDefinition modifiableComponentDefinition) {
return modifiableComponentDefinition
@@ -45,7 +55,7 @@ public ModifiableComponentDefinition modifyComponent(ModifiableComponentDefiniti
public ModifiableProperty> modifyProperty(
ActionDefinition actionDefinition, ModifiableProperty> modifiableProperty) {
- if (Objects.equals(modifiableProperty.getName(), "project_id")) {
+ if (Objects.equals(modifiableProperty.getName(), PROJECT_ID)) {
((ModifiableStringProperty) modifiableProperty)
.options((ActionOptionsFunction) ZeplinUtils::getProjectIdOptions);
}
diff --git a/server/libs/modules/components/zeplin/src/main/java/com/bytechef/component/zeplin/constant/ZeplinConstants.java b/server/libs/modules/components/zeplin/src/main/java/com/bytechef/component/zeplin/constant/ZeplinConstants.java
new file mode 100644
index 00000000000..b9b2800eb0e
--- /dev/null
+++ b/server/libs/modules/components/zeplin/src/main/java/com/bytechef/component/zeplin/constant/ZeplinConstants.java
@@ -0,0 +1,29 @@
+/*
+ * Copyright 2023-present ByteChef Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.bytechef.component.zeplin.constant;
+
+/**
+ * @author Monika Kušter
+ */
+public class ZeplinConstants {
+
+ private ZeplinConstants() {
+ }
+
+ public static final String ID = "id";
+ public static final String PROJECT_ID = "project_id";
+}
diff --git a/server/libs/modules/components/zeplin/src/main/java/com/bytechef/component/zeplin/trigger/ZeplinProjectNoteTrigger.java b/server/libs/modules/components/zeplin/src/main/java/com/bytechef/component/zeplin/trigger/ZeplinProjectNoteTrigger.java
new file mode 100644
index 00000000000..d6e26f261c4
--- /dev/null
+++ b/server/libs/modules/components/zeplin/src/main/java/com/bytechef/component/zeplin/trigger/ZeplinProjectNoteTrigger.java
@@ -0,0 +1,133 @@
+/*
+ * Copyright 2023-present ByteChef Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.bytechef.component.zeplin.trigger;
+
+import static com.bytechef.component.definition.ComponentDsl.ModifiableTriggerDefinition;
+import static com.bytechef.component.definition.ComponentDsl.array;
+import static com.bytechef.component.definition.ComponentDsl.object;
+import static com.bytechef.component.definition.ComponentDsl.outputSchema;
+import static com.bytechef.component.definition.ComponentDsl.string;
+import static com.bytechef.component.definition.ComponentDsl.trigger;
+import static com.bytechef.component.zeplin.constant.ZeplinConstants.ID;
+import static com.bytechef.component.zeplin.constant.ZeplinConstants.PROJECT_ID;
+
+import com.bytechef.component.definition.Context.Http;
+import com.bytechef.component.definition.OptionsDataSource.TriggerOptionsFunction;
+import com.bytechef.component.definition.Parameters;
+import com.bytechef.component.definition.TriggerContext;
+import com.bytechef.component.definition.TriggerDefinition.HttpHeaders;
+import com.bytechef.component.definition.TriggerDefinition.HttpParameters;
+import com.bytechef.component.definition.TriggerDefinition.TriggerType;
+import com.bytechef.component.definition.TriggerDefinition.WebhookBody;
+import com.bytechef.component.definition.TriggerDefinition.WebhookEnableOutput;
+import com.bytechef.component.definition.TriggerDefinition.WebhookMethod;
+import com.bytechef.component.definition.TriggerDefinition.WebhookValidateResponse;
+import com.bytechef.component.definition.TypeReference;
+import com.bytechef.component.zeplin.util.ZeplinUtils;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+
+/**
+ * @author Monika Kušter
+ */
+public class ZeplinProjectNoteTrigger {
+
+ public static final ModifiableTriggerDefinition TRIGGER_DEFINITION = trigger("projectNote")
+ .title("Project Note")
+ .description("Triggers when new note is created, deleted or updated in specified project.")
+ .properties(
+ string(PROJECT_ID)
+ .label("Project")
+ .options((TriggerOptionsFunction) ZeplinUtils::getProjectIdOptions)
+ .required(true))
+ .type(TriggerType.DYNAMIC_WEBHOOK)
+ .output(
+ outputSchema(
+ object()
+ .properties(
+ object("context")
+ .properties(
+ string(ID),
+ string("type"),
+ object("data")
+ .properties(
+ string(ID),
+ string("status"),
+ array("comments")
+ .items(
+ object()
+ .properties(
+ string(ID),
+ object("author")
+ .properties(
+ string(ID),
+ string("email"),
+ string("username")),
+ string("content"))))),
+ string("action"),
+ string("event"))))
+ .webhookEnable(ZeplinProjectNoteTrigger::webhookEnable)
+ .webhookDisable(ZeplinProjectNoteTrigger::webhookDisable)
+ .webhookRequest(ZeplinProjectNoteTrigger::webhookRequest)
+ .webhookValidateOnEnable(ZeplinProjectNoteTrigger::webhookValidate);
+
+ private ZeplinProjectNoteTrigger() {
+ }
+
+ public static WebhookValidateResponse webhookValidate(
+ Parameters inputParameters, HttpHeaders headers, HttpParameters parameters, WebhookBody body,
+ WebhookMethod method, TriggerContext context) {
+
+ return new WebhookValidateResponse(204);
+ }
+
+ protected static WebhookEnableOutput webhookEnable(
+ Parameters inputParameters, Parameters connectionParameters, String webhookUrl,
+ String workflowExecutionId, TriggerContext triggerContext) {
+
+ Map body = triggerContext
+ .http(http -> http.post("/projects/" + inputParameters.getRequiredString(PROJECT_ID) + "/webhooks"))
+ .body(Http.Body.of(
+ "url", webhookUrl,
+ "secret", UUID.randomUUID(),
+ "events", List.of("project.note")))
+ .configuration(Http.responseType(Http.ResponseType.JSON))
+ .execute()
+ .getBody(new TypeReference<>() {});
+
+ return new WebhookEnableOutput(Map.of(ID, body.get(ID)), null);
+ }
+
+ protected static void webhookDisable(
+ Parameters inputParameters, Parameters connectionParameters, Parameters outputParameters,
+ String workflowExecutionId, TriggerContext triggerContext) {
+
+ triggerContext.http(http -> http
+ .delete("/projects/" + inputParameters.getRequiredString(PROJECT_ID) + "/webhooks/"
+ + outputParameters.getRequiredString(ID)))
+ .configuration(Http.responseType(Http.ResponseType.JSON))
+ .execute();
+ }
+
+ protected static Object webhookRequest(
+ Parameters inputParameters, Parameters connectionParameters, HttpHeaders headers, HttpParameters parameters,
+ WebhookBody body, WebhookMethod method, WebhookEnableOutput output, TriggerContext triggerContext) {
+
+ return body.getContent();
+ }
+}
diff --git a/server/libs/modules/components/zeplin/src/main/java/com/bytechef/component/zeplin/util/ZeplinUtils.java b/server/libs/modules/components/zeplin/src/main/java/com/bytechef/component/zeplin/util/ZeplinUtils.java
index 28fa6783f8d..e4fd3560f5b 100644
--- a/server/libs/modules/components/zeplin/src/main/java/com/bytechef/component/zeplin/util/ZeplinUtils.java
+++ b/server/libs/modules/components/zeplin/src/main/java/com/bytechef/component/zeplin/util/ZeplinUtils.java
@@ -17,6 +17,7 @@
package com.bytechef.component.zeplin.util;
import static com.bytechef.component.definition.ComponentDsl.option;
+import static com.bytechef.component.zeplin.constant.ZeplinConstants.ID;
import com.bytechef.component.definition.Context;
import com.bytechef.component.definition.Context.Http;
@@ -48,7 +49,7 @@ public static List