Preisregel im Brief, Preispruefung in Workflow 2
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
-460,
|
||||
40
|
||||
],
|
||||
"id": "e1787a43-3202-4cb7-8ae3-95c68df72c06",
|
||||
"id": "5ad6950e-a5e9-4d1c-9f45-64e7f40c1345",
|
||||
"name": "Manuell starten"
|
||||
},
|
||||
{
|
||||
@@ -33,7 +33,7 @@
|
||||
-460,
|
||||
200
|
||||
],
|
||||
"id": "905bc58d-522a-492c-bb33-1e67646ea176",
|
||||
"id": "55fa4d8d-8362-4662-b422-5cf03694b4f8",
|
||||
"name": "Zeitplan Montag 07:00",
|
||||
"disabled": true
|
||||
},
|
||||
@@ -50,9 +50,9 @@
|
||||
-460,
|
||||
360
|
||||
],
|
||||
"id": "9397421d-bbda-4219-8083-ea9d9b60d2ae",
|
||||
"id": "675b0a53-a893-40ef-99d6-fafaa8ac0792",
|
||||
"name": "Webhook Start",
|
||||
"webhookId": "e0c767c4-135c-43ff-85b1-3208ccac9064"
|
||||
"webhookId": "2de1c213-4fb5-4e91-8b5c-9ce69ef25ca3"
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
@@ -60,85 +60,85 @@
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "fc40dace-efed-412d-b48d-be620f1219d2",
|
||||
"id": "d43ddbb3-2514-41c6-b888-02abc4e15d41",
|
||||
"name": "nw_base",
|
||||
"value": "https://app.neuronwriter.com/neuron-api/0.5/writer",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"id": "1533065c-b69b-445b-b900-3fcfda2dea32",
|
||||
"id": "bd516db2-6009-4bba-99d2-189750fc1cd2",
|
||||
"name": "nw_project",
|
||||
"value": "3da4d745e0e223cb",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"id": "d44820e2-6e02-4b3e-ad1d-5325ad9c6955",
|
||||
"id": "7ec57b28-ee76-4fdb-87e6-5e07c56cdd4d",
|
||||
"name": "nw_engine",
|
||||
"value": "google.de",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"id": "f8e3b6a7-5b9b-4cee-bb32-182d91e490cf",
|
||||
"id": "e670bd6a-6327-4570-ac3b-09baff9dc81a",
|
||||
"name": "nw_language",
|
||||
"value": "German",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"id": "d2220a20-09dd-4f0c-b369-659eeed0282d",
|
||||
"id": "c5671976-8b69-4788-9e36-86165d5e97f4",
|
||||
"name": "gitea_base",
|
||||
"value": "https://gitea.lucas-orth.de",
|
||||
"value": "http://gitea:3000",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"id": "8dcc7273-ce87-467a-a962-a18ca003a539",
|
||||
"id": "17ab5e1f-db56-45ad-8392-ff0dfed8a965",
|
||||
"name": "gitea_owner",
|
||||
"value": "lucas.orth",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"id": "6a5c4de2-2f89-49e1-b55d-788b2321ab1b",
|
||||
"id": "3a233c4d-69b7-47cc-97f6-0dc06c2923f6",
|
||||
"name": "gitea_repo",
|
||||
"value": "Skrift-Auto-Article",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"id": "eef11081-81d9-491e-9fef-75a32eda1cc2",
|
||||
"id": "83e56d69-847f-485c-9331-acffd8390fda",
|
||||
"name": "branch",
|
||||
"value": "main",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"id": "fe210a4a-89ca-4b77-8d7f-f21bd18db295",
|
||||
"id": "9ddffd30-8245-4e0e-85c6-4ef350dc45d9",
|
||||
"name": "index_pfad",
|
||||
"value": "artikel-index.json",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"id": "a46ba44a-eb52-46de-a124-079ab068bc5c",
|
||||
"id": "47ac93b9-529b-43a4-a3d1-76d83f056827",
|
||||
"name": "brief_ordner",
|
||||
"value": "briefe",
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"id": "d21f91b9-1959-4ded-896f-1758e98b6959",
|
||||
"id": "67d79c76-ca3a-4066-97a8-6d135f55244e",
|
||||
"name": "poll_max",
|
||||
"value": 30,
|
||||
"type": "number"
|
||||
},
|
||||
{
|
||||
"id": "ad1bab66-9d3b-4a1a-82e6-d1cf5219eec6",
|
||||
"id": "0766321e-b286-48b9-90c3-63b0f9d22a82",
|
||||
"name": "poll_sekunden",
|
||||
"value": 20,
|
||||
"type": "number"
|
||||
},
|
||||
{
|
||||
"id": "46000330-8284-4ecd-af14-46c0752cda76",
|
||||
"id": "9effca14-631e-419d-8dba-4e5c44c1b817",
|
||||
"name": "pause_zwischen_artikeln",
|
||||
"value": 5,
|
||||
"type": "number"
|
||||
},
|
||||
{
|
||||
"id": "209e8874-8b8c-4873-a9ba-f13ad65ad05b",
|
||||
"id": "4cf2db61-c55a-43d1-8d7b-427e35ac703e",
|
||||
"name": "benachrichtigung_an",
|
||||
"value": "privat@lucas-orth.de",
|
||||
"type": "string"
|
||||
@@ -153,7 +153,7 @@
|
||||
-240,
|
||||
200
|
||||
],
|
||||
"id": "43da0e65-2f7e-4617-aca1-f256f246f2cb",
|
||||
"id": "aba36956-c83a-44c4-9012-fe80979f8545",
|
||||
"name": "Konfiguration"
|
||||
},
|
||||
{
|
||||
@@ -177,7 +177,7 @@
|
||||
-20,
|
||||
200
|
||||
],
|
||||
"id": "4d42aa4f-6a82-403f-b4d5-fd75282e5e3c",
|
||||
"id": "0ebb8bf1-d129-4066-8c59-2b4c3b27cd52",
|
||||
"name": "Artikeltabelle lesen",
|
||||
"credentials": {
|
||||
"httpHeaderAuth": {
|
||||
@@ -201,7 +201,7 @@
|
||||
-20,
|
||||
420
|
||||
],
|
||||
"id": "d47a2d36-c2c3-40dc-b0d4-bb9bd12727e8",
|
||||
"id": "5093a5ca-b790-459f-bf12-5e221431323f",
|
||||
"name": "Fehler Artikeltabelle"
|
||||
},
|
||||
{
|
||||
@@ -215,7 +215,7 @@
|
||||
200,
|
||||
200
|
||||
],
|
||||
"id": "516ce26d-42a5-4a31-a1bf-6368cd2b3fb3",
|
||||
"id": "335206d7-0cd9-4e66-9534-bdf52618deac",
|
||||
"name": "Tabelle auswerten"
|
||||
},
|
||||
{
|
||||
@@ -229,7 +229,7 @@
|
||||
},
|
||||
"conditions": [
|
||||
{
|
||||
"id": "fe2fd068-eb1c-4ac5-a379-40a18fdf1599",
|
||||
"id": "90341bb9-1b82-49ee-8a6e-3351c7140dbe",
|
||||
"leftValue": "={{ $json.leer === true }}",
|
||||
"rightValue": "",
|
||||
"operator": {
|
||||
@@ -250,7 +250,7 @@
|
||||
420,
|
||||
200
|
||||
],
|
||||
"id": "e608a1ef-ae5f-4eeb-bf16-545c77ec1156",
|
||||
"id": "74528ffd-5113-4ada-a8a9-aa4e1e8a5309",
|
||||
"name": "Offene Artikel vorhanden?"
|
||||
},
|
||||
{
|
||||
@@ -261,7 +261,7 @@
|
||||
640,
|
||||
60
|
||||
],
|
||||
"id": "b9e02838-18d0-43b7-a1e3-7c9ea3e5d4ca",
|
||||
"id": "c7123211-a46c-4446-a10d-5ba1083b05b2",
|
||||
"name": "Nichts zu tun"
|
||||
},
|
||||
{
|
||||
@@ -277,7 +277,7 @@
|
||||
640,
|
||||
320
|
||||
],
|
||||
"id": "638db643-ff14-4875-80af-8c717b045a48",
|
||||
"id": "b690989b-0358-43aa-b7e3-efd5511b3d58",
|
||||
"name": "Artikel nacheinander"
|
||||
},
|
||||
{
|
||||
@@ -307,7 +307,7 @@
|
||||
900,
|
||||
420
|
||||
],
|
||||
"id": "6979623d-d28f-4278-880d-2a91bcfe9e11",
|
||||
"id": "95a1f069-15c6-405e-888e-2d317891b28c",
|
||||
"name": "Analyse starten",
|
||||
"credentials": {
|
||||
"httpHeaderAuth": {
|
||||
@@ -331,7 +331,7 @@
|
||||
900,
|
||||
640
|
||||
],
|
||||
"id": "1e07b3e2-ab81-4273-bbe5-9b4d5c9c52c5",
|
||||
"id": "bb797361-40f3-46da-b359-c2ce94ad3bec",
|
||||
"name": "Fehler Analyse starten",
|
||||
"onError": "continueRegularOutput"
|
||||
},
|
||||
@@ -346,7 +346,7 @@
|
||||
1120,
|
||||
420
|
||||
],
|
||||
"id": "4e8658a3-d8cc-4859-b9a7-c1064b46a6bd",
|
||||
"id": "5320b757-5a3f-465e-9b3f-3da46b590824",
|
||||
"name": "Poll vorbereiten"
|
||||
},
|
||||
{
|
||||
@@ -360,9 +360,9 @@
|
||||
1340,
|
||||
420
|
||||
],
|
||||
"id": "a3c33dc6-3c93-4f0b-953a-a8262cb87daf",
|
||||
"id": "0b0db985-8687-4b8a-b183-7a1072d8180f",
|
||||
"name": "Warten",
|
||||
"webhookId": "120963a7-ba5e-43a6-b9bb-83bc95f7acf9"
|
||||
"webhookId": "dcd62081-3c28-4b1c-87b1-058ee2e774fc"
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
@@ -391,7 +391,7 @@
|
||||
1560,
|
||||
420
|
||||
],
|
||||
"id": "8a17fa19-a403-4713-ac2f-39ab9a3b49b7",
|
||||
"id": "c2d91e7a-97cd-446d-9f59-973d2fd2e872",
|
||||
"name": "Analyse abfragen",
|
||||
"credentials": {
|
||||
"httpHeaderAuth": {
|
||||
@@ -415,7 +415,7 @@
|
||||
1560,
|
||||
640
|
||||
],
|
||||
"id": "3fb2a872-fecb-4b3e-a9b5-c9538111eb84",
|
||||
"id": "32ea6fc9-45ad-4e9c-86db-5eda4a369308",
|
||||
"name": "Fehler Analyse abfragen",
|
||||
"onError": "continueRegularOutput"
|
||||
},
|
||||
@@ -430,7 +430,7 @@
|
||||
},
|
||||
"conditions": [
|
||||
{
|
||||
"id": "68b33733-066e-40c4-a697-226bf1d37a0f",
|
||||
"id": "540396ef-e549-47e4-aab0-2658f397d1b0",
|
||||
"leftValue": "={{ $json.status }}",
|
||||
"rightValue": "ready",
|
||||
"operator": {
|
||||
@@ -450,7 +450,7 @@
|
||||
1780,
|
||||
420
|
||||
],
|
||||
"id": "a92a355d-59c7-4022-8e39-a52a81bc6ff6",
|
||||
"id": "3611443b-1e91-4241-8c61-3c18e3a6a3d2",
|
||||
"name": "Analyse fertig?"
|
||||
},
|
||||
{
|
||||
@@ -464,7 +464,7 @@
|
||||
1780,
|
||||
660
|
||||
],
|
||||
"id": "59f92f39-c2ac-4af2-863e-7d94fdaf83f4",
|
||||
"id": "524f0b05-2fce-4223-9974-dbfd9571e9ac",
|
||||
"name": "Versuch zaehlen"
|
||||
},
|
||||
{
|
||||
@@ -478,7 +478,7 @@
|
||||
},
|
||||
"conditions": [
|
||||
{
|
||||
"id": "73ff3b19-579a-4908-8cf5-2f95df88cf0a",
|
||||
"id": "f6a87ddd-b2da-4164-90ff-159bf3d0e33e",
|
||||
"leftValue": "={{ $json.versuch }}",
|
||||
"rightValue": "={{ $('Konfiguration').first().json.poll_max }}",
|
||||
"operator": {
|
||||
@@ -498,7 +498,7 @@
|
||||
2000,
|
||||
660
|
||||
],
|
||||
"id": "729a9708-2f4b-4e4b-8fc6-d5dc226773ca",
|
||||
"id": "5bcea09f-ad45-4347-ad0d-fcefbbae7b50",
|
||||
"name": "Poll-Limit erreicht?"
|
||||
},
|
||||
{
|
||||
@@ -512,13 +512,13 @@
|
||||
2220,
|
||||
780
|
||||
],
|
||||
"id": "c34d32e0-ef60-4e5c-8bf0-fb7274fa3c48",
|
||||
"id": "f2b2da7e-2014-460f-af19-d9d08c1c8516",
|
||||
"name": "Timeout melden"
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
"mode": "runOnceForAllItems",
|
||||
"jsCode": "\n// Feldnamen stammen aus einer echten /get-query-Antwort, siehe docs/feldnachweis.md\nconst a = $('Poll vorbereiten').first().json;\nconst n = $input.first().json;\n\nconst liste = (arr) => (arr || []).map(x => ({\n begriff: x.t,\n min: Array.isArray(x.sugg_usage) ? x.sugg_usage[0] : null,\n max: Array.isArray(x.sugg_usage) ? x.sugg_usage[1] : null,\n bei_wettbewerbern_pc: x.usage_pc ?? null,\n}));\n\nconst fragen = [];\nconst gesehen = new Set();\nconst addFrage = (q, quelle, gewicht) => {\n if (!q) return;\n const k = q.trim().toLowerCase();\n if (gesehen.has(k)) return;\n gesehen.add(k);\n fragen.push({ frage: q.trim(), quelle, gewicht });\n};\nObject.entries((n.ideas && n.ideas.topic_matrix) || {})\n .sort((x, y) => (y[1].importance || 0) - (x[1].importance || 0))\n .forEach(([q, v]) => addFrage(q, 'topic_matrix', v.importance || null));\n((n.ideas || {}).people_also_ask || []).forEach(x => addFrage(x.q, 'people_also_ask', null));\n((n.ideas || {}).suggest_questions || []).forEach(x => addFrage(x.q, 'suggest_questions', null));\n((n.ideas || {}).content_questions || []).forEach(x => addFrage(x.q, 'content_questions', null));\n\nconst brief = {\n // --- die vom Auftrag geforderten Felder ---\n query_id: n.query,\n keyword: n.keyword,\n begriffe_pflicht: liste((n.terms || {}).content_basic),\n begriffe_erweitert: liste((n.terms || {}).content_extended),\n fragen,\n wortzahl_ziel: ((n.metrics || {}).word_count || {}).target ?? null,\n\n // --- Artikelkontext aus der Tabelle ---\n artikel: { slug: a.slug, titel: a.titel, kategorie: a.kategorie, cta_ziel: a.cta_ziel },\n\n // --- Zusatz fuer die Schreibvorlage ---\n zusatz: {\n wortzahl_median: ((n.metrics || {}).word_count || {}).median ?? null,\n lesbarkeit_ziel: ((n.metrics || {}).readability || {}).target ?? null,\n begriffe_titel: ((n.terms || {}).title || []).map(x => x.t),\n begriffe_description: ((n.terms || {}).desc || []).map(x => x.t),\n begriffe_h1: ((n.terms || {}).h1 || []).map(x => x.t),\n begriffe_h2: ((n.terms || {}).h2 || []).map(x => x.t),\n entitaeten: ((n.terms || {}).entities || []).slice(0, 15).map(x => ({ name: x.t, wichtigkeit: x.importance })),\n suchintention: (n.serp_summary || {}).top_intent ?? null,\n haeufigster_inhaltstyp: (n.serp_summary || {}).top_content_type ?? null,\n gliederungen_top5: (n.competitors || []).slice(0, 5).map(c => ({\n rang: c.rank, url: c.url, score: c.content_score, wortzahl: c.word_count,\n ueberschriften: (c.headers || []).map(h => `${h[0]}: ${h[1]}`).slice(0, 25),\n })),\n terms_txt_content_basic: ((n.terms_txt || {}).content_basic_w_ranges) ?? null,\n },\n\n meta: {\n erzeugt_am: new Date().toISOString(),\n analyse_url: n.query_url || a.query_url || null,\n freigabe_url: n.share_url || a.share_url || null,\n sprache: n.language, suchmaschine: n.engine, projekt: n.project,\n },\n};\n\nreturn [{ json: { slug: a.slug, zeilen_index: a.zeilen_index, query: n.query,\n keyword: n.keyword, brief } }];\n"
|
||||
"jsCode": "\n// Feldnamen stammen aus einer echten /get-query-Antwort, siehe docs/feldnachweis.md\nconst a = $('Poll vorbereiten').first().json;\nconst n = $input.first().json;\n\nconst liste = (arr) => (arr || []).map(x => ({\n begriff: x.t,\n min: Array.isArray(x.sugg_usage) ? x.sugg_usage[0] : null,\n max: Array.isArray(x.sugg_usage) ? x.sugg_usage[1] : null,\n bei_wettbewerbern_pc: x.usage_pc ?? null,\n}));\n\nconst fragen = [];\nconst gesehen = new Set();\nconst addFrage = (q, quelle, gewicht) => {\n if (!q) return;\n const k = q.trim().toLowerCase();\n if (gesehen.has(k)) return;\n gesehen.add(k);\n fragen.push({ frage: q.trim(), quelle, gewicht });\n};\nObject.entries((n.ideas && n.ideas.topic_matrix) || {})\n .sort((x, y) => (y[1].importance || 0) - (x[1].importance || 0))\n .forEach(([q, v]) => addFrage(q, 'topic_matrix', v.importance || null));\n((n.ideas || {}).people_also_ask || []).forEach(x => addFrage(x.q, 'people_also_ask', null));\n((n.ideas || {}).suggest_questions || []).forEach(x => addFrage(x.q, 'suggest_questions', null));\n((n.ideas || {}).content_questions || []).forEach(x => addFrage(x.q, 'content_questions', null));\n\nconst brief = {\n // --- die vom Auftrag geforderten Felder ---\n query_id: n.query,\n keyword: n.keyword,\n begriffe_pflicht: liste((n.terms || {}).content_basic),\n begriffe_erweitert: liste((n.terms || {}).content_extended),\n fragen,\n wortzahl_ziel: ((n.metrics || {}).word_count || {}).target ?? null,\n\n // --- Artikelkontext aus der Tabelle ---\n artikel: { slug: a.slug, titel: a.titel, kategorie: a.kategorie, cta_ziel: a.cta_ziel },\n\n // --- Zusatz fuer die Schreibvorlage ---\n zusatz: {\n wortzahl_median: ((n.metrics || {}).word_count || {}).median ?? null,\n lesbarkeit_ziel: ((n.metrics || {}).readability || {}).target ?? null,\n begriffe_titel: ((n.terms || {}).title || []).map(x => x.t),\n begriffe_description: ((n.terms || {}).desc || []).map(x => x.t),\n begriffe_h1: ((n.terms || {}).h1 || []).map(x => x.t),\n begriffe_h2: ((n.terms || {}).h2 || []).map(x => x.t),\n entitaeten: ((n.terms || {}).entities || []).slice(0, 15).map(x => ({ name: x.t, wichtigkeit: x.importance })),\n suchintention: (n.serp_summary || {}).top_intent ?? null,\n haeufigster_inhaltstyp: (n.serp_summary || {}).top_content_type ?? null,\n gliederungen_top5: (n.competitors || []).slice(0, 5).map(c => ({\n rang: c.rank, url: c.url, score: c.content_score, wortzahl: c.word_count,\n ueberschriften: (c.headers || []).map(h => `${h[0]}: ${h[1]}`).slice(0, 25),\n })),\n terms_txt_content_basic: ((n.terms_txt || {}).content_basic_w_ranges) ?? null,\n },\n\n schreibregeln: {\n preise: 'Preise niemals ausschreiben. Immer den Shortcode einsetzen: '\n + '[skrift_preis key=\"SCHLUESSEL\" ab=\"0|1\" brutto=\"0|1\"]. '\n + 'key ist der Produktschluessel (z. B. briefe, postkarten, porto_inland). '\n + 'ab=1 liefert den guenstigsten Staffelpreis, ab=0 den Standardpreis. '\n + 'brutto=1 inkl. MwSt., brutto=0 netto. Das Wort \"ab\" selbst gehoert in den Fliesstext, '\n + 'der Shortcode liefert nur die Zahl. Beispiel: '\n + 'Handschriftliche Briefe ab [skrift_preis key=\"briefe\" ab=\"1\"] pro Stueck. '\n + 'Ein unbekannter key ergibt eine leere Ausgabe, keinen Fehler.',\n faq: 'FAQ nicht in content_html schreiben, sondern als Feld faq mit Frage-Antwort-Paaren. '\n + 'Die Ausgabe im Beitrag uebernimmt der Shortcode [skrift_faq].',\n kurzantwort: 'Ein Absatz, der die Hauptfrage direkt beantwortet, als eigenes Feld kurzantwort.',\n },\n\n meta: {\n erzeugt_am: new Date().toISOString(),\n analyse_url: n.query_url || a.query_url || null,\n freigabe_url: n.share_url || a.share_url || null,\n sprache: n.language, suchmaschine: n.engine, projekt: n.project,\n },\n};\n\nreturn [{ json: { slug: a.slug, zeilen_index: a.zeilen_index, query: n.query,\n keyword: n.keyword, brief } }];\n"
|
||||
},
|
||||
"type": "n8n-nodes-base.code",
|
||||
"typeVersion": 2,
|
||||
@@ -526,7 +526,7 @@
|
||||
2220,
|
||||
300
|
||||
],
|
||||
"id": "b1468413-2e7b-4f94-96c4-b0a7179b1b67",
|
||||
"id": "e7c0babd-988d-4a5a-9cdd-ba6de4ecf07e",
|
||||
"name": "Brief bauen"
|
||||
},
|
||||
{
|
||||
@@ -551,7 +551,7 @@
|
||||
2440,
|
||||
300
|
||||
],
|
||||
"id": "8975c0b7-b424-40e6-8dd4-590669bca105",
|
||||
"id": "537e73ab-e8a5-44a5-b88d-1052ccd1bc61",
|
||||
"name": "Brief vorhanden?",
|
||||
"credentials": {
|
||||
"httpHeaderAuth": {
|
||||
@@ -563,7 +563,7 @@
|
||||
{
|
||||
"parameters": {
|
||||
"mode": "runOnceForAllItems",
|
||||
"jsCode": "\nconst b = $('Brief bauen').first().json;\nconst p = $input.first().json;\nconst vorhanden = p.statusCode === 200 && p.body && p.body.sha;\n\nconst inhalt = Buffer.from(JSON.stringify(b.brief, null, 2), 'utf8').toString('base64');\nconst konf = $('Konfiguration').first().json;\n\nreturn [{ json: {\n ...b,\n methode: vorhanden ? 'PUT' : 'POST',\n pfad: `${konf.brief_ordner}/brief-${b.slug}.json`,\n commit_body: JSON.stringify({\n content: inhalt,\n message: `Brief ${vorhanden ? 'aktualisiert' : 'erzeugt'}: ${b.slug} (${b.keyword})`,\n branch: konf.branch,\n ...(vorhanden ? { sha: p.body.sha } : {}),\n }),\n}}];\n"
|
||||
"jsCode": "\nconst b = $('Brief bauen').first().json;\nconst p = $input.first().json;\n// n8n liefert den Koerper bei fullResponse je nach Version als body oder data.\nconst K = (r) => (r && r.body !== undefined) ? r.body : ((r || {}).data);\nconst kp = K(p);\nconst vorhanden = p.statusCode === 200 && kp && kp.sha;\n\nconst inhalt = Buffer.from(JSON.stringify(b.brief, null, 2), 'utf8').toString('base64');\nconst konf = $('Konfiguration').first().json;\n\nreturn [{ json: {\n ...b,\n methode: vorhanden ? 'PUT' : 'POST',\n pfad: `${konf.brief_ordner}/brief-${b.slug}.json`,\n commit_body: JSON.stringify({\n content: inhalt,\n message: `Brief ${vorhanden ? 'aktualisiert' : 'erzeugt'}: ${b.slug} (${b.keyword})`,\n branch: konf.branch,\n ...(vorhanden ? { sha: kp.sha } : {}),\n }),\n}}];\n"
|
||||
},
|
||||
"type": "n8n-nodes-base.code",
|
||||
"typeVersion": 2,
|
||||
@@ -571,7 +571,7 @@
|
||||
2660,
|
||||
300
|
||||
],
|
||||
"id": "afb04526-f6e8-4e1a-a509-dda65ca2ff73",
|
||||
"id": "8a18d86d-fda2-4f65-bed9-7deda83a1acb",
|
||||
"name": "Commit vorbereiten"
|
||||
},
|
||||
{
|
||||
@@ -601,7 +601,7 @@
|
||||
2880,
|
||||
300
|
||||
],
|
||||
"id": "52b0dd0b-8fd7-4ea9-992a-6cd6441ef163",
|
||||
"id": "db44ac17-59f2-437a-bb7d-94aa4da5a074",
|
||||
"name": "Brief committen",
|
||||
"credentials": {
|
||||
"httpHeaderAuth": {
|
||||
@@ -625,7 +625,7 @@
|
||||
2880,
|
||||
520
|
||||
],
|
||||
"id": "206a3db5-ccca-463c-be77-93715a215352",
|
||||
"id": "31a3c38b-c79a-42cb-9ac1-6710deb2fd02",
|
||||
"name": "Fehler Brief committen",
|
||||
"onError": "continueRegularOutput"
|
||||
},
|
||||
@@ -640,7 +640,7 @@
|
||||
3100,
|
||||
300
|
||||
],
|
||||
"id": "153c2001-4e5c-4ab2-a018-58d139a41920",
|
||||
"id": "5d243ba5-1e7e-4f16-8037-9eed05687643",
|
||||
"name": "Erfolg merken"
|
||||
},
|
||||
{
|
||||
@@ -654,9 +654,9 @@
|
||||
3320,
|
||||
400
|
||||
],
|
||||
"id": "bd5fe14c-6097-418b-a91a-97d9679e9067",
|
||||
"id": "997a2d3f-ddca-4081-9ded-2eb521163b1b",
|
||||
"name": "Pause Rate Limit",
|
||||
"webhookId": "4504a64d-5777-4cfe-bcc6-66a9f8b1c7c9"
|
||||
"webhookId": "3f510a7a-22c1-4248-a7c1-60fe57786eb2"
|
||||
},
|
||||
{
|
||||
"parameters": {
|
||||
@@ -669,7 +669,7 @@
|
||||
900,
|
||||
140
|
||||
],
|
||||
"id": "e9189aa1-03a8-4463-8682-64fc8f0e52e2",
|
||||
"id": "8f0de534-6cea-40af-bf64-e63651648df7",
|
||||
"name": "Ergebnisse sammeln"
|
||||
},
|
||||
{
|
||||
@@ -683,7 +683,7 @@
|
||||
1120,
|
||||
140
|
||||
],
|
||||
"id": "52907f9e-bf97-48b1-bcf9-a796c7ff3438",
|
||||
"id": "9597c915-36d3-4f94-af9d-60351fa4ac41",
|
||||
"name": "Statusupdate vorbereiten"
|
||||
},
|
||||
{
|
||||
@@ -713,7 +713,7 @@
|
||||
1340,
|
||||
140
|
||||
],
|
||||
"id": "f08430c6-a045-44e3-86c2-5d071c49249f",
|
||||
"id": "a81137d7-c063-4f56-ac56-2ac6fffa9560",
|
||||
"name": "Status zurueckschreiben",
|
||||
"credentials": {
|
||||
"httpHeaderAuth": {
|
||||
@@ -737,7 +737,7 @@
|
||||
1340,
|
||||
-60
|
||||
],
|
||||
"id": "1235e563-1812-48c1-bf17-c661c3f06ff4",
|
||||
"id": "35cff298-1691-452f-bc25-a225ee241a6e",
|
||||
"name": "Fehler Statusupdate"
|
||||
},
|
||||
{
|
||||
@@ -751,7 +751,7 @@
|
||||
1560,
|
||||
140
|
||||
],
|
||||
"id": "65282b64-53b8-4ffc-8f28-4822a9b7c7e4",
|
||||
"id": "ad2d0735-fd21-4181-bb7f-8bc51bd01435",
|
||||
"name": "Meldung formulieren"
|
||||
},
|
||||
{
|
||||
@@ -769,7 +769,7 @@
|
||||
1780,
|
||||
140
|
||||
],
|
||||
"id": "510b0e37-8db3-4b5a-8abd-a5fe4403fb9d",
|
||||
"id": "03d899b0-4d69-4105-a755-eaa1792d7497",
|
||||
"name": "Benachrichtigung",
|
||||
"disabled": true,
|
||||
"notes": "SMTP-Credential zuweisen, Absender eintragen, dann Node aktivieren."
|
||||
|
||||
Reference in New Issue
Block a user