Let's use AI to Earn!
TypeScript auto-publishdouyindouyin-apielectron-appelectron-reactkuaishoukwaipublishedshipinhaotoolxiaohongshu
feat: 上传工作流
Nevin5dc5ec223b9c
diff --git a/aitoearn_web/workflow/dify/AiToEarn.yml b/aitoearn_web/workflow/dify/AiToEarn.ymlnew file mode 100644index 00000000..7795236e--- /dev/null+++ b/aitoearn_web/workflow/dify/AiToEarn.yml@@ -0,0 +1,472 @@+app:+ description: ''+ icon: 🤖+ icon_background: '#FFEAD5'+ mode: workflow+ name: AiToEarn+ use_icon_as_answer_icon: false+dependencies: []+kind: app+version: 0.3.1+workflow:+ conversation_variables: []+ environment_variables: []+ features:+ file_upload:+ allowed_file_extensions:+ - .JPG+ - .JPEG+ - .PNG+ - .GIF+ - .WEBP+ - .SVG+ allowed_file_types:+ - image+ allowed_file_upload_methods:+ - local_file+ - remote_url+ enabled: false+ fileUploadConfig:+ audio_file_size_limit: 50+ batch_count_limit: 5+ file_size_limit: 15+ image_file_size_limit: 10+ video_file_size_limit: 100+ workflow_file_upload_limit: 10+ image:+ enabled: false+ number_limits: 3+ transfer_methods:+ - local_file+ - remote_url+ number_limits: 3+ opening_statement: ''+ retriever_resource:+ enabled: true+ sensitive_word_avoidance:+ enabled: false+ speech_to_text:+ enabled: false+ suggested_questions: []+ suggested_questions_after_answer:+ enabled: false+ text_to_speech:+ enabled: false+ language: ''+ voice: ''+ graph:+ edges:+ - data:+ isInIteration: false+ isInLoop: false+ sourceType: start+ targetType: http-request+ id: 1753251949465-source-1753252240600-target+ selected: false+ source: '1753251949465'+ sourceHandle: source+ target: '1753252240600'+ targetHandle: target+ type: custom+ zIndex: 0+ - data:+ isInIteration: false+ isInLoop: false+ sourceType: http-request+ targetType: code+ id: 1753252240600--1753260717190-target+ selected: false+ source: '1753252240600'+ sourceHandle: source+ target: '1753260717190'+ targetHandle: target+ type: custom+ zIndex: 0+ - data:+ isInIteration: false+ isInLoop: false+ sourceType: code+ targetType: iteration+ id: 1753260717190-source-1753261055086-target+ selected: false+ source: '1753260717190'+ sourceHandle: source+ target: '1753261055086'+ targetHandle: target+ type: custom+ zIndex: 0+ - data:+ isInIteration: false+ isInLoop: false+ sourceType: iteration+ targetType: end+ id: 1753261055086--1753261099620-target+ selected: false+ source: '1753261055086'+ sourceHandle: source+ target: '1753261099620'+ targetHandle: target+ type: custom+ zIndex: 0+ - data:+ isInIteration: true+ isInLoop: false+ iteration_id: '1753261055086'+ sourceType: iteration-start+ targetType: code+ id: 1753261055086start-source-1753265292456-target+ selected: false+ source: 1753261055086start+ sourceHandle: source+ target: '1753265292456'+ targetHandle: target+ type: custom+ zIndex: 1002+ - data:+ isInIteration: true+ isInLoop: false+ iteration_id: '1753261055086'+ sourceType: code+ targetType: http-request+ id: 1753265292456-source-1753271866402-target+ selected: false+ source: '1753265292456'+ sourceHandle: source+ target: '1753271866402'+ targetHandle: target+ type: custom+ zIndex: 1002+ nodes:+ - data:+ desc: ''+ selected: false+ title: 开始+ type: start+ variables:+ - label: skKey+ max_length: 48+ options: []+ required: true+ type: text-input+ variable: skKey+ - label: title+ max_length: 48+ options: []+ required: true+ type: text-input+ variable: title+ - label: desc+ max_length: 48+ options: []+ required: true+ type: text-input+ variable: desc+ - label: type+ max_length: 48+ options:+ - video+ - article+ required: true+ type: select+ variable: type+ - label: videoUrl+ max_length: 200+ options: []+ required: false+ type: text-input+ variable: videoUrl+ - label: coverUrl+ max_length: 200+ options: []+ required: true+ type: text-input+ variable: coverUrl+ - label: imgUrlList+ max_length: 2000+ options: []+ required: false+ type: paragraph+ variable: imgUrlList+ - label: publishTime+ max_length: 48+ options: []+ required: true+ type: text-input+ variable: publishTime+ - label: topics+ max_length: 200+ options: []+ required: true+ type: paragraph+ variable: topics+ height: 297+ id: '1753251949465'+ position:+ x: 53.902873672086+ y: 261+ positionAbsolute:+ x: 53.902873672086+ y: 261+ selected: false+ sourcePosition: right+ targetPosition: left+ type: custom+ width: 243+ - data:+ authorization:+ config: null+ type: no-auth+ body:+ data: []+ type: none+ desc: ''+ headers: sk-key:{{#1753251949465.skKey#}}+ method: GET+ params: ''+ retry_config:+ max_retries: 3+ retry_enabled: true+ retry_interval: 100+ selected: false+ ssl_verify: true+ timeout:+ max_connect_timeout: 0+ max_read_timeout: 0+ max_write_timeout: 0+ title: 获取账号列表+ type: http-request+ url: https://mcp.dev.aitoearn.ai/plugin/account/list+ variables: []+ height: 138+ id: '1753252240600'+ position:+ x: 333+ y: 261+ positionAbsolute:+ x: 333+ y: 261+ selected: false+ sourcePosition: right+ targetPosition: left+ type: custom+ width: 243+ - data:+ code: "\nfunction main({body}) {\n return {\n accountList: JSON.parse(body).data\n\+ \ }\n}\n"+ code_language: javascript+ desc: ''+ outputs:+ accountList:+ children: null+ type: array[object]+ selected: false+ title: Prase account list+ type: code+ variables:+ - value_selector:+ - '1753252240600'+ - body+ value_type: string+ variable: body+ height: 53+ id: '1753260717190'+ position:+ x: 636+ y: 261+ positionAbsolute:+ x: 636+ y: 261+ selected: false+ sourcePosition: right+ targetPosition: left+ type: custom+ width: 243+ - data:+ desc: ''+ error_handle_mode: terminated+ height: 395+ is_parallel: false+ iterator_input_type: array[object]+ iterator_selector:+ - '1753260717190'+ - accountList+ output_selector:+ - '1753265292456'+ - accountId+ output_type: array[string]+ parallel_nums: 10+ selected: false+ start_node_id: 1753261055086start+ title: 迭代+ type: iteration+ width: 837+ height: 395+ id: '1753261055086'+ position:+ x: 47.58759541415145+ y: 689.3383964907954+ positionAbsolute:+ x: 47.58759541415145+ y: 689.3383964907954+ selected: false+ sourcePosition: right+ targetPosition: left+ type: custom+ width: 837+ zIndex: 1+ - data:+ desc: ''+ isInIteration: true+ selected: false+ title: ''+ type: iteration-start+ draggable: false+ height: 48+ id: 1753261055086start+ parentId: '1753261055086'+ position:+ x: 24+ y: 68+ positionAbsolute:+ x: 71.58759541415145+ y: 757.3383964907954+ selectable: false+ sourcePosition: right+ targetPosition: left+ type: custom-iteration-start+ width: 44+ zIndex: 1002+ - data:+ desc: ''+ outputs:+ - value_selector: []+ variable: resList+ selected: false+ title: 结束+ type: end+ height: 53+ id: '1753261099620'+ position:+ x: 66.51967325118926+ y: 1262.8998713904966+ positionAbsolute:+ x: 66.51967325118926+ y: 1262.8998713904966+ selected: false+ sourcePosition: right+ targetPosition: left+ type: custom+ width: 243+ - data:+ code: "\nfunction main({item}) {\n return {\n accountId: item.accountId\n\+ \ }\n}\n"+ code_language: javascript+ desc: ''+ isInIteration: true+ isInLoop: false+ iteration_id: '1753261055086'+ outputs:+ accountId:+ children: null+ type: string+ selected: false+ title: get accountId+ type: code+ variables:+ - value_selector:+ - '1753261055086'+ - item+ value_type: object+ variable: item+ height: 53+ id: '1753265292456'+ parentId: '1753261055086'+ position:+ x: 251.58798044054197+ y: 103.49056320376275+ positionAbsolute:+ x: 299.1755758546934+ y: 792.8289596945581+ selected: false+ sourcePosition: right+ targetPosition: left+ type: custom+ width: 243+ zIndex: 1002+ - data:+ authorization:+ config: null+ type: no-auth+ body:+ data:+ - id: key-value-1562+ key: ''+ type: text+ value: '{"flowId":{{#sys.workflow_run_id#}},"accountId":{{#1753265292456.accountId#}},"type":{{#1753251949465.type#}},"title":{{#1753251949465.title#}},"desc":{{#1753251949465.desc#}},"videoUrl":{{#1753251949465.videoUrl#}},"coverUrl":{{#1753251949465.coverUrl#}},"imgUrlList:{{#1753251949465.imgUrlList#}},"publishTime":{{#1753251949465.publishTime#}},"topics":{{#1753251949465.topics#}}}'+ type: json+ desc: ''+ headers: sk-key:{{#1753251949465.skKey#}}+ isInIteration: true+ isInLoop: false+ iteration_id: '1753261055086'+ method: post+ params: ''+ retry_config:+ max_retries: 3+ retry_enabled: true+ retry_interval: 100+ selected: true+ ssl_verify: true+ timeout:+ max_connect_timeout: 0+ max_read_timeout: 0+ max_write_timeout: 0+ title: Publish+ type: http-request+ url: https://mcp.dev.aitoearn.cn/plugin/publish/create+ variables: []+ height: 138+ id: '1753271866402'+ parentId: '1753261055086'+ position:+ x: 577.476406804605+ y: 88.92520097208643+ positionAbsolute:+ x: 625.0640022187564+ y: 778.2635974628818+ selected: true+ sourcePosition: right+ targetPosition: left+ type: custom+ width: 243+ zIndex: 1002+ - data:+ author: [email protected]+ desc: ''+ height: 240+ selected: false+ showAuthor: true+ text: '{"root":{"children":[{"children":[{"detail":0,"format":0,"mode":"normal","style":"","text":"imgUrlList+ --- Example :“http://www.xxx.com/xxx/1.png,http://www.xx.com/xx/2.png“","type":"text","version":1}],"direction":"ltr","format":"","indent":0,"type":"paragraph","version":1,"textFormat":0,"textStyle":""},{"children":[{"detail":0,"format":0,"mode":"normal","style":"","text":"topics+ --- Example: \"beauty makeup,Sports\"","type":"text","version":1}],"direction":"ltr","format":"","indent":0,"type":"paragraph","version":1,"textFormat":0,"textStyle":""}],"direction":"ltr","format":"","indent":0,"type":"root","version":1}}'+ theme: blue+ title: ''+ type: ''+ width: 286+ height: 240+ id: '1753337888305'+ position:+ x: -264.8939416724749+ y: 360.0832884811733+ positionAbsolute:+ x: -264.8939416724749+ y: 360.0832884811733+ selected: false+ sourcePosition: right+ targetPosition: left+ type: custom-note+ width: 286+ viewport:+ x: 468.0160911666835+ y: -37.194002857965074+ zoom: 0.7284416135218681diff --git a/aitoearn_web/workflow/n8n/publish.json b/aitoearn_web/workflow/n8n/publish.jsonnew file mode 100644index 00000000..8550a46f--- /dev/null+++ b/aitoearn_web/workflow/n8n/publish.json@@ -0,0 +1,226 @@+{+ "name": "publish",+ "nodes": [+ {+ "parameters": {+ "formTitle": "publish",+ "formFields": {+ "values": [+ {+ "fieldLabel": "skKey",+ "requiredField": true+ },+ {+ "fieldLabel": "title",+ "requiredField": true+ },+ {+ "fieldLabel": "desc",+ "requiredField": true+ },+ {+ "fieldLabel": "type",+ "fieldType": "dropdown",+ "fieldOptions": {+ "values": [+ {+ "option": "video"+ },+ {+ "option": "article"+ }+ ]+ },+ "requiredField": true+ },+ {+ "fieldLabel": "coverUrl",+ "requiredField": true+ },+ {+ "fieldLabel": "videoUrl"+ },+ {+ "fieldLabel": "imgUrlList"+ },+ {+ "fieldLabel": "publishTime",+ "fieldType": "date",+ "requiredField": true+ },+ {+ "fieldLabel": "topics"+ }+ ]+ },+ "options": {}+ },+ "type": "n8n-nodes-base.formTrigger",+ "typeVersion": 2.2,+ "position": [+ -464,+ -16+ ],+ "id": "b5fbc2da-dab0-4a87-b576-23fe4cd4a26b",+ "name": "On form submission",+ "webhookId": "e2f4d383-664a-4dc6-b567-2be2a2589077"+ },+ {+ "parameters": {+ "fieldToSplitOut": "data",+ "options": {}+ },+ "type": "n8n-nodes-base.splitOut",+ "typeVersion": 1,+ "position": [+ -48,+ -16+ ],+ "id": "0a5ea742-25e7-44fa-9f39-ae0204fdaa12",+ "name": "Split Out"+ },+ {+ "parameters": {+ "url": "https://mcp.aitoearn.cn/plugin/account/list",+ "sendHeaders": true,+ "headerParameters": {+ "parameters": [+ {+ "name": "sk-key",+ "value": "={{ $json.skKey }}"+ }+ ]+ },+ "options": {}+ },+ "type": "n8n-nodes-base.httpRequest",+ "typeVersion": 4.2,+ "position": [+ -256,+ -16+ ],+ "id": "f3100c99-ea4d-4ce5-85e4-6758511cb96d",+ "name": "get acount list"+ },+ {+ "parameters": {+ "method": "POST",+ "url": "https://mcp.aitoearn.cn/plugin/publish/create",+ "sendHeaders": true,+ "headerParameters": {+ "parameters": [+ {+ "name": "sk-key",+ "value": "={{ $('On form submission').item.json.skKey }}"+ }+ ]+ },+ "sendBody": true,+ "bodyParameters": {+ "parameters": [+ {+ "name": "title",+ "value": "={{ $('On form submission').item.json.title }}"+ },+ {+ "name": "desc",+ "value": "={{ $('On form submission').item.json.desc }}"+ },+ {+ "name": "accountId",+ "value": "={{ $json.accountId }}"+ },+ {+ "name": "type",+ "value": "={{ $('On form submission').item.json.type }}"+ },+ {+ "name": "coverUrl",+ "value": "={{ $('On form submission').item.json.coverUrl }}"+ },+ {+ "name": "videoUrl",+ "value": "={{ $('On form submission').item.json.videoUrl }}"+ },+ {+ "name": "imgUrlList",+ "value": "={{ $('On form submission').item.json.imgUrlList }}"+ },+ {+ "name": "publishTime",+ "value": "={{ $('On form submission').item.json.submittedAt }}"+ },+ {+ "name": "topics",+ "value": "={{ $('On form submission').item.json.topics }}"+ },+ {+ "name": "flowId",+ "value": "={{ $workflow.id }}"+ }+ ]+ },+ "options": {}+ },+ "type": "n8n-nodes-base.httpRequest",+ "typeVersion": 4.2,+ "position": [+ 160,+ -16+ ],+ "id": "0e3f1d94-7822-4c90-85e8-02784709e855",+ "name": "publish"+ }+ ],+ "pinData": {},+ "connections": {+ "On form submission": {+ "main": [+ [+ {+ "node": "get acount list",+ "type": "main",+ "index": 0+ }+ ]+ ]+ },+ "Split Out": {+ "main": [+ [+ {+ "node": "publish",+ "type": "main",+ "index": 0+ }+ ]+ ]+ },+ "get acount list": {+ "main": [+ [+ {+ "node": "Split Out",+ "type": "main",+ "index": 0+ }+ ]+ ]+ },+ "publish": {+ "main": [+ []+ ]+ }+ },+ "active": false,+ "settings": {+ "executionOrder": "v1"+ },+ "versionId": "11829de1-0a34-4aa0-a39e-de808709ca2f",+ "meta": {+ "instanceId": "9376d2247e486793adc31b3d8a30547dab00f241f637b85644b85eba587538ad"+ },+ "id": "UbMSJheX1Rrh2ibe",+ "tags": []+}\ No newline at end of file