diff --git a/Gitea auto AI Groq.json b/Gitea auto AI Groq.json new file mode 100644 index 0000000..70dfe91 --- /dev/null +++ b/Gitea auto AI Groq.json @@ -0,0 +1 @@ +{"createdAt":"2024-03-25T13:03:37.504Z","updatedAt":"2024-06-18T13:48:07.270Z","id":"0idgEKY5p1q5WS9F","name":"Gitea auto AI Groq","active":true,"nodes":[{"parameters":{"model":"llama3-70b-8192","options":{"maxTokensToSample":4096},"requestOptions":{}},"id":"3c89da25-c3b5-4c0c-b82d-1b908c20a455","name":"Groq Chat Model","type":"@n8n/n8n-nodes-langchain.lmChatGroq","typeVersion":1,"position":[940,400],"credentials":{"groqApi":{"id":"u4SobGEjjuXQixeQ","name":"Groq account"}}},{"parameters":{"command":"rm -rf /tmp/repo"},"id":"40c1fc75-6aec-4bd2-8056-af814e02af60","name":"Execute Command","type":"n8n-nodes-base.executeCommand","typeVersion":1,"position":[40,-160],"notesInFlow":true,"notes":"Suppression /tmp/repo "},{"parameters":{"authentication":"gitPassword","operation":"clone","repositoryPath":"/tmp/repo","sourceRepository":"={{$node[\"Webhook\"].json[\"body\"][\"repository\"][\"html_url\"]}}"},"id":"42558044-243a-49a8-b247-e2fb13d3e828","name":"Git","type":"n8n-nodes-base.git","typeVersion":1,"position":[240,-160],"alwaysOutputData":true,"notesInFlow":true,"credentials":{"gitPassword":{"id":"7JHhvGSTGUGgQb6S","name":"gitea.ia86.cc account"}},"onError":"continueRegularOutput","notes":"Clonage repo dans /tmp/repo"},{"parameters":{"command":"ls /tmp/repo"},"id":"40130976-207a-474b-8817-bbbe6b90272e","name":"Execute Command1","type":"n8n-nodes-base.executeCommand","typeVersion":1,"position":[1280,-240],"alwaysOutputData":true,"notesInFlow":true,"notes":"Lister fichiers Git"},{"parameters":{"options":{"reset":false}},"id":"c942acf6-6861-4563-868e-704b9e6ffd0b","name":"Loop Over Items","type":"n8n-nodes-base.splitInBatches","typeVersion":3,"position":[140,120],"notesInFlow":true,"notes":"Traite fichier par fichier"},{"parameters":{"fileSelector":"=/tmp/repo/{{$json[\"fileName\"]}}","options":{}},"id":"076ba28c-951b-40fc-b8e5-b057f0c2f610","name":"Read/Write Files from Disk","type":"n8n-nodes-base.readWriteFile","typeVersion":1,"position":[360,200],"notesInFlow":true,"notes":"Lit le fichier"},{"parameters":{"conditions":{"options":{"caseSensitive":true,"leftValue":"","typeValidation":"strict"},"conditions":[{"id":"1b92e512-49fc-47c9-a93e-b80bc1d48f3b","leftValue":"={{ $items(\"Set2\")[0].json.filtre }}","rightValue":"=.{{ $json[\"fileExtension\"] }}|","operator":{"type":"string","operation":"contains"}}],"combinator":"and"},"options":{}},"id":"cedf5e54-d0dd-42bc-bdfe-736789d061c5","name":"If","type":"n8n-nodes-base.if","typeVersion":2,"position":[560,200],"notesInFlow":true,"notes":"Extension à traiter ?"},{"parameters":{"fromEmail":"nico@ia86.cc","toEmail":"={{$node[\"Webhook\"].json[\"body\"][\"commits\"][0][\"author\"][\"email\"]}}","subject":"[IA-Gitea] Code introspection","html":"=

Consigne

\n{{ $items(\"Set2\")[0].json.consigne }}\n

Filtre

\n{{ $items(\"Set2\")[0].json.filtre }}\n

Résultat

\n{{ $node[\"Set\"].json[\"concatenatedResults\"] }}\n","options":{"replyTo":"noreply@n8n.ia86.cc"}},"id":"18637207-8730-4db8-bc96-0d661ae5078e","name":"Send Email","type":"n8n-nodes-base.emailSend","typeVersion":2.1,"position":[560,40],"notesInFlow":true,"credentials":{"smtp":{"id":"d4ZAN48vF9GTpVON","name":"SMTP account"}},"notes":"Courriel avec Variable"},{"parameters":{"httpMethod":"POST","path":"ac8544e6-b735-43c9-9d7b-dfa201f36008","options":{}},"id":"dafe642f-c21d-4b26-a17e-d93aae1320d6","name":"Webhook","type":"n8n-nodes-base.webhook","typeVersion":1.1,"position":[-160,-160],"webhookId":"ac8544e6-b735-43c9-9d7b-dfa201f36008","notesInFlow":true,"notes":"Webhook Gitea sur commit "},{"parameters":{"conditions":{"options":{"caseSensitive":true,"leftValue":"","typeValidation":"strict"},"conditions":[{"id":"e182d1f3-0b86-4a38-951e-4eac8bfd025c","leftValue":"={{$node[\"Webhook\"].json[\"body\"][\"commits\"][0][\"message\"]}}","rightValue":"@inspectALL","operator":{"type":"string","operation":"contains"}}],"combinator":"and"},"options":{}},"id":"6395bddc-6989-4bfa-8a92-8847a3c75ad4","name":"If1","type":"n8n-nodes-base.if","typeVersion":2,"position":[1040,-160],"notesInFlow":true,"notes":"commit msg =~ @inspectALL"},{"parameters":{"command":"=cd /tmp/repo && git diff-tree --no-commit-id --name-only {{$node[\"Webhook\"].json[\"body\"][\"commits\"][0][\"id\"] }} -r"},"id":"d09ec861-52d6-4ccf-9e64-c5f53b439563","name":"Execute Command2","type":"n8n-nodes-base.executeCommand","typeVersion":1,"position":[1280,-80],"alwaysOutputData":true,"notesInFlow":true,"notes":"Lister fichiers Git modifiés"},{"parameters":{"jsCode":"const previousResults = $items(\"Set\")[0].json.concatenatedResults;\n\nconst currentResult = $json[\"text\"];\n\nconst updatedResults = previousResults + \"

\" + $items(\"Code1\")[0].json.filename + \"

\" + currentResult + \"
\";\n\nreturn [\n {\n json: {\n concatenatedResults: updatedResults\n }\n }\n];"},"id":"0b4d3c64-ab4d-45d2-abd6-b314cc9bc666","name":"Code2","type":"n8n-nodes-base.code","typeVersion":2,"position":[1280,200],"notesInFlow":true,"notes":"Concatène résultat Variable"},{"parameters":{"assignments":{"assignments":[{"id":"085cb216-3d10-4001-b426-671666827470","name":"consigne","value":"={{ $json[\"consigne\"] }}","type":"string"},{"id":"ce95566b-edbd-4da2-8325-f3426dce8dd8","name":"filtre","value":"={{ $json[\"filtre\"] }}","type":"string"}]},"options":{}},"id":"d0b0731e-6d47-4eb9-b7aa-a761406dd0fc","name":"Set2","type":"n8n-nodes-base.set","typeVersion":3.3,"position":[840,-160],"notesInFlow":true,"notes":"Consigne à \"\""},{"parameters":{"fileSelector":"/tmp/repo/.iacicd","options":{"dataPropertyName":"consigne"}},"id":"1779d890-0446-49f4-a1af-9cc57e8b8d95","name":"Read/Write Files from Disk1","type":"n8n-nodes-base.readWriteFile","typeVersion":1,"position":[440,-160],"notesInFlow":true,"alwaysOutputData":true,"onError":"continueRegularOutput","notes":"Lit le fichier ~/.iacicd"},{"parameters":{"jsCode":"const fileList = $json[\"stdout\"].split('\\n').filter(file => file !== '');\nreturn fileList.map(file => ({ json: { fileName: file } }));"},"id":"d2900ffd-edd6-4d36-930d-41814cd3f39c","name":"Code","type":"n8n-nodes-base.code","typeVersion":2,"position":[1460,-160],"notesInFlow":true,"notes":"Conversion liste fichier JSON"},{"parameters":{"jsCode":"let binaryDataBufferItem = await this.helpers.getBinaryDataBuffer(0, 'data');\nvar data = binaryDataBufferItem.toString('utf8')\n\nreturn {\"data\": data, \"filename\" : $json[\"fileName\"] };"},"id":"e916fa11-85e7-40be-bd16-72552c7a56e4","name":"Code1","type":"n8n-nodes-base.code","typeVersion":2,"position":[760,200],"notesInFlow":true,"notes":"Transforme en JSON"},{"parameters":{"jsCode":"let binaryDataBufferItem;\nlet data;\nlet consigne;\nlet filtre;\n\ntry {\n binaryDataBufferItem = await this.helpers.getBinaryDataBuffer(0, 'consigne');\n data = binaryDataBufferItem.toString('utf8');\n\n // Parse the YAML content manually (simple implementation)\n const lines = data.split('\\n');\n const parsedContent = {};\n\n lines.forEach(line => {\n const [key, value] = line.split(':').map(item => item.trim());\n if (key && value !== undefined) {\n parsedContent[key] = value;\n }\n });\n\n // Extract the parameters \"consigne\" and \"filtre\"\n consigne = parsedContent.consigne;\n filtre = parsedContent.filtre;\n\n return {\n json: {\n consigne: consigne,\n filtre: filtre,\n }\n };\n} catch (error) {\n return {\n json: {\n consigne: \"Analyze the following program file writed in C language. Make a summary with severals sections for 'Objectif du code', 'Sécurite du code', 'Optimisation du code' and 'Erreurs dans le code'. Max 250 words in French for each section given before. Format the resulting document in HTML format and begin with the h3 for the sections. Use table and rich HTML content if needed to ensure best document quality. No return to line but br tag or table\",\n filtre: \".c|.h|\" // or a default value for filtre if needed\n }\n };\n}"},"id":"b37f8eee-caa7-4623-8011-5e041d414bd8","name":"Code3","type":"n8n-nodes-base.code","typeVersion":2,"position":[640,-160],"notesInFlow":true,"notes":"Consigne vers JSON ou défaut"},{"parameters":{"jsCode":" return {\n json: {\n concatenatedResults: \"\"\n }\n };"},"id":"b4b24a16-4c87-41a4-9d11-bf4f0a3a0e63","name":"Code4","type":"n8n-nodes-base.code","typeVersion":2,"position":[1660,-200],"notesInFlow":true,"notes":"Entête courriel"},{"parameters":{"conditions":{"options":{"caseSensitive":true,"leftValue":"","typeValidation":"strict"},"conditions":[{"id":"6233a192-63ca-4478-b89e-21c580889d91","leftValue":"={{$json[\"concatenatedResults\"]}}","rightValue":"","operator":{"type":"string","operation":"empty","singleValue":true}}],"combinator":"and"},"options":{}},"id":"fd9cf22c-a68e-44e3-a16c-72172340f03c","name":"If2","type":"n8n-nodes-base.if","typeVersion":2,"position":[1640,200]},{"parameters":{"assignments":{"assignments":[{"id":"7b1033bd-f129-479d-952e-9971cf9bc59b","name":"concatenatedResults","value":"={{$json[\"concatenatedResults\"]}}","type":"string"}]},"options":{}},"id":"d1c75bdf-8270-4ef0-879b-2eb318b113bb","name":"Set","type":"n8n-nodes-base.set","typeVersion":3.3,"position":[1460,200],"notesInFlow":true,"notes":"Mise à jour Variable"},{"parameters":{"keep":"lastItems"},"id":"a481165e-9ed1-4679-af23-13696071b738","name":"Limit","type":"n8n-nodes-base.limit","typeVersion":1,"position":[360,40]},{"parameters":{"promptType":"define","text":"={{ $items(\"Set2\")[0].json.consigne }}\nThe informations to treat begins after the ::: chars\nName of the file to inspect: {{ $json[\"filename\"] }} \n:::{{ $json[\"data\"] }}"},"id":"bd126cea-54d8-4842-b981-3daeb9b532be","name":"Basic LLM Chain","type":"@n8n/n8n-nodes-langchain.chainLlm","typeVersion":1.4,"position":[940,200],"notesInFlow":true,"notes":"Traitement par IA Groq"}],"connections":{"Groq Chat Model":{"ai_languageModel":[[{"node":"Basic LLM Chain","type":"ai_languageModel","index":0}]]},"Execute Command":{"main":[[{"node":"Git","type":"main","index":0}]]},"Git":{"main":[[{"node":"Read/Write Files from Disk1","type":"main","index":0}]]},"Execute Command1":{"main":[[{"node":"Code","type":"main","index":0}]]},"Loop Over Items":{"main":[[{"node":"Limit","type":"main","index":0}],[{"node":"Read/Write Files from Disk","type":"main","index":0}]]},"Read/Write Files from Disk":{"main":[[{"node":"If","type":"main","index":0}]]},"If":{"main":[[{"node":"Code1","type":"main","index":0}],[{"node":"Loop Over Items","type":"main","index":0}]]},"Webhook":{"main":[[{"node":"Execute Command","type":"main","index":0}]]},"If1":{"main":[[{"node":"Execute Command1","type":"main","index":0}],[{"node":"Execute Command2","type":"main","index":0}]]},"Execute Command2":{"main":[[{"node":"Code","type":"main","index":0}]]},"Code2":{"main":[[{"node":"Set","type":"main","index":0}]]},"Set2":{"main":[[{"node":"If1","type":"main","index":0}]]},"Read/Write Files from Disk1":{"main":[[{"node":"Code3","type":"main","index":0}]]},"Code1":{"main":[[{"node":"Basic LLM Chain","type":"main","index":0}]]},"Code3":{"main":[[{"node":"Set2","type":"main","index":0}]]},"Code4":{"main":[[{"node":"Set","type":"main","index":0}]]},"If2":{"main":[[],[{"node":"Loop Over Items","type":"main","index":0}]]},"Set":{"main":[[{"node":"If2","type":"main","index":0}]]},"Limit":{"main":[[{"node":"Send Email","type":"main","index":0}]]},"Code":{"main":[[{"node":"Code4","type":"main","index":0},{"node":"Loop Over Items","type":"main","index":0}]]},"Basic LLM Chain":{"main":[[{"node":"Code2","type":"main","index":0}]]}},"settings":{"executionOrder":"v1"},"staticData":null,"meta":{"templateCredsSetupCompleted":true},"pinData":{},"versionId":"93b45180-0ae3-4d94-a045-50411a974460","triggerCount":1,"tags":[{"createdAt":"2024-06-14T12:54:42.473Z","updatedAt":"2024-06-14T12:54:42.473Z","id":"j3NvJA0nPKgvNQmu","name":"gitea"},{"createdAt":"2024-06-14T12:54:50.649Z","updatedAt":"2024-06-14T12:54:50.649Z","id":"3C6S1rdGCEOm4Q8g","name":"mail"}]} \ No newline at end of file diff --git a/Huggin Face tests.json b/Huggin Face tests.json new file mode 100644 index 0000000..304bbda --- /dev/null +++ b/Huggin Face tests.json @@ -0,0 +1 @@ +{"createdAt":"2024-06-17T21:23:09.730Z","updatedAt":"2024-06-18T13:47:51.218Z","id":"WaXdrLRNT2zrG54T","name":"Huggin Face tests","active":false,"nodes":[{"parameters":{"model":"2Noise/ChatTTS","options":{},"requestOptions":{}},"id":"43bd4531-9cc1-40d5-b139-fdf704cedf4e","name":"Hugging Face Inference Model","type":"@n8n/n8n-nodes-langchain.lmOpenHuggingFaceInference","typeVersion":1,"position":[880,400],"credentials":{"huggingFaceApi":{"id":"sG1DWgbq7Q3simy5","name":"HuggingFaceApi account"}}},{"parameters":{},"id":"3815c898-cb62-4558-94a4-abdbcd9c8aca","name":"When chat message received","type":"@n8n/n8n-nodes-langchain.chatTrigger","typeVersion":1,"position":[660,180],"webhookId":"d75b5ef0-5024-4d2d-83fd-e563875d73f0"},{"parameters":{"promptType":"define","text":"={{ $json.chatInput }}"},"id":"0e8d9d11-e953-44d2-bcb6-82948225045e","name":"Question and Answer Chain","type":"@n8n/n8n-nodes-langchain.chainRetrievalQa","typeVersion":1.3,"position":[860,180]},{"parameters":{"requestOptions":{}},"id":"b9201477-f231-4084-aa55-9b307ad92273","name":"Vector Store Retriever","type":"@n8n/n8n-nodes-langchain.retrieverVectorStore","typeVersion":1,"position":[1060,400]},{"parameters":{},"id":"b92bc47c-38b6-4bee-b524-b09279780e00","name":"In-Memory Vector Store","type":"@n8n/n8n-nodes-langchain.vectorStoreInMemory","typeVersion":1,"position":[1080,600]},{"parameters":{"options":{},"requestOptions":{}},"id":"ee92afe3-954b-4270-bf84-ec9fdb4aee0d","name":"Embeddings HuggingFace Inference","type":"@n8n/n8n-nodes-langchain.embeddingsHuggingFaceInference","typeVersion":1,"position":[1080,740],"credentials":{"huggingFaceApi":{"id":"sG1DWgbq7Q3simy5","name":"HuggingFaceApi account"}}}],"connections":{"When chat message received":{"main":[[{"node":"Question and Answer Chain","type":"main","index":0}]]},"Hugging Face Inference Model":{"ai_languageModel":[[{"node":"Question and Answer Chain","type":"ai_languageModel","index":0}]]},"Vector Store Retriever":{"ai_retriever":[[{"node":"Question and Answer Chain","type":"ai_retriever","index":0}]]},"In-Memory Vector Store":{"ai_vectorStore":[[{"node":"Vector Store Retriever","type":"ai_vectorStore","index":0}]]},"Embeddings HuggingFace Inference":{"ai_embedding":[[{"node":"In-Memory Vector Store","type":"ai_embedding","index":0}]]}},"settings":{"executionOrder":"v1"},"staticData":null,"meta":{"templateCredsSetupCompleted":true},"pinData":{},"versionId":"9de19cc9-1b15-4a0e-811e-c3c09e6a8665","triggerCount":0,"tags":[]} \ No newline at end of file diff --git a/LinkedIn publication prepare.json b/LinkedIn publication prepare.json new file mode 100644 index 0000000..aaedf3a --- /dev/null +++ b/LinkedIn publication prepare.json @@ -0,0 +1 @@ +{"createdAt":"2024-06-18T13:46:16.623Z","updatedAt":"2024-06-19T12:47:24.898Z","id":"dGYcvZCeFm5cqc14","name":"LinkedIn publication prepare","active":true,"nodes":[{"parameters":{"model":"llama3-70b-8192","options":{"maxTokensToSample":2048},"requestOptions":{}},"id":"e79f7e68-5e26-48d5-8982-fc254344aae7","name":"Groq Chat Model","type":"@n8n/n8n-nodes-langchain.lmChatGroq","typeVersion":1,"position":[-120,440],"notesInFlow":true,"credentials":{"groqApi":{"id":"u4SobGEjjuXQixeQ","name":"Groq account"}},"notes":"IA Groq"},{"parameters":{"operation":"create","docId":"pfyRAyDpaei1RyyPQYUqLV","tableId":"Table1","fieldsToSend":{"properties":[{"fieldId":"Sujet","fieldValue":"={{ $node[\"Webhook\"].json[\"query\"][\"subject\"] }}"},{"fieldId":"Contenu","fieldValue":"={{ $node[\"LLM\"].json[\"text\"] }}"},{"fieldId":"Date_soumission","fieldValue":"={{ $node[\"DateTime\"].json[\"currentDate\"] }}"},{"fieldId":"LinkedIn","fieldValue":"En attente"},{"fieldId":"Image","fieldValue":"={{ $node[\"Webhook\"].json[\"query\"][\"image\"] }}"},{"fieldId":"Facebook","fieldValue":"En attente"},{"fieldId":"Twitter","fieldValue":"En attente"},{"fieldId":"Twitt","fieldValue":"={{ $node[\"Summarization\"].json[\"response\"][\"text\"] }}"}]}},"id":"ba7eca73-bade-4b0c-8de1-8ee1a16b6d97","name":"Grist","type":"n8n-nodes-base.grist","typeVersion":1,"position":[480,240],"notesInFlow":true,"credentials":{"gristApi":{"id":"FP4qhcxgUb7jbXcL","name":"Grist account"}},"notes":"Enregistrement article"},{"parameters":{"options":{}},"id":"3043a137-a0e0-488b-ac9c-00e9874badd0","name":"DateTime","type":"n8n-nodes-base.dateTime","typeVersion":2,"position":[300,240],"notesInFlow":true,"notes":"Récupération date actuelle"},{"parameters":{"httpMethod":"POST","path":"cff0c7ed-2701-47ea-85da-faa88a9ddccc","options":{}},"id":"72e8420d-2d6c-4b9f-ba07-030382e8a052","name":"Webhook","type":"n8n-nodes-base.webhook","typeVersion":2,"position":[-500,240],"webhookId":"cff0c7ed-2701-47ea-85da-faa88a9ddccc","notesInFlow":true,"notes":"Déclenchement formulaire"},{"parameters":{"promptType":"define","text":"=Write an article on “{{ $json[\"query\"][\"subject\"] }}” in French. You can use technical words and content because article is intended to be read by information and technology professionals. First introduce with 200 characters with the description of the technology. Then write 100 characters with his history with some dates and important changes. After, on 250 characters on good points on using this and domain where it’s very efficient. With 250 more characters, insist on bad points on using this. Compare this with others and be precise on the added value of this. And finally conclude with other things not aborded previously. Close the article with a hook phrase to induct other readers to add comments, be creative. Add emoji at the beginning of each paragraph in correlation with the thematic aborded on it. Add a global title in English. It must contain the name of the subject and from 3 to 10 words and begin it with musical score emoji 🎼 and end it with musical notes emoji 🎶. Don't add markdown or HTML formating or characters under titles. Add 3 hashtags writed in uppercase at the bottom of the article with the most significatives words used."},"id":"81691874-ac33-4fff-bb27-065abff8b0fd","name":"LLM","type":"@n8n/n8n-nodes-langchain.chainLlm","typeVersion":1.4,"position":[-340,240],"notesInFlow":true,"notes":"Rédaction article"},{"parameters":{"chunkingMode":"advanced","options":{"summarizationMethodAndPrompts":{"values":{"summarizationMethod":"stuff","prompt":"Write a concise summary in french of only 200 characters without specifying this is a summary. Add emoji at beginning and end of the text. Place a link to the official website.\n\n\n\"{text}\""}}}},"id":"c2e83432-0d26-4d1d-a0b2-b11126cfa2ea","name":"Summarization","type":"@n8n/n8n-nodes-langchain.chainSummarization","typeVersion":2,"position":[-20,240]}],"connections":{"Groq Chat Model":{"ai_languageModel":[[{"node":"LLM","type":"ai_languageModel","index":0},{"node":"Summarization","type":"ai_languageModel","index":0}]]},"Webhook":{"main":[[{"node":"LLM","type":"main","index":0}]]},"LLM":{"main":[[{"node":"Summarization","type":"main","index":0}]]},"DateTime":{"main":[[{"node":"Grist","type":"main","index":0}]]},"Summarization":{"main":[[{"node":"DateTime","type":"main","index":0}]]}},"settings":{"executionOrder":"v1"},"staticData":{"node:Schedule Trigger":{"recurrencyRules":[]}},"meta":{"templateCredsSetupCompleted":true},"pinData":{},"versionId":"7851feda-c179-4bd8-8729-dc832ebde230","triggerCount":1,"tags":[]} \ No newline at end of file diff --git a/LinkedIn publication submit.json b/LinkedIn publication submit.json new file mode 100644 index 0000000..11ccaf5 --- /dev/null +++ b/LinkedIn publication submit.json @@ -0,0 +1 @@ +{"createdAt":"2024-06-15T20:20:30.174Z","updatedAt":"2024-06-19T12:21:53.809Z","id":"K5H7fF45v9GzQ8Aq","name":"LinkedIn publication submit","active":true,"nodes":[{"parameters":{"rule":{"interval":[{"field":"cronExpression","expression":"45 12 * * 1-6"}]}},"id":"3cd7b4a7-e40a-4dc0-9f7f-374705650d48","name":"Schedule Trigger","type":"n8n-nodes-base.scheduleTrigger","typeVersion":1.2,"position":[-800,660],"notesInFlow":true,"notes":"Déclenche tout les jours 12h45"},{"parameters":{"docId":"pfyRAyDpaei1RyyPQYUqLV","tableId":"Table1","limit":1,"additionalOptions":{"filter":{"filterProperties":[{"field":"LinkedIn","values":"En attente"}]},"sort":{"sortProperties":[{"field":"Date_soumission"}]}}},"id":"a958a90b-315e-4792-a227-f79079fa3a04","name":"GristSearch","type":"n8n-nodes-base.grist","typeVersion":1,"position":[-600,660],"notesInFlow":true,"credentials":{"gristApi":{"id":"FP4qhcxgUb7jbXcL","name":"Grist account"}},"notes":"Recupère articles préparés IA"},{"parameters":{"operation":"update","docId":"pfyRAyDpaei1RyyPQYUqLV","tableId":"Table1","rowId":"={{ $node[\"GristSearch\"].json[\"id\"] }}","fieldsToSend":{"properties":[{"fieldId":"Date_publication_LinkedIn","fieldValue":"={{ $node[\"DateTime\"].json[\"currentDate\"] }}"},{"fieldId":"LinkedIn","fieldValue":"Publié"}]}},"id":"e6ad36ca-3625-46df-a3c4-c3f27f7a5e7c","name":"GristUpdate","type":"n8n-nodes-base.grist","typeVersion":1,"position":[60,660],"notesInFlow":true,"credentials":{"gristApi":{"id":"FP4qhcxgUb7jbXcL","name":"Grist account"}},"notes":"Mettre à jour Sheet"},{"parameters":{"options":{}},"id":"9110a4ea-cb44-4cef-bf71-c505dfccf4cf","name":"DateTime","type":"n8n-nodes-base.dateTime","typeVersion":2,"position":[-420,660],"notesInFlow":true,"notes":"Récupère heure actuelle"},{"parameters":{"person":"aHGv3fiUeq","text":"={{ $node[\"GristSearch\"].json[\"Contenu\"] }}","shareMediaCategory":"IMAGE","additionalFields":{"title":"={{ $node[\"GristSearch\"].json[\"Sujet\"] }}","visibility":"PUBLIC"}},"id":"09a459e2-75d1-4dbd-9a86-a7dbc5fb19d3","name":"LinkedIn","type":"n8n-nodes-base.linkedIn","typeVersion":1,"position":[-100,660],"notesInFlow":true,"credentials":{"linkedInOAuth2Api":{"id":"MPgQTFhMIBnazvCU","name":"LinkedIn account"}},"notes":"Poster article"},{"parameters":{"fromEmail":"nico@ia86.cc","toEmail":"nicolas@palon.fr","subject":"=[LinkedIn - AUTO] Publication {{ $json.id }}: {{ $('GristSearch').item.json.Sujet }}","html":"=

Article {{ $json.id }}: {{ $('GristSearch').item.json.Sujet }}

\n

Informations

\nDate de publication: {{ $node[\"DateTime\"].json[\"currentDate\"] }}\n

Contenu

\n{{ $('GristSearch').item.json.Contenu }} \n{{ $('GristSearch').item.json.Image }} ","options":{}},"id":"679b497a-97bf-464c-a503-c5e511bab3eb","name":"Send Email","type":"n8n-nodes-base.emailSend","typeVersion":2.1,"position":[220,660],"notesInFlow":true,"credentials":{"smtp":{"id":"d4ZAN48vF9GTpVON","name":"SMTP account"}},"notes":"Notification courriel"},{"parameters":{"url":"={{ $node[\"GristSearch\"].json[\"Image\"] }}","options":{"allowUnauthorizedCerts":true,"redirect":{"redirect":{}},"response":{"response":{"responseFormat":"file"}}}},"id":"cbc49358-334c-4ec0-af63-5ae93ed9f473","name":"HTTP","type":"n8n-nodes-base.httpRequest","typeVersion":4.2,"position":[-260,660],"notesInFlow":true,"notes":"Récupération de l'image"}],"connections":{"Schedule Trigger":{"main":[[{"node":"GristSearch","type":"main","index":0}]]},"GristSearch":{"main":[[{"node":"DateTime","type":"main","index":0}]]},"GristUpdate":{"main":[[{"node":"Send Email","type":"main","index":0}]]},"DateTime":{"main":[[{"node":"HTTP","type":"main","index":0}]]},"LinkedIn":{"main":[[{"node":"GristUpdate","type":"main","index":0}]]},"HTTP":{"main":[[{"node":"LinkedIn","type":"main","index":0}]]}},"settings":{"executionOrder":"v1","timezone":"Europe/Paris","saveManualExecutions":true,"callerPolicy":"workflowsFromSameOwner"},"staticData":{"node:Schedule Trigger":{"recurrencyRules":[]}},"meta":{"templateCredsSetupCompleted":true},"pinData":{},"versionId":"39518f49-6859-4810-b7e3-57e3cbf6d818","triggerCount":1,"tags":[]} \ No newline at end of file diff --git a/README.md b/README.md index e69de29..8330e90 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,8 @@ +# Sauvegarde + +Gitea auto AI Groq.json +Huggin Face tests.json +LinkedIn publication prepare.json +LinkedIn publication submit.json +Sauvegarde Gitea.json +Twitter publication submit.json diff --git a/Sauvegarde Gitea.json b/Sauvegarde Gitea.json new file mode 100644 index 0000000..0090325 --- /dev/null +++ b/Sauvegarde Gitea.json @@ -0,0 +1 @@ +{"createdAt":"2024-06-19T17:53:31.033Z","updatedAt":"2024-06-19T19:58:04.631Z","id":"kZvM4K7vwhKvtIkw","name":"Sauvegarde Gitea","active":false,"nodes":[{"parameters":{"rule":{"interval":[{}]}},"id":"99853d4c-6cd9-4632-b2e7-8477b61a927e","name":"Schedule Trigger","type":"n8n-nodes-base.scheduleTrigger","typeVersion":1.2,"position":[-1040,140]},{"parameters":{"filters":{},"requestOptions":{}},"id":"53eab512-36c6-4b94-90d4-01ea91065bcb","name":"n8n","type":"n8n-nodes-base.n8n","typeVersion":1,"position":[-840,220],"credentials":{"n8nApi":{"id":"LPFILq2KSvbWK8vk","name":"n8n account"}}},{"parameters":{"operation":"toJson","mode":"each","options":{"fileName":"={{ $json.name }}"}},"id":"8640e0b6-dc5a-45d2-8fab-6d2713e4b896","name":"Convert to File","type":"n8n-nodes-base.convertToFile","typeVersion":1.1,"position":[-660,220]},{"parameters":{"operation":"write","fileName":"=/tmp/comp/{{ $binary.data.fileName }}.json","options":{}},"id":"d1908c71-5bfe-43fc-a109-7dc79bd844b4","name":"Read/Write Files from Disk","type":"n8n-nodes-base.readWriteFile","typeVersion":1,"position":[-480,220]},{"parameters":{"command":"mkdir -p /tmp/comp && rm -rf /tmp/repo /tmp/comp/* "},"id":"5645af60-d3af-459d-9e3f-32429ff63b4e","name":"Execute Command1","type":"n8n-nodes-base.executeCommand","typeVersion":1,"position":[-840,60]},{"parameters":{"authentication":"gitPassword","operation":"clone","repositoryPath":"/tmp/repo","sourceRepository":"https://gitea.ia86.cc/perso/n8n-sauvegarde"},"id":"df61e886-fc5c-4f04-ac03-325c3534c22a","name":"Git","type":"n8n-nodes-base.git","typeVersion":1,"position":[-480,60],"credentials":{"gitPassword":{"id":"7JHhvGSTGUGgQb6S","name":"gitea.ia86.cc account"}}},{"parameters":{"mode":"chooseBranch","output":"empty"},"id":"7da55c97-6b1e-425b-ad42-9221e2db8869","name":"Merge","type":"n8n-nodes-base.merge","typeVersion":2.1,"position":[-300,140]},{"parameters":{"command":"cp /tmp/comp/* /tmp/repo && cd /tmp/repo && echo -en \"# Sauvegarde\\n\\n\" > ./README.md && ls *.json >> ./README.md && cat ./README.md"},"id":"0b343682-5b1e-423a-ae0f-50910c9f5729","name":"Execute Command","type":"n8n-nodes-base.executeCommand","typeVersion":1,"position":[-140,140]},{"parameters":{"operation":"status","repositoryPath":"/tmp/repo"},"id":"08ff2375-45f6-4d20-8e27-c1cc3743f0a0","name":"Git1","type":"n8n-nodes-base.git","typeVersion":1,"position":[40,140]},{"parameters":{"operation":"add","repositoryPath":"/tmp/repo","pathsToAdd":"*"},"id":"f3efec1e-b45a-40b6-b233-2fbee5170890","name":"Git2","type":"n8n-nodes-base.git","typeVersion":1,"position":[360,440]},{"parameters":{"aggregate":"aggregateAllItemData","options":{}},"id":"08ea4b96-dbb7-4e67-9c83-5e9413b886f4","name":"Aggregate","type":"n8n-nodes-base.aggregate","typeVersion":1,"position":[460,160]},{"parameters":{"errorMessage":"ERREUR DANS GIT"},"id":"f87a3c10-0adf-4004-8bf9-455305556c36","name":"Stop and Error","type":"n8n-nodes-base.stopAndError","typeVersion":1,"position":[460,20]},{"parameters":{"rules":{"values":[{"conditions":{"options":{"caseSensitive":true,"leftValue":"","typeValidation":"strict"},"conditions":[{"leftValue":"={{ $json.not_added.length }}","rightValue":0,"operator":{"type":"number","operation":"gt"}}],"combinator":"and"},"renameOutput":true,"outputKey":"not_added"},{"conditions":{"options":{"caseSensitive":true,"leftValue":"","typeValidation":"strict"},"conditions":[{"id":"ce17ff24-9901-4413-b722-5af58c23ae75","leftValue":"={{ $json.conflicted.length }}","rightValue":0,"operator":{"type":"number","operation":"gt"}}],"combinator":"and"},"renameOutput":true,"outputKey":"conflicted"},{"conditions":{"options":{"caseSensitive":true,"leftValue":"","typeValidation":"strict"},"conditions":[{"id":"007665fd-3964-405b-a211-8b5cf45fca1c","leftValue":"={{ $json.created.length }}","rightValue":0,"operator":{"type":"number","operation":"gt"}}],"combinator":"and"},"renameOutput":true,"outputKey":"created"},{"conditions":{"options":{"caseSensitive":true,"leftValue":"","typeValidation":"strict"},"conditions":[{"id":"4eb5a697-cf77-4962-a9d3-c016ec13ca61","leftValue":"={{ $json.deleted.length }}","rightValue":0,"operator":{"type":"number","operation":"gt"}}],"combinator":"and"},"renameOutput":true,"outputKey":"deleted"},{"conditions":{"options":{"caseSensitive":true,"leftValue":"","typeValidation":"strict"},"conditions":[{"id":"e567e8c9-98df-463b-9df4-deffcab85d8a","leftValue":"={{ $json.modified.length }}","rightValue":0,"operator":{"type":"number","operation":"gt"}}],"combinator":"and"},"renameOutput":true,"outputKey":"modifled"},{"conditions":{"options":{"caseSensitive":true,"leftValue":"","typeValidation":"strict"},"conditions":[{"id":"75f6edd0-8245-4cae-815c-b394776c6258","leftValue":"={{ $json.renamed.length }}","rightValue":0,"operator":{"type":"number","operation":"gt"}}],"combinator":"and"},"renameOutput":true,"outputKey":"renamed"}]},"options":{}},"id":"1134c729-2994-4230-ab71-e24fb094c550","name":"Switch","type":"n8n-nodes-base.switch","typeVersion":3,"position":[220,120]},{"parameters":{"operation":"commit","repositoryPath":"/tmp/repo","message":"=auto: {{ $json.currentDate }}","options":{}},"id":"d08883f3-bb02-469e-bb68-b123e6048413","name":"Git3","type":"n8n-nodes-base.git","typeVersion":1,"position":[780,160]},{"parameters":{"operation":"status","repositoryPath":"/tmp/repo"},"id":"fc6cf06a-5ac9-4bb2-a058-5f7744c2a2af","name":"Git4","type":"n8n-nodes-base.git","typeVersion":1,"position":[940,160]},{"parameters":{"conditions":{"options":{"caseSensitive":true,"leftValue":"","typeValidation":"strict"},"conditions":[{"id":"f62f6c9f-3ef3-4b85-bfca-ae123526cbcc","leftValue":"={{ $json.ahead }}","rightValue":1,"operator":{"type":"number","operation":"equals"}}],"combinator":"and"},"options":{}},"id":"e2bb2b3c-93ea-4475-9b10-3c65dc464464","name":"If","type":"n8n-nodes-base.if","typeVersion":2,"position":[1100,160]},{"parameters":{"operation":"push","repositoryPath":"/tmp/repo","options":{}},"id":"84745a3f-a552-47cd-a671-6f9bb8e12565","name":"Git5","type":"n8n-nodes-base.git","typeVersion":1,"position":[1260,40]},{"parameters":{},"id":"8b718e16-64e2-4c47-a5ce-ec09bf60ac4d","name":"No Operation, do nothing","type":"n8n-nodes-base.noOp","typeVersion":1,"position":[1260,280]},{"parameters":{"fromEmail":"nico@ia86.cc","toEmail":"nicolas@palon.fr","subject":"[N8N-SAVE] ","html":"={{ $('DateTime').item.json.currentDate }}","options":{}},"id":"e9a821a8-0018-4363-93c9-6f2251de3bec","name":"Send Email","type":"n8n-nodes-base.emailSend","typeVersion":2.1,"position":[1740,40],"credentials":{"smtp":{"id":"d4ZAN48vF9GTpVON","name":"SMTP account"}}},{"parameters":{"options":{}},"id":"1facf71d-e3ea-47bc-b5fd-eb537ff32ebf","name":"DateTime","type":"n8n-nodes-base.dateTime","typeVersion":2,"position":[620,160]}],"connections":{"Schedule Trigger":{"main":[[{"node":"Execute Command1","type":"main","index":0},{"node":"n8n","type":"main","index":0}]]},"n8n":{"main":[[{"node":"Convert to File","type":"main","index":0}]]},"Convert to File":{"main":[[{"node":"Read/Write Files from Disk","type":"main","index":0}]]},"Execute Command1":{"main":[[{"node":"Git","type":"main","index":0}]]},"Git":{"main":[[{"node":"Merge","type":"main","index":0}]]},"Read/Write Files from Disk":{"main":[[{"node":"Merge","type":"main","index":1}]]},"Merge":{"main":[[{"node":"Execute Command","type":"main","index":0}]]},"Execute Command":{"main":[[{"node":"Git1","type":"main","index":0}]]},"Git1":{"main":[[{"node":"Switch","type":"main","index":0}]]},"Git2":{"main":[[{"node":"Git1","type":"main","index":0}]]},"Switch":{"main":[[{"node":"Git2","type":"main","index":0}],[{"node":"Stop and Error","type":"main","index":0}],[{"node":"Aggregate","type":"main","index":0}],[{"node":"Aggregate","type":"main","index":0}],[{"node":"Aggregate","type":"main","index":0}],[{"node":"Aggregate","type":"main","index":0}]]},"Aggregate":{"main":[[{"node":"DateTime","type":"main","index":0}]]},"Git3":{"main":[[{"node":"Git4","type":"main","index":0}]]},"Git4":{"main":[[{"node":"If","type":"main","index":0}]]},"If":{"main":[[{"node":"Git5","type":"main","index":0}],[{"node":"No Operation, do nothing","type":"main","index":0}]]},"DateTime":{"main":[[{"node":"Git3","type":"main","index":0}]]},"Git5":{"main":[[]]}},"settings":{"executionOrder":"v1"},"staticData":null,"meta":{"templateCredsSetupCompleted":true},"pinData":{},"versionId":"0f9801e5-0dc5-4e21-97d0-b0be6476bba1","triggerCount":0,"tags":[]} \ No newline at end of file diff --git a/Twitter publication submit.json b/Twitter publication submit.json new file mode 100644 index 0000000..3a4cc50 --- /dev/null +++ b/Twitter publication submit.json @@ -0,0 +1 @@ +{"createdAt":"2024-06-19T11:54:41.835Z","updatedAt":"2024-06-19T13:13:03.459Z","id":"zbKzY2ohQyhp0wxC","name":"Twitter publication submit","active":true,"nodes":[{"parameters":{"rule":{"interval":[{"field":"cronExpression","expression":"45 12 * * 1-6"}]}},"id":"436fd5af-9451-414d-a710-421be651d11d","name":"Schedule Trigger","type":"n8n-nodes-base.scheduleTrigger","typeVersion":1.2,"position":[-800,660],"notesInFlow":true,"notes":"Déclenche tout les jours 12h45"},{"parameters":{"docId":"pfyRAyDpaei1RyyPQYUqLV","tableId":"Table1","limit":1,"additionalOptions":{"filter":{"filterProperties":[{"field":"Twitter","values":"En attente"}]},"sort":{"sortProperties":[{"field":"Date_soumission"}]}}},"id":"f10c25d0-b004-433b-b1bc-5295a86f4215","name":"GristSearch","type":"n8n-nodes-base.grist","typeVersion":1,"position":[-440,660],"notesInFlow":true,"credentials":{"gristApi":{"id":"FP4qhcxgUb7jbXcL","name":"Grist account"}},"notes":"Recupère articles préparés IA"},{"parameters":{"operation":"update","docId":"pfyRAyDpaei1RyyPQYUqLV","tableId":"Table1","rowId":"={{ $node[\"GristSearch\"].json[\"id\"] }}","fieldsToSend":{"properties":[{"fieldId":"Date_publication_Twitter","fieldValue":"={{ $node[\"DateTime\"].json[\"currentDate\"] }}"},{"fieldId":"Twitter","fieldValue":"Publié"}]}},"id":"0e7eff31-aa6e-4626-bac5-85e2e00e6f23","name":"GristUpdate","type":"n8n-nodes-base.grist","typeVersion":1,"position":[280,660],"notesInFlow":true,"credentials":{"gristApi":{"id":"FP4qhcxgUb7jbXcL","name":"Grist account"}},"notes":"Mettre à jour Sheet"},{"parameters":{"options":{}},"id":"31813f58-ece9-4582-85fe-3f76fe83db9c","name":"DateTime","type":"n8n-nodes-base.dateTime","typeVersion":2,"position":[-620,660],"notesInFlow":true,"notes":"Récupère heure actuelle"},{"parameters":{"fromEmail":"nico@ia86.cc","toEmail":"nicolas@palon.fr","subject":"=[Twitter - AUTO] Publication {{ $json.id }}: {{ $('GristSearch').item.json.Sujet }}","html":"=

Article {{ $json.id }}: {{ $('GristSearch').item.json.Sujet }}

\n

Informations

\nDate de publication: {{ $node[\"DateTime\"].json[\"currentDate\"] }}\n

Contenu

\n{{ $('GristSearch').item.json.Twitt }} ","options":{}},"id":"1ba85ef6-5436-4d21-84fe-4ed264448983","name":"Send Email","type":"n8n-nodes-base.emailSend","typeVersion":2.1,"position":[440,660],"notesInFlow":true,"credentials":{"smtp":{"id":"d4ZAN48vF9GTpVON","name":"SMTP account"}},"notes":"Notification courriel"},{"parameters":{"text":"={{ $node[\"GristSearch\"].json[\"Twitt\"] }}","additionalFields":{}},"id":"255599f6-3662-4537-99d5-b2f5aa52e661","name":"X","type":"n8n-nodes-base.twitter","typeVersion":2,"position":[-80,660],"credentials":{"twitterOAuth2Api":{"id":"8YpX1E0OKTFb7Odm","name":"X account"}}}],"connections":{"Schedule Trigger":{"main":[[{"node":"DateTime","type":"main","index":0}]]},"GristUpdate":{"main":[[{"node":"Send Email","type":"main","index":0}]]},"DateTime":{"main":[[{"node":"GristSearch","type":"main","index":0}]]},"X":{"main":[[{"node":"GristUpdate","type":"main","index":0}]]},"GristSearch":{"main":[[{"node":"X","type":"main","index":0}]]}},"settings":{"executionOrder":"v1","timezone":"Europe/Paris","saveManualExecutions":true,"callerPolicy":"workflowsFromSameOwner"},"staticData":{"node:Schedule Trigger":{"recurrencyRules":[]}},"meta":{"templateCredsSetupCompleted":true},"pinData":{},"versionId":"b6aa2dea-da83-4244-a24a-0d8b4bb1399f","triggerCount":1,"tags":[]} \ No newline at end of file