feat(workflows): implement workflow duplication feature

- Added functionality to duplicate workflows via a new API endpoint, allowing users to create copies of existing workflows with modified names and owners.
- Introduced utility functions for managing workflow filenames and ensuring unique names for duplicates.
- Created a user interface component for duplicating workflows, including validation for existing files and owner changes.
- Enhanced existing workflows to support the new duplication feature, ensuring seamless integration with the current workflow management system.

This update significantly improves user experience by enabling efficient workflow management and organization.
This commit is contained in:
2026-08-15 23:00:16 +07:00
parent 43e9370638
commit cf4b342e04
15 changed files with 579 additions and 67 deletions
@@ -2,24 +2,23 @@ name: Comic - monkeyuser to ntfy
scripts:
- script: fetch-html.js
config:
url: "https://www.monkeyuser.com/"
outputVar: "httpResponse"
selector: ".comic img"
url: https://www.monkeyuser.com/
outputVar: comic
selector: .comic img
jsonata: |
{"url": "https://www.monkeyuser.com" & [attributes.src][0], "title": [attributes.title][0]}
- script: jsonata.js
config:
expression: |
{
"title": data.httpResponse.title,
"message": data.httpResponse.title,
"attach": data.httpResponse.url
"title": data.comic.title,
"message": data.comic.title,
"attach": data.comic.url
}
- fetch-binary.js
- script: fetch-binary.js
- script: ntfy.js
config:
url: https://ntfy.sh/jerapah-flow
triggers:
- type: HTTP
method: POST
@@ -9,3 +9,4 @@ scripts:
- send-gmail.yaml
- test-send-gmail.yaml
- track.yaml
- rss-devto-to-ntfy.yaml
@@ -0,0 +1,27 @@
name: RSS - selfh.st first item to ntfy (copy)
scripts:
- script: fetch-rss-feed.js
config:
url: https://selfh.st/rss/
outputVar: item
jsonata: items[0]
- script: fingerprint.js
config:
key: selfhst-latest
jsonata: "data.item.guid ? data.item.guid : data.item.link"
- script: jsonata.js
config:
expression: |
{
"title": data.item.title,
"message": data.item.contentSnippet & "\n" & data.item.link,
"attach": data.item.mediaContent.url ? data.item.mediaContent.url : (data.item.mediaContent.$ ? data.item.mediaContent.$.url : undefined)
}
- script: ntfy.js
config:
url: https://n.0dev.web.id/system
triggers:
- type: HTTP
method: POST
path: /selfhst-rss-rss-devto-to-ntfy
enabled: false
@@ -2,7 +2,7 @@ name: RSS - selfh.st first item to ntfy
scripts:
- script: fetch-rss-feed.js
config:
url: "https://selfh.st/rss/"
url: https://selfh.st/rss/
outputVar: item
jsonata: items[0]
- script: fingerprint.js
@@ -19,8 +19,7 @@ scripts:
}
- script: ntfy.js
config:
url: https://ntfy.sh/jerapah-flow
url: https://n.0dev.web.id/system
triggers:
- type: HTTP
method: POST