├── README.md ├── AI_Blog_Publisher.json ├── ZimmWriter_Post_To_Wordpress_Advanced_Custom_Fields.json ├── ZimmWriter_Local_Buffet__AI_Blog_Publisher_Drive.json ├── _Section_Test__Local_Buffer__AI_Blog_Publisher_Drive.json └── Ultimate_Zimmwriter__Google_Drive__WordPress_Workflow_For_Export.json /README.md: -------------------------------------------------------------------------------- 1 | # N8N-Workflows 2 | -------------------------------------------------------------------------------- /AI_Blog_Publisher.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Your Website - AI Blog Publisher", 3 | "nodes": [ 4 | { 5 | "parameters": { 6 | "title": "={{ $json[\"title\"] }}", 7 | "additionalFields": { 8 | "content": "={{ $json[\"content\"] }}" 9 | } 10 | }, 11 | "name": "WordPress", 12 | "type": "n8n-nodes-base.wordpress", 13 | "typeVersion": 1, 14 | "position": [ 15 | 1380, 16 | 300 17 | ], 18 | "id": "815fa02f-9cc5-4fd7-8908-9d1514faa679", 19 | "credentials": { 20 | "wordpressApi": { 21 | "id": "41", 22 | "name": "Your Website WP" 23 | } 24 | } 25 | }, 26 | { 27 | "parameters": {}, 28 | "id": "e90de98b-e12a-4779-9da7-333218e26a86", 29 | "name": "When clicking \"Execute Workflow\"", 30 | "type": "n8n-nodes-base.manualTrigger", 31 | "typeVersion": 1, 32 | "position": [ 33 | -220, 34 | 300 35 | ] 36 | }, 37 | { 38 | "parameters": { 39 | "resource": "folder", 40 | "operation": "list", 41 | "path": "/URLPath/Website/Blog_Posts" 42 | }, 43 | "id": "51ebf6a9-5c3b-40bb-b602-79f267b3d818", 44 | "name": "Nextcloud", 45 | "type": "n8n-nodes-base.nextCloud", 46 | "typeVersion": 1, 47 | "position": [ 48 | 0, 49 | 300 50 | ], 51 | "credentials": { 52 | "nextCloudApi": { 53 | "id": "8", 54 | "name": "NextCloud account" 55 | } 56 | } 57 | }, 58 | { 59 | "parameters": { 60 | "operation": "download", 61 | "path": "={{ $json[\"path\"] }}", 62 | "binaryPropertyName": "=data" 63 | }, 64 | "id": "d23db8e4-d7a2-48a9-b67d-22af984cb0fd", 65 | "name": "Nextcloud1", 66 | "type": "n8n-nodes-base.nextCloud", 67 | "typeVersion": 1, 68 | "position": [ 69 | 500, 70 | 300 71 | ], 72 | "alwaysOutputData": false, 73 | "credentials": { 74 | "nextCloudApi": { 75 | "id": "8", 76 | "name": "NextCloud account" 77 | } 78 | } 79 | }, 80 | { 81 | "parameters": { 82 | "setAllData": false, 83 | "destinationKey": "filecontents", 84 | "options": { 85 | "jsonParse": false 86 | } 87 | }, 88 | "id": "d089dc5a-3452-4490-b888-1ec5a12f342c", 89 | "name": "Move Binary Data", 90 | "type": "n8n-nodes-base.moveBinaryData", 91 | "typeVersion": 1, 92 | "position": [ 93 | 680, 94 | 300 95 | ] 96 | }, 97 | { 98 | "parameters": { 99 | "jsCode": "// Get the file contents from the input data\nconst fileContents = items[0].json.filecontents;\n\n// Split the file contents into an array of lines\nconst lines = fileContents.split('\\n');\n\n// Remove the first 4 lines\nlines.splice(0, 4);\n\n// Join the remaining lines back into a single string\nconst newFileContents = lines.join('\\n');\n\n// Set the new file contents as the output\nreturn [{ json: { filecontents: newFileContents } }];\n" 100 | }, 101 | "id": "a7e68d66-7012-41a3-9cad-ce0b90cee1fa", 102 | "name": "Code1", 103 | "type": "n8n-nodes-base.code", 104 | "typeVersion": 1, 105 | "position": [ 106 | 860, 107 | 300 108 | ] 109 | }, 110 | { 111 | "parameters": { 112 | "jsCode": "// Get the file content from the previous node\nconst fileContent = items[0].json.filecontents;\n\n// Split the file content into an array of lines\nconst lines = fileContent.split('\\n');\n\n// Get the first line as the title\nconst title = lines[0].trim();\n\n// Get the rest of the lines as the body and join them together\nconst body = lines.slice(1).join('\\n').trim();\n\n// Set the output\nreturn [{json: {title, body}}];\n" 113 | }, 114 | "id": "9a6cca92-11f4-4ee7-a806-2b27fda6340f", 115 | "name": "Code2", 116 | "type": "n8n-nodes-base.code", 117 | "typeVersion": 1, 118 | "position": [ 119 | 1040, 120 | 300 121 | ] 122 | }, 123 | { 124 | "parameters": { 125 | "mode": "markdownToHtml", 126 | "markdown": "={{ $json[\"body\"] }}", 127 | "destinationKey": "content", 128 | "options": {} 129 | }, 130 | "id": "9f81695a-76ef-4c5b-91cd-4d0dfba2d0fc", 131 | "name": "Markdown", 132 | "type": "n8n-nodes-base.markdown", 133 | "typeVersion": 1, 134 | "position": [ 135 | 1220, 136 | 300 137 | ] 138 | }, 139 | { 140 | "parameters": { 141 | "operation": "move", 142 | "path": "={{ $node[\"Nextcloud1\"].json[\"path\"] }}", 143 | "toPath": "=/URLPath/Website/Published/{{ $json[\"title\"][\"rendered\"] }} Published.txt" 144 | }, 145 | "id": "00d548b4-15b2-4ea6-bd7a-c02ab3951383", 146 | "name": "Nextcloud3", 147 | "type": "n8n-nodes-base.nextCloud", 148 | "typeVersion": 1, 149 | "position": [ 150 | 1580, 151 | 300 152 | ], 153 | "credentials": { 154 | "nextCloudApi": { 155 | "id": "8", 156 | "name": "NextCloud account" 157 | } 158 | } 159 | }, 160 | { 161 | "parameters": { 162 | "batchSize": 1, 163 | "options": {} 164 | }, 165 | "id": "6bf1d0d4-a10d-4d85-9529-d7bda9277c76", 166 | "name": "SplitInBatches1", 167 | "type": "n8n-nodes-base.splitInBatches", 168 | "typeVersion": 1, 169 | "position": [ 170 | 260, 171 | 300 172 | ] 173 | }, 174 | { 175 | "parameters": { 176 | "conditions": { 177 | "boolean": [ 178 | { 179 | "value1": true, 180 | "value2": "={{$node[\"SplitInBatches1\"].context[\"noItemsLeft\"]}}" 181 | } 182 | ] 183 | } 184 | }, 185 | "id": "fdc85dec-7b92-42c0-bd30-81fa8d73a93a", 186 | "name": "IF1", 187 | "type": "n8n-nodes-base.if", 188 | "typeVersion": 1, 189 | "position": [ 190 | 1800, 191 | 300 192 | ] 193 | }, 194 | { 195 | "parameters": {}, 196 | "id": "cb96c90d-ebb7-4756-a12b-fcec93273b6b", 197 | "name": "No Operation, do nothing1", 198 | "type": "n8n-nodes-base.noOp", 199 | "typeVersion": 1, 200 | "position": [ 201 | 1980, 202 | 160 203 | ] 204 | } 205 | ], 206 | "pinData": {}, 207 | "connections": { 208 | "When clicking \"Execute Workflow\"": { 209 | "main": [ 210 | [ 211 | { 212 | "node": "Nextcloud", 213 | "type": "main", 214 | "index": 0 215 | } 216 | ] 217 | ] 218 | }, 219 | "Nextcloud": { 220 | "main": [ 221 | [ 222 | { 223 | "node": "SplitInBatches1", 224 | "type": "main", 225 | "index": 0 226 | } 227 | ] 228 | ] 229 | }, 230 | "Nextcloud1": { 231 | "main": [ 232 | [ 233 | { 234 | "node": "Move Binary Data", 235 | "type": "main", 236 | "index": 0 237 | } 238 | ] 239 | ] 240 | }, 241 | "Move Binary Data": { 242 | "main": [ 243 | [ 244 | { 245 | "node": "Code1", 246 | "type": "main", 247 | "index": 0 248 | } 249 | ] 250 | ] 251 | }, 252 | "Code1": { 253 | "main": [ 254 | [ 255 | { 256 | "node": "Code2", 257 | "type": "main", 258 | "index": 0 259 | } 260 | ] 261 | ] 262 | }, 263 | "Code2": { 264 | "main": [ 265 | [ 266 | { 267 | "node": "Markdown", 268 | "type": "main", 269 | "index": 0 270 | } 271 | ] 272 | ] 273 | }, 274 | "Markdown": { 275 | "main": [ 276 | [ 277 | { 278 | "node": "WordPress", 279 | "type": "main", 280 | "index": 0 281 | } 282 | ] 283 | ] 284 | }, 285 | "WordPress": { 286 | "main": [ 287 | [ 288 | { 289 | "node": "Nextcloud3", 290 | "type": "main", 291 | "index": 0 292 | } 293 | ] 294 | ] 295 | }, 296 | "Nextcloud3": { 297 | "main": [ 298 | [ 299 | { 300 | "node": "IF1", 301 | "type": "main", 302 | "index": 0 303 | } 304 | ] 305 | ] 306 | }, 307 | "IF1": { 308 | "main": [ 309 | [ 310 | { 311 | "node": "No Operation, do nothing1", 312 | "type": "main", 313 | "index": 0 314 | } 315 | ], 316 | [ 317 | { 318 | "node": "SplitInBatches1", 319 | "type": "main", 320 | "index": 0 321 | } 322 | ] 323 | ] 324 | }, 325 | "SplitInBatches1": { 326 | "main": [ 327 | [ 328 | { 329 | "node": "Nextcloud1", 330 | "type": "main", 331 | "index": 0 332 | } 333 | ] 334 | ] 335 | } 336 | }, 337 | "active": false, 338 | "settings": {}, 339 | "versionId": "2e29f74d-3f83-4730-bfbe-b7b3baec9cdd", 340 | "id": "75", 341 | "meta": { 342 | "instanceId": "7bfea076db05271bda3779ae68f8c25c7bf6ab9038c7c740cee303eb9b445dd4" 343 | }, 344 | "tags": [ 345 | { 346 | "createdAt": "2023-03-03T12:34:50.900Z", 347 | "updatedAt": "2023-03-03T12:34:50.900Z", 348 | "id": "7", 349 | "name": "Your Websites" 350 | } 351 | ] 352 | } -------------------------------------------------------------------------------- /ZimmWriter_Post_To_Wordpress_Advanced_Custom_Fields.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ZimmWriter Post To Wordpress Advanced Custom Fields", 3 | "nodes": [ 4 | { 5 | "parameters": {}, 6 | "id": "5cabeea4-a815-492d-aebb-341c3d195c17", 7 | "name": "When clicking \"Execute Workflow\"", 8 | "type": "n8n-nodes-base.manualTrigger", 9 | "typeVersion": 1, 10 | "position": [ 11 | -80, 12 | 260 13 | ] 14 | }, 15 | { 16 | "parameters": { 17 | "pollTimes": { 18 | "item": [ 19 | { 20 | "mode": "everyMinute" 21 | } 22 | ] 23 | }, 24 | "triggerOn": "specificFolder", 25 | "folderToWatch": { 26 | "__rl": true, 27 | "value": "Your Folder ID", 28 | "mode": "id" 29 | }, 30 | "event": "fileCreated", 31 | "options": {} 32 | }, 33 | "id": "067a0733-1b37-4e20-85f9-c57075439c19", 34 | "name": "Google Drive Trigger", 35 | "type": "n8n-nodes-base.googleDriveTrigger", 36 | "typeVersion": 1, 37 | "position": [ 38 | -60, 39 | 420 40 | ], 41 | "credentials": { 42 | "googleDriveOAuth2Api": { 43 | "id": "42", 44 | "name": "Woakes070048 Google Drive account" 45 | } 46 | } 47 | }, 48 | { 49 | "parameters": { 50 | "operation": "list", 51 | "useQueryString": true, 52 | "queryString": "\"Your Folder ID\" in parents and trashed=false and mimeType!=\"application/vnd.google-apps.folder\"", 53 | "options": {} 54 | }, 55 | "id": "95298ba7-d507-4112-b809-4b6712018ef9", 56 | "name": "Google Drive", 57 | "type": "n8n-nodes-base.googleDrive", 58 | "typeVersion": 2, 59 | "position": [ 60 | 220, 61 | 420 62 | ], 63 | "credentials": { 64 | "googleDriveOAuth2Api": { 65 | "id": "42", 66 | "name": "Woakes070048 Google Drive account" 67 | } 68 | } 69 | }, 70 | { 71 | "parameters": { 72 | "operation": "download", 73 | "fileId": { 74 | "__rl": true, 75 | "value": "={{ $json.id }}", 76 | "mode": "id" 77 | }, 78 | "options": {} 79 | }, 80 | "id": "bdbb2119-fe56-46ad-a2b0-cff7aca959ba", 81 | "name": "Google Drive1", 82 | "type": "n8n-nodes-base.googleDrive", 83 | "typeVersion": 2, 84 | "position": [ 85 | 660, 86 | 400 87 | ], 88 | "credentials": { 89 | "googleDriveOAuth2Api": { 90 | "id": "42", 91 | "name": "Woakes070048 Google Drive account" 92 | } 93 | } 94 | }, 95 | { 96 | "parameters": { 97 | "setAllData": false, 98 | "options": { 99 | "jsonParse": false 100 | } 101 | }, 102 | "id": "2d193109-c813-4e89-bd5a-69cfc9c7de12", 103 | "name": "Move Binary Data", 104 | "type": "n8n-nodes-base.moveBinaryData", 105 | "typeVersion": 1, 106 | "position": [ 107 | 840, 108 | 400 109 | ] 110 | }, 111 | { 112 | "parameters": { 113 | "operation": "update", 114 | "fileId": { 115 | "__rl": true, 116 | "value": "={{ $node[\"FinalForm-MidJourney Prompt\"].json[\"id\"] }}", 117 | "mode": "id" 118 | }, 119 | "updateFields": { 120 | "parentId": "Your Folder ID" 121 | }, 122 | "options": {} 123 | }, 124 | "id": "73fd87f9-e1f7-4718-b2de-70c6dc976ca5", 125 | "name": "Google Drive2", 126 | "type": "n8n-nodes-base.googleDrive", 127 | "typeVersion": 2, 128 | "position": [ 129 | 1620, 130 | 400 131 | ], 132 | "credentials": { 133 | "googleDriveOAuth2Api": { 134 | "id": "42", 135 | "name": "Woakes070048 Google Drive account" 136 | } 137 | } 138 | }, 139 | { 140 | "parameters": { 141 | "method": "POST", 142 | "url": "https://yourdomain.com/wp-json/wp/v2/posts", 143 | "authentication": "predefinedCredentialType", 144 | "nodeCredentialType": "wordpressApi", 145 | "sendBody": true, 146 | "bodyParameters": { 147 | "parameters": [ 148 | { 149 | "name": "title", 150 | "value": "={{ $json.title }}" 151 | }, 152 | { 153 | "name": "status", 154 | "value": "draft" 155 | }, 156 | { 157 | "name": "acf", 158 | "value": "={{ $json.acf }}" 159 | } 160 | ] 161 | }, 162 | "options": {} 163 | }, 164 | "id": "95e095b2-9277-47a5-b87c-4e2cfecbf0a1", 165 | "name": "HTTP Request", 166 | "type": "n8n-nodes-base.httpRequest", 167 | "typeVersion": 3, 168 | "position": [ 169 | 1440, 170 | 400 171 | ], 172 | "credentials": { 173 | "wordpressApi": { 174 | "id": "51", 175 | "name": "aco Wordpress" 176 | } 177 | } 178 | }, 179 | { 180 | "parameters": { 181 | "conditions": { 182 | "string": [ 183 | { 184 | "value1": "={{ $json.data }}", 185 | "operation": "contains", 186 | "value2": "Midjourney AI Image Prompt:" 187 | } 188 | ] 189 | } 190 | }, 191 | "id": "5dd77427-509b-4921-bb17-5465576dbc5c", 192 | "name": "IF", 193 | "type": "n8n-nodes-base.if", 194 | "typeVersion": 1, 195 | "position": [ 196 | 1040, 197 | 400 198 | ] 199 | }, 200 | { 201 | "parameters": { 202 | "jsCode": "const parseInput = (input) => {\n const article = input.trim();\n const sections = article.split(/(?<=\\n)(?=## )/);\n const firstSection = sections[0].split('@').slice(5).join(' ').trim();\n const [meta, emptyReturnSym, title, ...rest] = firstSection.trim().split(\"\\n\");\n const intro = rest.join(\" \");\n const obj = {\n meta: meta.slice(18).trim(),\n title: title.trim(),\n h1: title.trim(),\n intro: intro.trim()\n };\n \n for (let i = 1; i < sections.length; i++) {\n const section = sections[i];\n const [header, ...contentLines] = section.trim().split(\"\\n\");\n const content = contentLines.join(\"\\n\").trim();\n obj[`h2${i}`] = header.slice(2).trim();\n obj[`p${i}`] = content.replace(/###/g, '\\n').trim();\n }\n\n return obj;\n}\n\n// This needs to be tucked into one more array. for n8n to grok it properly.\nfinalArr = new Array;\nfor (const item of $input.all()) {\n const {title, meta, ...data} = parseInput(item.json.data);\n finalArr.push({\n id: item.json.id,\n article: item.json.data,\n file_name: item.json.name,\n title: title,\n meta: meta,\n acf: data\n })\n}\nreturn finalArr;" 203 | }, 204 | "id": "5220e89f-9569-41ae-b492-55e0399d4c6c", 205 | "name": "FinalForm1", 206 | "type": "n8n-nodes-base.code", 207 | "typeVersion": 1, 208 | "position": [ 209 | 1260, 210 | 480 211 | ] 212 | }, 213 | { 214 | "parameters": { 215 | "jsCode": "const parseInput = (input) => {\n const article = input.trim();\n const sections = article.split(/(?<=\\n)(?=## )/);\n const firstSection = sections[0].split('@').slice(9).join(' ').trim();\n const [meta, emptyReturnSym, title, ...rest] = firstSection.trim().split(\"\\n\");\n const intro = rest.join(\" \");\n const obj = {\n meta: meta.slice(18).trim(),\n title: title.trim(),\n h1: title.trim(),\n intro: intro.trim()\n };\n \n for (let i = 1; i < sections.length; i++) {\n const section = sections[i];\n const [header, ...contentLines] = section.trim().split(\"\\n\");\n const content = contentLines.join(\"\\n\").trim();\n obj[`h2${i}`] = header.slice(2).trim();\n obj[`p${i}`] = content.replace(/###/g, '\\n').trim();\n }\n\n return obj;\n}\n\n// This needs to be tucked into one more array. for n8n to grok it properly.\nfinalArr = new Array;\nfor (const item of $input.all()) {\n const {title, meta, ...data} = parseInput(item.json.data);\n finalArr.push({\n id: item.json.id,\n article: item.json.data,\n file_name: item.json.name,\n title: title,\n meta: meta,\n acf: data\n })\n}\nreturn finalArr;" 216 | }, 217 | "id": "92e37e50-da0a-4c81-be34-5c7136f7bc04", 218 | "name": "FinalForm-MidJourney Prompt", 219 | "type": "n8n-nodes-base.code", 220 | "typeVersion": 1, 221 | "position": [ 222 | 1260, 223 | 320 224 | ] 225 | }, 226 | { 227 | "parameters": { 228 | "conditions": { 229 | "boolean": [ 230 | { 231 | "value1": true, 232 | "value2": "={{$node[\"SplitInBatches1\"].context[\"noItemsLeft\"]}}" 233 | } 234 | ] 235 | } 236 | }, 237 | "id": "e38f4108-0463-4d0d-86e7-1e46a4fcc0c0", 238 | "name": "IF1", 239 | "type": "n8n-nodes-base.if", 240 | "typeVersion": 1, 241 | "position": [ 242 | 1880, 243 | 540 244 | ] 245 | }, 246 | { 247 | "parameters": {}, 248 | "id": "317777c3-1115-4900-bd38-1cc9ee4981b2", 249 | "name": "No Operation, do nothing1", 250 | "type": "n8n-nodes-base.noOp", 251 | "typeVersion": 1, 252 | "position": [ 253 | 2100, 254 | 320 255 | ] 256 | }, 257 | { 258 | "parameters": { 259 | "options": {} 260 | }, 261 | "id": "df36d427-f989-41c2-a254-55c217c5a4a2", 262 | "name": "Split In Batches", 263 | "type": "n8n-nodes-base.splitInBatches", 264 | "typeVersion": 2, 265 | "position": [ 266 | 420, 267 | 420 268 | ] 269 | } 270 | ], 271 | "pinData": {}, 272 | "connections": { 273 | "Google Drive": { 274 | "main": [ 275 | [ 276 | { 277 | "node": "Split In Batches", 278 | "type": "main", 279 | "index": 0 280 | } 281 | ] 282 | ] 283 | }, 284 | "Google Drive1": { 285 | "main": [ 286 | [ 287 | { 288 | "node": "Move Binary Data", 289 | "type": "main", 290 | "index": 0 291 | } 292 | ] 293 | ] 294 | }, 295 | "When clicking \"Execute Workflow\"": { 296 | "main": [ 297 | [ 298 | { 299 | "node": "Google Drive", 300 | "type": "main", 301 | "index": 0 302 | } 303 | ] 304 | ] 305 | }, 306 | "Google Drive Trigger": { 307 | "main": [ 308 | [ 309 | { 310 | "node": "Google Drive", 311 | "type": "main", 312 | "index": 0 313 | } 314 | ] 315 | ] 316 | }, 317 | "HTTP Request": { 318 | "main": [ 319 | [ 320 | { 321 | "node": "Google Drive2", 322 | "type": "main", 323 | "index": 0 324 | } 325 | ] 326 | ] 327 | }, 328 | "Move Binary Data": { 329 | "main": [ 330 | [ 331 | { 332 | "node": "IF", 333 | "type": "main", 334 | "index": 0 335 | } 336 | ] 337 | ] 338 | }, 339 | "FinalForm1": { 340 | "main": [ 341 | [ 342 | { 343 | "node": "HTTP Request", 344 | "type": "main", 345 | "index": 0 346 | } 347 | ] 348 | ] 349 | }, 350 | "IF": { 351 | "main": [ 352 | [ 353 | { 354 | "node": "FinalForm-MidJourney Prompt", 355 | "type": "main", 356 | "index": 0 357 | } 358 | ], 359 | [ 360 | { 361 | "node": "FinalForm1", 362 | "type": "main", 363 | "index": 0 364 | } 365 | ] 366 | ] 367 | }, 368 | "FinalForm-MidJourney Prompt": { 369 | "main": [ 370 | [ 371 | { 372 | "node": "HTTP Request", 373 | "type": "main", 374 | "index": 0 375 | } 376 | ] 377 | ] 378 | }, 379 | "Google Drive2": { 380 | "main": [ 381 | [ 382 | { 383 | "node": "IF1", 384 | "type": "main", 385 | "index": 0 386 | } 387 | ] 388 | ] 389 | }, 390 | "IF1": { 391 | "main": [ 392 | [ 393 | { 394 | "node": "No Operation, do nothing1", 395 | "type": "main", 396 | "index": 0 397 | } 398 | ], 399 | [ 400 | { 401 | "node": "Split In Batches", 402 | "type": "main", 403 | "index": 0 404 | } 405 | ] 406 | ] 407 | }, 408 | "Split In Batches": { 409 | "main": [ 410 | [ 411 | { 412 | "node": "Google Drive1", 413 | "type": "main", 414 | "index": 0 415 | } 416 | ] 417 | ] 418 | } 419 | }, 420 | "active": false, 421 | "settings": {}, 422 | "versionId": "999a89ef-f9e2-4037-b595-010eb07e6995", 423 | "id": "141", 424 | "meta": { 425 | "instanceId": "7bfea076db05271bda3779ae68f8c25c7bf6ab9038c7c740cee303eb9b445dd4" 426 | }, 427 | "tags": [ 428 | { 429 | "createdAt": "2023-04-01T08:59:11.354Z", 430 | "updatedAt": "2023-04-01T08:59:11.354Z", 431 | "id": "34", 432 | "name": "ReadyToTest" 433 | }, 434 | { 435 | "createdAt": "2023-04-01T08:59:30.089Z", 436 | "updatedAt": "2023-04-01T08:59:30.089Z", 437 | "id": "36", 438 | "name": "Ximwriter" 439 | }, 440 | { 441 | "createdAt": "2023-04-14T23:06:43.892Z", 442 | "updatedAt": "2023-04-14T23:06:43.892Z", 443 | "id": "39", 444 | "name": "Zimm Course" 445 | } 446 | ] 447 | } -------------------------------------------------------------------------------- /ZimmWriter_Local_Buffet__AI_Blog_Publisher_Drive.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ZimmWriter Local Buffet- AI Blog Publisher Drive", 3 | "nodes": [ 4 | { 5 | "parameters": { 6 | "operation": "list", 7 | "useQueryString": true, 8 | "queryString": "\"Your Folder ID\" in parents", 9 | "limit": 1000, 10 | "options": {} 11 | }, 12 | "id": "6716926f-6cb2-4aa1-a556-10829b74e6b3", 13 | "name": "Google Drive", 14 | "type": "n8n-nodes-base.googleDrive", 15 | "typeVersion": 2, 16 | "position": [ 17 | 0, 18 | -40 19 | ], 20 | "credentials": { 21 | "googleDriveOAuth2Api": { 22 | "id": "42", 23 | "name": "Woakes070048 Google Drive account" 24 | } 25 | } 26 | }, 27 | { 28 | "parameters": { 29 | "values": { 30 | "string": [ 31 | { 32 | "name": "Topic Title", 33 | "value": "={{ $json[\"title\"] }}" 34 | }, 35 | { 36 | "name": "META TITLE", 37 | "value": "={{ $json[\"sections\"][0][\"body\"] }}" 38 | }, 39 | { 40 | "name": "META DESCRIPTION", 41 | "value": "={{ $json[\"sections\"][1][\"body\"] }}" 42 | }, 43 | { 44 | "name": "FIZZY TLDR", 45 | "value": "={{ $json[\"sections\"][2][\"body\"] }}" 46 | }, 47 | { 48 | "name": "SPICY LIST OF FEATURES", 49 | "value": "={{ $json[\"sections\"][3][\"body\"] }}" 50 | }, 51 | { 52 | "name": "JUICY TAGLINE AND CALL TO ACTION", 53 | "value": "={{ $json[\"sections\"][4][\"body\"] }}" 54 | }, 55 | { 56 | "name": "TASTY HOW CAN WE HELP", 57 | "value": "={{ $json[\"sections\"][5][\"body\"] }}" 58 | }, 59 | { 60 | "name": "SNACK ON WHY US", 61 | "value": "={{ $json[\"sections\"][6][\"body\"] }}" 62 | }, 63 | { 64 | "name": "LOAD UP ON SOME FAQS", 65 | "value": "={{ $json[\"sections\"][7][\"body\"] }}" 66 | }, 67 | { 68 | "name": "FOUR DISH MAIN COURSE" 69 | }, 70 | { 71 | "name": "DELICIOUS DISH 1", 72 | "value": "={{ $json[\"sections\"][9][\"body\"] }}" 73 | }, 74 | { 75 | "name": "DELICIOUS DISH 2", 76 | "value": "={{ $json[\"sections\"][10][\"body\"] }}" 77 | }, 78 | { 79 | "name": "DELICIOUS DISH 4", 80 | "value": "={{ $json[\"sections\"][11][\"body\"] }}" 81 | }, 82 | { 83 | "name": "DELICIOUS DISH 3", 84 | "value": "={{ $json[\"sections\"][12][\"body\"] }}" 85 | } 86 | ] 87 | }, 88 | "options": {} 89 | }, 90 | "id": "3af8059f-7e0b-4360-abc9-f4aadd955e44", 91 | "name": "Set", 92 | "type": "n8n-nodes-base.set", 93 | "typeVersion": 1, 94 | "position": [ 95 | 1520, 96 | -60 97 | ] 98 | }, 99 | { 100 | "parameters": { 101 | "operation": "append", 102 | "application": { 103 | "__rl": true, 104 | "value": "https://airtable.com/appSnEm8veakJahJF/tbltowPcMQEjLgYPi", 105 | "mode": "url", 106 | "__regex": "https://airtable.com/([a-zA-Z0-9]{2,})" 107 | }, 108 | "table": { 109 | "__rl": true, 110 | "value": "https://airtable.com/appSnEm8veakJahJF/tbltowPcMQEjLgYPi/viwS5rhYHM2R5hCDc", 111 | "mode": "url", 112 | "__regex": "https://airtable.com/[a-zA-Z0-9]{2,}/([a-zA-Z0-9]{2,})" 113 | }, 114 | "addAllFields": false, 115 | "fields": [ 116 | "Topic Title", 117 | "META TITLE", 118 | "META DESCRIPTION", 119 | "FIZZY TLDR", 120 | "SPICY LIST OF FEATURES", 121 | "JUICY TAGLINE AND CALL TO ACTION", 122 | "TASTY HOW CAN WE HELP", 123 | "SNACK ON WHY US", 124 | "LOAD UP ON SOME FAQS", 125 | "FOUR DISH MAIN COURSE", 126 | "DELICIOUS DISH 1", 127 | "DELICIOUS DISH 2", 128 | "DELICIOUS DISH 3", 129 | "DELICIOUS DISH 4" 130 | ], 131 | "options": {} 132 | }, 133 | "id": "281fee1c-6bc8-4032-824b-7db4d0f08151", 134 | "name": "Airtable", 135 | "type": "n8n-nodes-base.airtable", 136 | "typeVersion": 1, 137 | "position": [ 138 | 1720, 139 | -60 140 | ], 141 | "credentials": { 142 | "airtableApi": { 143 | "id": "35", 144 | "name": "Woakes Airtable" 145 | } 146 | } 147 | }, 148 | { 149 | "parameters": { 150 | "mode": "markdownToHtml", 151 | "markdown": "={{ $json[\"body\"] }}", 152 | "destinationKey": "content", 153 | "options": {} 154 | }, 155 | "id": "22a47419-c7e1-409a-a3c5-1d0e64ae359c", 156 | "name": "Markdown", 157 | "type": "n8n-nodes-base.markdown", 158 | "typeVersion": 1, 159 | "position": [ 160 | 1320, 161 | -60 162 | ] 163 | }, 164 | { 165 | "parameters": { 166 | "jsCode": "// get the markdown content from the previous step\nconst markdown = items[0].json.filecontents;\n\n// split the markdown content into sections based on the headers\nconst sections = markdown.split(/\\n#{1,6}\\s/g);\n\n// extract the title and body from the first section\n// const [title, ...bodyLines] = sections.split(/\\n/);\nconst [title, ...bodyLines] = sections;\nconst body = bodyLines.join('\\n').trim();\n\n// create an array to hold the section objects\nconst sectionObjects = [];\n\n// loop through the remaining sections and create section objects\nfor (let i = 1; i < sections.length; i++) {\n const [sectionTitle, ...sectionBodyLines] = sections[i].split(/\\n/);\n const sectionBody = sectionBodyLines.join('\\n').trim();\n sectionObjects.push({ title: sectionTitle, body: sectionBody });\n}\n\n// return the title, body, and section objects as the output\nreturn [{ json: { title, body, sections: sectionObjects } }];\n" 167 | }, 168 | "id": "31454e42-799e-41ae-8f0c-72871a008f8a", 169 | "name": "Code2", 170 | "type": "n8n-nodes-base.code", 171 | "typeVersion": 1, 172 | "position": [ 173 | 1100, 174 | -60 175 | ] 176 | }, 177 | { 178 | "parameters": { 179 | "jsCode": "// Get the file contents from the input data\nconst fileContents = items[0].json.filecontents;\n\n// Split the file contents into an array of lines\nconst lines = fileContents.split('\\n');\n\n// Remove the first few lines\nlines.splice(0, 3);\n\n// Join the remaining lines back into a single string\nconst newFileContents = lines.join('\\n');\n\n// Set the new file contents as the output\nreturn [{ json: { filecontents: newFileContents.trim() } }];\n" 180 | }, 181 | "id": "27ce2646-6566-431a-8164-de6889da1e51", 182 | "name": "Code1", 183 | "type": "n8n-nodes-base.code", 184 | "typeVersion": 1, 185 | "position": [ 186 | 880, 187 | -60 188 | ] 189 | }, 190 | { 191 | "parameters": { 192 | "setAllData": false, 193 | "destinationKey": "filecontents", 194 | "options": { 195 | "jsonParse": false 196 | } 197 | }, 198 | "id": "1df67c20-6a80-4548-b8f3-e39a7dbd7d8e", 199 | "name": "Move Binary Data", 200 | "type": "n8n-nodes-base.moveBinaryData", 201 | "typeVersion": 1, 202 | "position": [ 203 | 660, 204 | -60 205 | ] 206 | }, 207 | { 208 | "parameters": {}, 209 | "id": "babd84ad-f5c7-4ad6-8b1e-c1bf372939aa", 210 | "name": "When clicking \"Execute Workflow\"", 211 | "type": "n8n-nodes-base.manualTrigger", 212 | "typeVersion": 1, 213 | "position": [ 214 | -200, 215 | -40 216 | ] 217 | }, 218 | { 219 | "parameters": { 220 | "operation": "download", 221 | "fileId": { 222 | "__rl": true, 223 | "value": "={{ $node[\"Google Drive\"].json[\"id\"] }}", 224 | "mode": "id" 225 | }, 226 | "options": {} 227 | }, 228 | "id": "118e611a-7471-4f7a-aa4e-de0f55a9a907", 229 | "name": "Google Drive2", 230 | "type": "n8n-nodes-base.googleDrive", 231 | "typeVersion": 2, 232 | "position": [ 233 | 440, 234 | -60 235 | ], 236 | "credentials": { 237 | "googleDriveOAuth2Api": { 238 | "id": "42", 239 | "name": "Woakes070048 Google Drive account" 240 | } 241 | } 242 | }, 243 | { 244 | "parameters": { 245 | "operation": "update", 246 | "fileId": { 247 | "__rl": true, 248 | "value": "={{ $node[\"Google Drive2\"].json[\"id\"] }}", 249 | "mode": "id" 250 | }, 251 | "updateFields": { 252 | "fileName": "=published-{{ $node[\"Google Drive2\"].json[\"name\"] }}", 253 | "parentId": "Your Folder ID" 254 | }, 255 | "options": {} 256 | }, 257 | "id": "9ba1fbf7-405a-4089-911a-4a4addbec98b", 258 | "name": "Google Drive1", 259 | "type": "n8n-nodes-base.googleDrive", 260 | "typeVersion": 2, 261 | "position": [ 262 | 1940, 263 | -60 264 | ], 265 | "credentials": { 266 | "googleDriveOAuth2Api": { 267 | "id": "42", 268 | "name": "Woakes070048 Google Drive account" 269 | } 270 | } 271 | }, 272 | { 273 | "parameters": { 274 | "options": {} 275 | }, 276 | "id": "6bae5813-e27b-47bb-8f5d-4e99a807439d", 277 | "name": "Split In Batches", 278 | "type": "n8n-nodes-base.splitInBatches", 279 | "typeVersion": 2, 280 | "position": [ 281 | 200, 282 | -40 283 | ] 284 | }, 285 | { 286 | "parameters": { 287 | "conditions": { 288 | "boolean": [ 289 | { 290 | "value1": true, 291 | "value2": "={{$node[\"SplitInBatches1\"].context[\"noItemsLeft\"]}}" 292 | } 293 | ] 294 | } 295 | }, 296 | "id": "82ab4718-77cb-49e1-92c7-ea3c1e98b14a", 297 | "name": "IF1", 298 | "type": "n8n-nodes-base.if", 299 | "typeVersion": 1, 300 | "position": [ 301 | 2320, 302 | 120 303 | ] 304 | }, 305 | { 306 | "parameters": {}, 307 | "id": "7cad63ae-8e6e-4f8b-8162-b4df871da246", 308 | "name": "No Operation, do nothing1", 309 | "type": "n8n-nodes-base.noOp", 310 | "typeVersion": 1, 311 | "position": [ 312 | 2580, 313 | -240 314 | ] 315 | } 316 | ], 317 | "pinData": {}, 318 | "connections": { 319 | "Google Drive": { 320 | "main": [ 321 | [ 322 | { 323 | "node": "Split In Batches", 324 | "type": "main", 325 | "index": 0 326 | } 327 | ] 328 | ] 329 | }, 330 | "Set": { 331 | "main": [ 332 | [ 333 | { 334 | "node": "Airtable", 335 | "type": "main", 336 | "index": 0 337 | } 338 | ] 339 | ] 340 | }, 341 | "Airtable": { 342 | "main": [ 343 | [ 344 | { 345 | "node": "Google Drive1", 346 | "type": "main", 347 | "index": 0 348 | } 349 | ] 350 | ] 351 | }, 352 | "Markdown": { 353 | "main": [ 354 | [ 355 | { 356 | "node": "Set", 357 | "type": "main", 358 | "index": 0 359 | } 360 | ] 361 | ] 362 | }, 363 | "Code2": { 364 | "main": [ 365 | [ 366 | { 367 | "node": "Markdown", 368 | "type": "main", 369 | "index": 0 370 | } 371 | ] 372 | ] 373 | }, 374 | "Code1": { 375 | "main": [ 376 | [ 377 | { 378 | "node": "Code2", 379 | "type": "main", 380 | "index": 0 381 | } 382 | ] 383 | ] 384 | }, 385 | "Move Binary Data": { 386 | "main": [ 387 | [ 388 | { 389 | "node": "Code1", 390 | "type": "main", 391 | "index": 0 392 | } 393 | ] 394 | ] 395 | }, 396 | "When clicking \"Execute Workflow\"": { 397 | "main": [ 398 | [ 399 | { 400 | "node": "Google Drive", 401 | "type": "main", 402 | "index": 0 403 | } 404 | ] 405 | ] 406 | }, 407 | "Google Drive2": { 408 | "main": [ 409 | [ 410 | { 411 | "node": "Move Binary Data", 412 | "type": "main", 413 | "index": 0 414 | } 415 | ] 416 | ] 417 | }, 418 | "Split In Batches": { 419 | "main": [ 420 | [ 421 | { 422 | "node": "Google Drive2", 423 | "type": "main", 424 | "index": 0 425 | } 426 | ] 427 | ] 428 | }, 429 | "IF1": { 430 | "main": [ 431 | [ 432 | { 433 | "node": "No Operation, do nothing1", 434 | "type": "main", 435 | "index": 0 436 | } 437 | ], 438 | [ 439 | { 440 | "node": "Split In Batches", 441 | "type": "main", 442 | "index": 0 443 | } 444 | ] 445 | ] 446 | }, 447 | "Google Drive1": { 448 | "main": [ 449 | [ 450 | { 451 | "node": "IF1", 452 | "type": "main", 453 | "index": 0 454 | } 455 | ] 456 | ] 457 | } 458 | }, 459 | "active": false, 460 | "settings": {}, 461 | "versionId": "f43b57ec-5e53-45ea-81f9-97d8fe779a83", 462 | "id": "208", 463 | "meta": { 464 | "instanceId": "7bfea076db05271bda3779ae68f8c25c7bf6ab9038c7c740cee303eb9b445dd4" 465 | }, 466 | "tags": [ 467 | { 468 | "createdAt": "2023-03-09T01:07:55.955Z", 469 | "updatedAt": "2023-03-09T01:07:55.955Z", 470 | "id": "19", 471 | "name": "Google Drive" 472 | }, 473 | { 474 | "createdAt": "2023-04-01T08:59:11.354Z", 475 | "updatedAt": "2023-04-01T08:59:11.354Z", 476 | "id": "34", 477 | "name": "ReadyToTest" 478 | }, 479 | { 480 | "createdAt": "2023-04-14T23:06:43.892Z", 481 | "updatedAt": "2023-04-14T23:06:43.892Z", 482 | "id": "39", 483 | "name": "Zimm Course" 484 | } 485 | ] 486 | } -------------------------------------------------------------------------------- /_Section_Test__Local_Buffer__AI_Blog_Publisher_Drive.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "[Section Test] Local Buffer- AI Blog Publisher Drive", 3 | "nodes": [ 4 | { 5 | "parameters": { 6 | "operation": "list", 7 | "useQueryString": true, 8 | "queryString": "\"1T4D655E6yoI2XpFsg40Q2xGbNgWD-tnK\" in parents", 9 | "limit": 1000, 10 | "options": {} 11 | }, 12 | "id": "2669d68d-92ef-4bee-92dc-77b0272aa8b6", 13 | "name": "Google Drive", 14 | "type": "n8n-nodes-base.googleDrive", 15 | "typeVersion": 2, 16 | "position": [ 17 | 0, 18 | 300 19 | ], 20 | "credentials": { 21 | "googleDriveOAuth2Api": { 22 | "id": "42", 23 | "name": "Woakes070048 Google Drive account" 24 | } 25 | } 26 | }, 27 | { 28 | "parameters": { 29 | "values": { 30 | "string": [ 31 | { 32 | "name": "Topic Title", 33 | "value": "={{ $json[\"title\"] }}" 34 | }, 35 | { 36 | "name": "META TITLE", 37 | "value": "={{ $json[\"sections\"][0][\"body\"] }}" 38 | }, 39 | { 40 | "name": "META DESCRIPTION", 41 | "value": "={{ $json[\"sections\"][1][\"body\"] }}" 42 | }, 43 | { 44 | "name": "FIZZY TLDR", 45 | "value": "={{ $json[\"sections\"][2][\"body\"] }}" 46 | }, 47 | { 48 | "name": "SPICY LIST OF FEATURES", 49 | "value": "={{ $json[\"sections\"][3][\"body\"] }}" 50 | }, 51 | { 52 | "name": "JUICY TAGLINE AND CALL TO ACTION", 53 | "value": "={{ $json[\"sections\"][4][\"body\"] }}" 54 | }, 55 | { 56 | "name": "TASTY HOW CAN WE HELP", 57 | "value": "={{ $json[\"sections\"][5][\"body\"] }}" 58 | }, 59 | { 60 | "name": "SNACK ON WHY US", 61 | "value": "={{ $json[\"sections\"][6][\"body\"] }}" 62 | }, 63 | { 64 | "name": "LOAD UP ON SOME FAQS", 65 | "value": "={{ $json[\"sections\"][7][\"body\"] }}" 66 | }, 67 | { 68 | "name": "FOUR DISH MAIN COURSE" 69 | }, 70 | { 71 | "name": "DELICIOUS DISH 1", 72 | "value": "={{ $json[\"sections\"][9][\"body\"] }}" 73 | }, 74 | { 75 | "name": "DELICIOUS DISH 2", 76 | "value": "={{ $json[\"sections\"][10][\"body\"] }}" 77 | }, 78 | { 79 | "name": "DELICIOUS DISH 4", 80 | "value": "={{ $json[\"sections\"][11][\"body\"] }}" 81 | }, 82 | { 83 | "name": "DELICIOUS DISH 3", 84 | "value": "={{ $json[\"sections\"][12][\"body\"] }}" 85 | } 86 | ] 87 | }, 88 | "options": {} 89 | }, 90 | "id": "d28787f7-237d-4e3d-bd96-6e403d384e41", 91 | "name": "Set", 92 | "type": "n8n-nodes-base.set", 93 | "typeVersion": 1, 94 | "position": [ 95 | 1560, 96 | 300 97 | ] 98 | }, 99 | { 100 | "parameters": { 101 | "operation": "append", 102 | "application": { 103 | "__rl": true, 104 | "value": "https://airtable.com/appSnEm8veakJahJF/tbltowPcMQEjLgYPi", 105 | "mode": "url", 106 | "__regex": "https://airtable.com/([a-zA-Z0-9]{2,})" 107 | }, 108 | "table": { 109 | "__rl": true, 110 | "value": "https://airtable.com/appSnEm8veakJahJF/tbltowPcMQEjLgYPi/viwS5rhYHM2R5hCDc", 111 | "mode": "url", 112 | "__regex": "https://airtable.com/[a-zA-Z0-9]{2,}/([a-zA-Z0-9]{2,})" 113 | }, 114 | "addAllFields": false, 115 | "fields": [ 116 | "Topic Title", 117 | "META TITLE", 118 | "META DESCRIPTION", 119 | "FIZZY TLDR", 120 | "SPICY LIST OF FEATURES", 121 | "JUICY TAGLINE AND CALL TO ACTION", 122 | "TASTY HOW CAN WE HELP", 123 | "SNACK ON WHY US", 124 | "LOAD UP ON SOME FAQS", 125 | "FOUR DISH MAIN COURSE", 126 | "DELICIOUS DISH 1", 127 | "DELICIOUS DISH 2", 128 | "DELICIOUS DISH 3", 129 | "DELICIOUS DISH 4" 130 | ], 131 | "options": {} 132 | }, 133 | "id": "203d484e-e9d8-4875-abf4-7657e2662d3a", 134 | "name": "Airtable", 135 | "type": "n8n-nodes-base.airtable", 136 | "typeVersion": 1, 137 | "position": [ 138 | 1860, 139 | 300 140 | ], 141 | "credentials": { 142 | "airtableApi": { 143 | "id": "35", 144 | "name": "Woakes Airtable" 145 | } 146 | } 147 | }, 148 | { 149 | "parameters": {}, 150 | "id": "ba7c0f22-a315-4668-8798-33233d908c2b", 151 | "name": "No Operation, do nothing1", 152 | "type": "n8n-nodes-base.noOp", 153 | "typeVersion": 1, 154 | "position": [ 155 | 2640, 156 | 160 157 | ] 158 | }, 159 | { 160 | "parameters": { 161 | "conditions": { 162 | "boolean": [ 163 | { 164 | "value1": true, 165 | "value2": "={{$node[\"SplitInBatches1\"].context[\"noItemsLeft\"]}}" 166 | } 167 | ] 168 | } 169 | }, 170 | "id": "220ddb1b-328a-4079-9bf7-33defddbe680", 171 | "name": "IF1", 172 | "type": "n8n-nodes-base.if", 173 | "typeVersion": 1, 174 | "position": [ 175 | 2460, 176 | 300 177 | ] 178 | }, 179 | { 180 | "parameters": { 181 | "batchSize": 1, 182 | "options": {} 183 | }, 184 | "id": "d2657d45-9aeb-4adf-b4c2-1a6794e2c4bd", 185 | "name": "SplitInBatches1", 186 | "type": "n8n-nodes-base.splitInBatches", 187 | "typeVersion": 1, 188 | "position": [ 189 | 240, 190 | 300 191 | ] 192 | }, 193 | { 194 | "parameters": { 195 | "mode": "markdownToHtml", 196 | "markdown": "={{ $json[\"body\"] }}", 197 | "destinationKey": "content", 198 | "options": {} 199 | }, 200 | "id": "05d6f64e-6158-44b5-92e0-92619f0941ec", 201 | "name": "Markdown", 202 | "type": "n8n-nodes-base.markdown", 203 | "typeVersion": 1, 204 | "position": [ 205 | 1340, 206 | 300 207 | ] 208 | }, 209 | { 210 | "parameters": { 211 | "jsCode": "// get the markdown content from the previous step\nconst markdown = items[0].json.filecontents;\n\n// split the markdown content into sections based on the headers\nconst sections = markdown.split(/\\n#{1,6}\\s/g);\n\n// extract the title and body from the first section\nconst [title, ...bodyLines] = sections[0].split(/\\n/);\nconst body = bodyLines.join('\\n').trim();\n\n// create an array to hold the section objects\nconst sectionObjects = [];\n\n// loop through the remaining sections and create section objects\nfor (let i = 1; i < sections.length; i++) {\n const [sectionTitle, ...sectionBodyLines] = sections[i].split(/\\n/);\n const sectionBody = sectionBodyLines.join('\\n').trim();\n sectionObjects.push({ title: sectionTitle, body: sectionBody });\n}\n\n// return the title, body, and section objects as the output\nreturn [{ json: { title, body, sections: sectionObjects } }];\n" 212 | }, 213 | "id": "19fa9497-265b-49f0-8d8e-9e33c0c1241b", 214 | "name": "Code2", 215 | "type": "n8n-nodes-base.code", 216 | "typeVersion": 1, 217 | "position": [ 218 | 1060, 219 | 300 220 | ] 221 | }, 222 | { 223 | "parameters": { 224 | "jsCode": "// Get the file contents from the input data\nconst fileContents = items[0].json.filecontents;\n\n// Split the file contents into an array of lines\nconst lines = fileContents.split('\\n');\n\n// Remove the first 2 lines\nlines.splice(0, 2);\n\n// Join the remaining lines back into a single string\nconst newFileContents = lines.join('\\n');\n\n// Set the new file contents as the output\nreturn [{ json: { filecontents: newFileContents } }];\n" 225 | }, 226 | "id": "00275785-a2e4-4629-b5ac-6a8da6281c93", 227 | "name": "Code1", 228 | "type": "n8n-nodes-base.code", 229 | "typeVersion": 1, 230 | "position": [ 231 | 860, 232 | 300 233 | ] 234 | }, 235 | { 236 | "parameters": { 237 | "setAllData": false, 238 | "destinationKey": "filecontents", 239 | "options": { 240 | "jsonParse": false 241 | } 242 | }, 243 | "id": "f8f72bc1-0732-4cc8-9181-bdc2f185f455", 244 | "name": "Move Binary Data", 245 | "type": "n8n-nodes-base.moveBinaryData", 246 | "typeVersion": 1, 247 | "position": [ 248 | 680, 249 | 300 250 | ] 251 | }, 252 | { 253 | "parameters": {}, 254 | "id": "0d493214-dcd9-4636-b71d-b01d6d41cc6d", 255 | "name": "When clicking \"Execute Workflow\"", 256 | "type": "n8n-nodes-base.manualTrigger", 257 | "typeVersion": 1, 258 | "position": [ 259 | -220, 260 | 300 261 | ] 262 | }, 263 | { 264 | "parameters": { 265 | "operation": "download", 266 | "fileId": { 267 | "__rl": true, 268 | "value": "={{ $node[\"Google Drive\"].json[\"id\"] }}", 269 | "mode": "id" 270 | }, 271 | "options": {} 272 | }, 273 | "id": "5eb9f2d3-09eb-49d8-a1ff-4b75bc8d0fb1", 274 | "name": "Google Drive2", 275 | "type": "n8n-nodes-base.googleDrive", 276 | "typeVersion": 2, 277 | "position": [ 278 | 460, 279 | 300 280 | ], 281 | "credentials": { 282 | "googleDriveOAuth2Api": { 283 | "id": "42", 284 | "name": "Woakes070048 Google Drive account" 285 | } 286 | } 287 | }, 288 | { 289 | "parameters": { 290 | "operation": "move", 291 | "path": "={{ $node[\"Nextcloud1\"].json[\"path\"] }}", 292 | "toPath": "=/Mainly_Tiny_Home/Website/Published/{{ $json[\"title\"][\"rendered\"] }} Published.txt" 293 | }, 294 | "id": "975f0431-b3fa-4435-ae66-9a83a970557e", 295 | "name": "Nextcloud", 296 | "type": "n8n-nodes-base.nextCloud", 297 | "typeVersion": 1, 298 | "position": [ 299 | 2440, 300 | -320 301 | ], 302 | "credentials": { 303 | "nextCloudApi": { 304 | "id": "8", 305 | "name": "NextCloud account" 306 | } 307 | } 308 | }, 309 | { 310 | "parameters": { 311 | "operation": "update", 312 | "fileId": { 313 | "__rl": true, 314 | "value": "={{ $node[\"Google Drive2\"].json[\"id\"] }}", 315 | "mode": "id" 316 | }, 317 | "updateFields": { 318 | "fileName": "=published-{{ $node[\"Google Drive2\"].json[\"name\"] }}", 319 | "parentId": "1kvPq8AsywMP7BP99a9kQ8aXHCC9h2tMI" 320 | }, 321 | "options": {} 322 | }, 323 | "id": "5efc910f-f0e5-4144-b7c3-c9a673ff0d84", 324 | "name": "Google Drive1", 325 | "type": "n8n-nodes-base.googleDrive", 326 | "typeVersion": 2, 327 | "position": [ 328 | 2080, 329 | 300 330 | ], 331 | "credentials": { 332 | "googleDriveOAuth2Api": { 333 | "id": "42", 334 | "name": "Woakes070048 Google Drive account" 335 | } 336 | } 337 | } 338 | ], 339 | "pinData": {}, 340 | "connections": { 341 | "Google Drive": { 342 | "main": [ 343 | [ 344 | { 345 | "node": "SplitInBatches1", 346 | "type": "main", 347 | "index": 0 348 | } 349 | ] 350 | ] 351 | }, 352 | "Set": { 353 | "main": [ 354 | [ 355 | { 356 | "node": "Airtable", 357 | "type": "main", 358 | "index": 0 359 | } 360 | ] 361 | ] 362 | }, 363 | "IF1": { 364 | "main": [ 365 | [ 366 | { 367 | "node": "No Operation, do nothing1", 368 | "type": "main", 369 | "index": 0 370 | } 371 | ], 372 | [ 373 | { 374 | "node": "SplitInBatches1", 375 | "type": "main", 376 | "index": 0 377 | } 378 | ] 379 | ] 380 | }, 381 | "Airtable": { 382 | "main": [ 383 | [ 384 | { 385 | "node": "Google Drive1", 386 | "type": "main", 387 | "index": 0 388 | } 389 | ] 390 | ] 391 | }, 392 | "Markdown": { 393 | "main": [ 394 | [ 395 | { 396 | "node": "Set", 397 | "type": "main", 398 | "index": 0 399 | } 400 | ] 401 | ] 402 | }, 403 | "Code2": { 404 | "main": [ 405 | [ 406 | { 407 | "node": "Markdown", 408 | "type": "main", 409 | "index": 0 410 | } 411 | ] 412 | ] 413 | }, 414 | "Code1": { 415 | "main": [ 416 | [ 417 | { 418 | "node": "Code2", 419 | "type": "main", 420 | "index": 0 421 | } 422 | ] 423 | ] 424 | }, 425 | "Move Binary Data": { 426 | "main": [ 427 | [ 428 | { 429 | "node": "Code1", 430 | "type": "main", 431 | "index": 0 432 | } 433 | ] 434 | ] 435 | }, 436 | "SplitInBatches1": { 437 | "main": [ 438 | [ 439 | { 440 | "node": "Google Drive2", 441 | "type": "main", 442 | "index": 0 443 | } 444 | ] 445 | ] 446 | }, 447 | "When clicking \"Execute Workflow\"": { 448 | "main": [ 449 | [ 450 | { 451 | "node": "Google Drive", 452 | "type": "main", 453 | "index": 0 454 | } 455 | ] 456 | ] 457 | }, 458 | "Google Drive2": { 459 | "main": [ 460 | [ 461 | { 462 | "node": "Move Binary Data", 463 | "type": "main", 464 | "index": 0 465 | } 466 | ] 467 | ] 468 | }, 469 | "Google Drive1": { 470 | "main": [ 471 | [ 472 | { 473 | "node": "IF1", 474 | "type": "main", 475 | "index": 0 476 | } 477 | ] 478 | ] 479 | } 480 | }, 481 | "active": false, 482 | "settings": {}, 483 | "versionId": "97a5e6c7-94c3-4b51-b52b-19d20cd6ea10", 484 | "id": "77", 485 | "meta": { 486 | "instanceId": "7bfea076db05271bda3779ae68f8c25c7bf6ab9038c7c740cee303eb9b445dd4" 487 | }, 488 | "tags": [ 489 | { 490 | "createdAt": "2023-03-03T12:34:50.900Z", 491 | "updatedAt": "2023-03-03T12:34:50.900Z", 492 | "id": "7", 493 | "name": "Mainly Tiny Homes" 494 | } 495 | ] 496 | } -------------------------------------------------------------------------------- /Ultimate_Zimmwriter__Google_Drive__WordPress_Workflow_For_Export.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Ultimate Zimmwriter, Google Drive, WordPress Workflow For Export", 3 | "nodes": [ 4 | { 5 | "parameters": { 6 | "mode": "markdownToHtml", 7 | "markdown": "={{ $json.body }}", 8 | "destinationKey": "content", 9 | "options": { 10 | "noHeaderId": true, 11 | "tablesHeaderId": true, 12 | "tables": true 13 | } 14 | }, 15 | "id": "74ef11e9-620f-43f1-9aa7-f7ddbbe3d8c1", 16 | "name": "Markdown", 17 | "type": "n8n-nodes-base.markdown", 18 | "typeVersion": 1, 19 | "position": [ 20 | -620, 21 | 900 22 | ] 23 | }, 24 | { 25 | "parameters": { 26 | "mode": "runOnceForEachItem", 27 | "jsCode": "// Get the file contents from the input data\nconst fileContents = $input.item.json.filecontents;\n\n// Split the file contents into an array of lines\nconst lines = fileContents.split('\\n');\n\n// Remove the first 9 lines\nlines.splice(0, 9);\n\n// Join the remaining lines back into a single string\nconst newFileContents = lines.join('\\n');\n\n// Set the new file contents as the output\n// return [{ json: { filecontents: newFileContents } }];\nreturn { json: { filecontents: newFileContents.trim() } };\n" 28 | }, 29 | "id": "231dd2a5-320e-4ab4-9e60-70a9a2b8710c", 30 | "name": "Code1", 31 | "type": "n8n-nodes-base.code", 32 | "typeVersion": 1, 33 | "position": [ 34 | -1160, 35 | 680 36 | ] 37 | }, 38 | { 39 | "parameters": { 40 | "setAllData": false, 41 | "destinationKey": "filecontents", 42 | "options": { 43 | "jsonParse": false 44 | } 45 | }, 46 | "id": "5def8a5b-f4fe-43d7-af3d-f045c76bffe1", 47 | "name": "Move Binary Data", 48 | "type": "n8n-nodes-base.moveBinaryData", 49 | "typeVersion": 1, 50 | "position": [ 51 | -1860, 52 | 900 53 | ] 54 | }, 55 | { 56 | "parameters": { 57 | "operation": "download", 58 | "fileId": { 59 | "__rl": true, 60 | "value": "={{ $json.id }}", 61 | "mode": "id" 62 | }, 63 | "options": {} 64 | }, 65 | "id": "cbf45217-aa71-4dfd-9ef2-137cf2007b01", 66 | "name": "Google Drive2", 67 | "type": "n8n-nodes-base.googleDrive", 68 | "typeVersion": 2, 69 | "position": [ 70 | -2040, 71 | 900 72 | ], 73 | "credentials": { 74 | "googleDriveOAuth2Api": { 75 | "id": "42", 76 | "name": "Woakes070048 Google Drive account" 77 | } 78 | } 79 | }, 80 | { 81 | "parameters": { 82 | "operation": "update", 83 | "fileId": { 84 | "__rl": true, 85 | "value": "={{ $node[\"Google Drive2\"].json[\"id\"] }}", 86 | "mode": "id" 87 | }, 88 | "updateFields": { 89 | "fileName": "=published-{{ $node[\"Google Drive2\"].json.name }}", 90 | "parentId": "Enter Your Published Folder" 91 | }, 92 | "options": {} 93 | }, 94 | "id": "b1559c9b-fe3b-4390-b157-6c403b17335e", 95 | "name": "Google Drive1", 96 | "type": "n8n-nodes-base.googleDrive", 97 | "typeVersion": 2, 98 | "position": [ 99 | 1900, 100 | 920 101 | ], 102 | "credentials": { 103 | "googleDriveOAuth2Api": { 104 | "id": "42", 105 | "name": "Woakes070048 Google Drive account" 106 | } 107 | } 108 | }, 109 | { 110 | "parameters": { 111 | "operation": "list", 112 | "useQueryString": true, 113 | "queryString": "\"Enter Your Upload Folder\" in parents", 114 | "options": {} 115 | }, 116 | "id": "e13c3aa1-bc8c-482d-bc2a-72a34e0ae052", 117 | "name": "Google Drive3", 118 | "type": "n8n-nodes-base.googleDrive", 119 | "typeVersion": 2, 120 | "position": [ 121 | -2420, 122 | 920 123 | ], 124 | "credentials": { 125 | "googleDriveOAuth2Api": { 126 | "id": "42", 127 | "name": "Woakes070048 Google Drive account" 128 | } 129 | } 130 | }, 131 | { 132 | "parameters": {}, 133 | "id": "ff5fc443-8119-48f2-b9a2-84139496a504", 134 | "name": "When clicking \"Execute Workflow\"", 135 | "type": "n8n-nodes-base.manualTrigger", 136 | "typeVersion": 1, 137 | "position": [ 138 | -2660, 139 | 620 140 | ] 141 | }, 142 | { 143 | "parameters": { 144 | "resource": "chat", 145 | "prompt": { 146 | "messages": [ 147 | { 148 | "content": "=I want you to categorize this blog post \"{{ $json.title }}\" based on those categories. You can only choose 1: \n\nBPM = \"2\"\nChatGPT = \"3508\"\nCloud = \"3\"\nCommunication = \"5\"\nCybersecurity = \"3509\"\nDigital Marketing = \"7\"\nDocument Management = \"8\"\nEcommerce = \"9\"\nEmail = \"10\"\nEmail Marketing = \"3451\"\nERP = \"11\"\nHow To Guides = \"3440\"\nHow To Market = \"12\"\nHRM = \"13\"\nIncreased Efficiency = \"14\"\nIT Consulting = \"15\"\nManaged IT Services = \"16\"\nMarketing = \"3506\"\nNetworking = \"17\"\nOpen Source = \"18\"\nPhone Systems = \"19\"\nSecurity = \"20\"\nSelf-Hosting = \"3441\"\nSocial Media Marketing = \"3488\"\nSoftware Solutions = \"21\"\nSupport = \"22\"\nSysadmin = \"3439\"\nVirtualization = \"23\"\nVOIP = \"24\"\nWeb Services = \"25\"\nWebsites = \"26\"\nData Analytics = \"3514\"\nBranding = \"3515\"\nAffiliate Marketing = \"3516\"\nInfluencer Marketing = \"3517\"\nWordPress = \"3518\"\nMarketing Automation = \"3519\"\nNo Code Automation = \"3520\"\nAutomation = \"3521\"\nContent Marketing = \"3522\"\nOnline Reputation Management = \"3523\"\nSearch Engine Optimization = \"3524\"\nAnalytics and Reporting = \"3525\"\n\nMobile Marketing = \"3526\"\nVideo Marketing = \"3527\"\nPay-Per-Click (PPC) Advertising = \"3528\"\nConversion Rate Optimization = \"3529\"\nPodcast Marketing = \"3530\"\nAccount-Based Marketing = \"3531\"\nEvent Marketing = \"3532\"\nSMS Marketing = \"3533\"\nPublic Relations (PR) = \"3534\"\nNative Advertising = \"3535\"\nGrowth Hacking = \"3536\"\n\nNow the only reponse that i want is the number in the \"\". Do not any thing other the the number. I dont want the categroy only the number. Do not add \"Category:\". I only want the number in the \"\". Do not add quotations to the number. All we want is the number." 149 | } 150 | ] 151 | }, 152 | "options": {} 153 | }, 154 | "id": "fc604c30-30e8-493c-bf30-1e3ca6d077b9", 155 | "name": "OpenAI", 156 | "type": "n8n-nodes-base.openAi", 157 | "typeVersion": 1, 158 | "position": [ 159 | -380, 160 | 1220 161 | ], 162 | "credentials": { 163 | "openAiApi": { 164 | "id": "27", 165 | "name": "OpenAi account" 166 | } 167 | }, 168 | "continueOnFail": true 169 | }, 170 | { 171 | "parameters": { 172 | "mode": "combine", 173 | "combinationMode": "multiplex", 174 | "options": {} 175 | }, 176 | "id": "221ae7c9-e788-4d8d-a4b2-ef74753441eb", 177 | "name": "Merge", 178 | "type": "n8n-nodes-base.merge", 179 | "typeVersion": 2, 180 | "position": [ 181 | 760, 182 | 940 183 | ] 184 | }, 185 | { 186 | "parameters": { 187 | "mode": "combine", 188 | "combinationMode": "multiplex", 189 | "options": {} 190 | }, 191 | "id": "fcd64ad0-cd80-4c37-b1a4-755e723c1088", 192 | "name": "Merge1", 193 | "type": "n8n-nodes-base.merge", 194 | "typeVersion": 2, 195 | "position": [ 196 | 1460, 197 | 920 198 | ] 199 | }, 200 | { 201 | "parameters": { 202 | "method": "PUT", 203 | "url": "=https://yourdomainname.com/wp-json/wp/v2/posts/{{ $json.id }}", 204 | "authentication": "predefinedCredentialType", 205 | "nodeCredentialType": "wordpressApi", 206 | "sendQuery": true, 207 | "specifyQuery": "json", 208 | "jsonQuery": "={\n\"featured_media\": {{ $json.imageid }}\n}", 209 | "options": {} 210 | }, 211 | "id": "c4fad96c-c31e-46de-899b-4fe7de9401a3", 212 | "name": "HTTP Request", 213 | "type": "n8n-nodes-base.httpRequest", 214 | "typeVersion": 3, 215 | "position": [ 216 | 1680, 217 | 920 218 | ], 219 | "credentials": { 220 | "wordpressApi": { 221 | "id": "34", 222 | "name": "Pegas.io Wordpress account" 223 | } 224 | }, 225 | "continueOnFail": true 226 | }, 227 | { 228 | "parameters": { 229 | "title": "={{ $json.title }}", 230 | "additionalFields": { 231 | "authorId": 6, 232 | "content": "={{ $json.content }}", 233 | "status": "draft", 234 | "categories": "={{ $json.category }}" 235 | } 236 | }, 237 | "id": "7190da1f-c2e1-49ab-bb66-a2265c44d1af", 238 | "name": "Wordpress", 239 | "type": "n8n-nodes-base.wordpress", 240 | "typeVersion": 1, 241 | "position": [ 242 | 980, 243 | 940 244 | ], 245 | "credentials": { 246 | "wordpressApi": { 247 | "id": "34", 248 | "name": "Pegas.io Wordpress account" 249 | } 250 | }, 251 | "continueOnFail": true 252 | }, 253 | { 254 | "parameters": { 255 | "keepOnlySet": true, 256 | "values": { 257 | "string": [ 258 | { 259 | "name": "title", 260 | "value": "={{ $json.title }}" 261 | }, 262 | { 263 | "name": "content", 264 | "value": "= {{ $json.content }} {{ $json.videourl }} " 265 | } 266 | ] 267 | }, 268 | "options": {} 269 | }, 270 | "id": "ea519cda-1967-469b-949e-9eedf37f4ad8", 271 | "name": "Set3", 272 | "type": "n8n-nodes-base.set", 273 | "typeVersion": 1, 274 | "position": [ 275 | 480, 276 | 920 277 | ] 278 | }, 279 | { 280 | "parameters": { 281 | "url": "https://www.googleapis.com/youtube/v3/search", 282 | "sendQuery": true, 283 | "queryParameters": { 284 | "parameters": [ 285 | { 286 | "name": "key", 287 | "value": "Your API Key" 288 | }, 289 | { 290 | "name": "part", 291 | "value": "snippet" 292 | }, 293 | { 294 | "name": "type", 295 | "value": "video" 296 | }, 297 | { 298 | "name": "q", 299 | "value": "={{ $json.message.content }}" 300 | } 301 | ] 302 | }, 303 | "options": {} 304 | }, 305 | "id": "9c604014-8244-4cd6-8de9-fc206da59c2a", 306 | "name": "HTTP Request1", 307 | "type": "n8n-nodes-base.httpRequest", 308 | "typeVersion": 3, 309 | "position": [ 310 | -180, 311 | 1020 312 | ] 313 | }, 314 | { 315 | "parameters": { 316 | "keepOnlySet": true, 317 | "values": { 318 | "string": [ 319 | { 320 | "name": "videourl", 321 | "value": "=\n
\n
https://www.youtube.com/watch?v=8dXVuc1-9Ds
\n
\n" 322 | } 323 | ] 324 | }, 325 | "options": {} 326 | }, 327 | "id": "4633a252-b725-4a65-8e6e-4b2041ba58b8", 328 | "name": "Set Video URL", 329 | "type": "n8n-nodes-base.set", 330 | "typeVersion": 1, 331 | "position": [ 332 | 0, 333 | 1020 334 | ] 335 | }, 336 | { 337 | "parameters": { 338 | "mode": "combine", 339 | "combinationMode": "multiplex", 340 | "options": {} 341 | }, 342 | "id": "43dc9034-ea9b-4357-9ee1-aaf9f8810240", 343 | "name": "Merge2", 344 | "type": "n8n-nodes-base.merge", 345 | "typeVersion": 2, 346 | "position": [ 347 | 260, 348 | 920 349 | ] 350 | }, 351 | { 352 | "parameters": { 353 | "keepOnlySet": true, 354 | "values": { 355 | "string": [ 356 | { 357 | "name": "category", 358 | "value": "={{ $json.message.content }}" 359 | } 360 | ] 361 | }, 362 | "options": {} 363 | }, 364 | "id": "972e62d9-49af-4f34-848b-68dc2ad4a9ed", 365 | "name": "Set", 366 | "type": "n8n-nodes-base.set", 367 | "typeVersion": 1, 368 | "position": [ 369 | -160, 370 | 1220 371 | ] 372 | }, 373 | { 374 | "parameters": { 375 | "keepOnlySet": true, 376 | "values": { 377 | "string": [ 378 | { 379 | "name": "Image1", 380 | "value": "={{ $json.Image1 }}" 381 | } 382 | ] 383 | }, 384 | "options": { 385 | "dotNotation": true 386 | } 387 | }, 388 | "id": "d27f9353-38c7-40e6-9736-003ea9da72f7", 389 | "name": "Set1", 390 | "type": "n8n-nodes-base.set", 391 | "typeVersion": 1, 392 | "position": [ 393 | 420, 394 | 680 395 | ] 396 | }, 397 | { 398 | "parameters": { 399 | "url": "https://pixabay.com/api/", 400 | "sendQuery": true, 401 | "queryParameters": { 402 | "parameters": [ 403 | { 404 | "name": "key", 405 | "value": "=Your API Key" 406 | }, 407 | { 408 | "name": "q", 409 | "value": "={{ $json.message.content }}" 410 | }, 411 | { 412 | "name": "image_type", 413 | "value": "photo" 414 | }, 415 | {} 416 | ] 417 | }, 418 | "options": {} 419 | }, 420 | "id": "856b0f6e-c47f-4191-bffc-1597bb303e86", 421 | "name": "Pixabay HTTP Request1", 422 | "type": "n8n-nodes-base.httpRequest", 423 | "typeVersion": 3, 424 | "position": [ 425 | -180, 426 | 700 427 | ], 428 | "alwaysOutputData": true 429 | }, 430 | { 431 | "parameters": { 432 | "keepOnlySet": true, 433 | "values": { 434 | "string": [ 435 | { 436 | "name": "Image1", 437 | "value": "={{ $json.hits[0].largeImageURL }}" 438 | } 439 | ] 440 | }, 441 | "options": {} 442 | }, 443 | "id": "004ebdca-9057-4151-8baf-3c4ea69b0706", 444 | "name": "Set Pixabay Image URL1", 445 | "type": "n8n-nodes-base.set", 446 | "typeVersion": 1, 447 | "position": [ 448 | 0, 449 | 700 450 | ] 451 | }, 452 | { 453 | "parameters": { 454 | "resource": "chat", 455 | "prompt": { 456 | "messages": [ 457 | { 458 | "content": "=give me a single \"3 to 4-word search phrase for an image\" based on this:{{ $json.title }}. I dont want any plus, minus, quotations, or parentheses. Do not include Maine. Do not use the product name like \"mautic, ERPNext, etc\", company name like \"yourbrandname\"" 459 | } 460 | ] 461 | }, 462 | "options": { 463 | "maxTokens": 2500, 464 | "n": 1 465 | } 466 | }, 467 | "id": "2782481a-e463-4557-bc51-119d6f0f6831", 468 | "name": "Find Keyword", 469 | "type": "n8n-nodes-base.openAi", 470 | "typeVersion": 1, 471 | "position": [ 472 | -380, 473 | 700 474 | ], 475 | "credentials": { 476 | "openAiApi": { 477 | "id": "48", 478 | "name": "OpenAi Richards API" 479 | } 480 | } 481 | }, 482 | { 483 | "parameters": { 484 | "values": { 485 | "string": [ 486 | { 487 | "name": "imageid", 488 | "value": "={{ $json.id }}" 489 | } 490 | ] 491 | }, 492 | "options": {} 493 | }, 494 | "id": "edb9230a-02fa-47bc-9ad5-acd31ebdbce2", 495 | "name": "Set2", 496 | "type": "n8n-nodes-base.set", 497 | "typeVersion": 1, 498 | "position": [ 499 | 1200, 500 | 680 501 | ], 502 | "continueOnFail": true 503 | }, 504 | { 505 | "parameters": { 506 | "content": "## Download File \nProvide the url of the file you want to want to upload to wordpress.", 507 | "height": 420, 508 | "width": 160 509 | }, 510 | "name": "Note", 511 | "type": "n8n-nodes-base.stickyNote", 512 | "typeVersion": 1, 513 | "position": [ 514 | 380, 515 | 440 516 | ], 517 | "id": "10b5ea2c-7de5-4a4a-bdc3-8591bed7107d" 518 | }, 519 | { 520 | "parameters": { 521 | "content": "## Set Headers \nSet file type in content-type. \n\nYou can provide a custom file name inside content-disposition", 522 | "height": 420, 523 | "width": 160 524 | }, 525 | "name": "Note1", 526 | "type": "n8n-nodes-base.stickyNote", 527 | "typeVersion": 1, 528 | "position": [ 529 | 560, 530 | 440 531 | ], 532 | "id": "95c06d29-106e-4062-81bf-e68023888d14" 533 | }, 534 | { 535 | "parameters": { 536 | "content": "## Upload\nReplace example.com with your wordpress sites sites domain.\n\nUse the same authentication as needed for the wordpress node. ", 537 | "height": 420, 538 | "width": 180 539 | }, 540 | "name": "Note2", 541 | "type": "n8n-nodes-base.stickyNote", 542 | "typeVersion": 1, 543 | "position": [ 544 | 740, 545 | 440 546 | ], 547 | "id": "a792d2c7-6629-4b41-a015-a644571f6dc3" 548 | }, 549 | { 550 | "parameters": { 551 | "authentication": "predefinedCredentialType", 552 | "nodeCredentialType": "wordpressApi", 553 | "requestMethod": "POST", 554 | "url": "https://yourdomainname.com/wp-json/wp/v2/media", 555 | "jsonParameters": true, 556 | "options": { 557 | "bodyContentType": "raw" 558 | }, 559 | "sendBinaryData": true, 560 | "headerParametersJson": "={{$json}}" 561 | }, 562 | "name": "Upload To Wordpress", 563 | "type": "n8n-nodes-base.httpRequest", 564 | "typeVersion": 2, 565 | "position": [ 566 | 980, 567 | 680 568 | ], 569 | "id": "a4f216ef-6b8e-4274-814c-5480a3f98f34", 570 | "credentials": { 571 | "wordpressApi": { 572 | "id": "34", 573 | "name": "Pegas.io Wordpress account" 574 | } 575 | }, 576 | "continueOnFail": true 577 | }, 578 | { 579 | "parameters": { 580 | "values": { 581 | "string": [ 582 | { 583 | "name": "content-type", 584 | "value": "image/jpg" 585 | }, 586 | { 587 | "name": "content-disposition", 588 | "value": "=attachment; filename={{$binary.data.fileName}}" 589 | } 590 | ] 591 | }, 592 | "options": {} 593 | }, 594 | "name": "Set Headers", 595 | "type": "n8n-nodes-base.set", 596 | "typeVersion": 1, 597 | "position": [ 598 | 800, 599 | 680 600 | ], 601 | "id": "057c6d61-4285-434e-9b97-f2e8a504d84a", 602 | "continueOnFail": true 603 | }, 604 | { 605 | "parameters": { 606 | "url": "={{ $json.Image1 }}", 607 | "responseFormat": "file", 608 | "options": {} 609 | }, 610 | "name": "Download File", 611 | "type": "n8n-nodes-base.httpRequest", 612 | "typeVersion": 2, 613 | "position": [ 614 | 600, 615 | 680 616 | ], 617 | "id": "a6727c67-e740-42e5-9e05-be12a2219354", 618 | "continueOnFail": true 619 | }, 620 | { 621 | "parameters": { 622 | "mode": "combine", 623 | "combinationMode": "mergeByPosition", 624 | "options": {} 625 | }, 626 | "id": "b9476fcc-3736-4c5e-9e35-d7299a4ac250", 627 | "name": "Merge3", 628 | "type": "n8n-nodes-base.merge", 629 | "typeVersion": 2, 630 | "position": [ 631 | 240, 632 | 680 633 | ] 634 | }, 635 | { 636 | "parameters": { 637 | "url": "https://api.pexels.com/v1/search?orientation=landscape", 638 | "sendQuery": true, 639 | "queryParameters": { 640 | "parameters": [ 641 | { 642 | "name": "query", 643 | "value": "={{ $json.message.content }}" 644 | } 645 | ] 646 | }, 647 | "sendHeaders": true, 648 | "headerParameters": { 649 | "parameters": [ 650 | { 651 | "name": "Authorization", 652 | "value": "Your API Key" 653 | } 654 | ] 655 | }, 656 | "options": {} 657 | }, 658 | "id": "6521f723-65d7-490c-b570-e00209a43cb6", 659 | "name": "Pexels HTTP Request", 660 | "type": "n8n-nodes-base.httpRequest", 661 | "typeVersion": 3, 662 | "position": [ 663 | -180, 664 | 540 665 | ], 666 | "continueOnFail": true 667 | }, 668 | { 669 | "parameters": { 670 | "keepOnlySet": true, 671 | "values": { 672 | "string": [ 673 | { 674 | "name": "Image1", 675 | "value": "={{ $json.photos[0].src.original }}" 676 | } 677 | ] 678 | }, 679 | "options": {} 680 | }, 681 | "id": "65b8b755-132c-4a38-85b5-83e3c0d9c854", 682 | "name": "Set Pexels Image URL", 683 | "type": "n8n-nodes-base.set", 684 | "typeVersion": 1, 685 | "position": [ 686 | 0, 687 | 540 688 | ], 689 | "continueOnFail": true 690 | }, 691 | { 692 | "parameters": { 693 | "dataType": "string", 694 | "value1": "={{ $json.filecontents }}", 695 | "rules": { 696 | "rules": [ 697 | { 698 | "operation": "contains", 699 | "value2": "Settings used:" 700 | }, 701 | { 702 | "operation": "notContains", 703 | "value2": "Settings Used:", 704 | "output": 1 705 | } 706 | ] 707 | } 708 | }, 709 | "id": "c683ef0b-22aa-4e65-bf22-690477adcda3", 710 | "name": "Switch", 711 | "type": "n8n-nodes-base.switch", 712 | "typeVersion": 1, 713 | "position": [ 714 | -1680, 715 | 900 716 | ] 717 | }, 718 | { 719 | "parameters": { 720 | "mode": "runOnceForEachItem", 721 | "jsCode": "// Get the file contents from the input data\nconst fileContents = $input.item.json.filecontents;\n\n// Split the file contents into an array of lines\nconst lines = fileContents.split('\\n');\n\n// Remove the first 7 lines\nlines.splice(0, 7);\n\n// Join the remaining lines back into a single string\nconst newFileContents = lines.join('\\n');\n\n// Set the new file contents as the output\n// return [{ json: { filecontents: newFileContents } }];\nreturn { json: { filecontents: newFileContents.trim() } };\n" 722 | }, 723 | "id": "ad4cc3ff-1472-4ddc-b2d0-a0e4900966da", 724 | "name": "Code", 725 | "type": "n8n-nodes-base.code", 726 | "typeVersion": 1, 727 | "position": [ 728 | -1160, 729 | 960 730 | ] 731 | }, 732 | { 733 | "parameters": { 734 | "conditions": { 735 | "string": [ 736 | { 737 | "value1": "={{ $json.filecontents }}", 738 | "operation": "contains", 739 | "value2": "Midjourney AI Image Prompt:" 740 | } 741 | ] 742 | } 743 | }, 744 | "id": "45828779-81cc-4441-8323-70e4b0e417ce", 745 | "name": "IF", 746 | "type": "n8n-nodes-base.if", 747 | "typeVersion": 1, 748 | "position": [ 749 | -1420, 750 | 800 751 | ] 752 | }, 753 | { 754 | "parameters": { 755 | "conditions": { 756 | "string": [ 757 | { 758 | "value1": "={{ $json.filecontents }}", 759 | "operation": "contains", 760 | "value2": "Midjourney AI Image Prompt:" 761 | } 762 | ] 763 | } 764 | }, 765 | "id": "bfdfd637-ac32-42ed-aff4-dc388c355995", 766 | "name": "IF2", 767 | "type": "n8n-nodes-base.if", 768 | "typeVersion": 1, 769 | "position": [ 770 | -1420, 771 | 980 772 | ] 773 | }, 774 | { 775 | "parameters": { 776 | "mode": "runOnceForEachItem", 777 | "jsCode": "// Get the file contents from the input data\nconst fileContents = $input.item.json.filecontents;\n\n// Split the file contents into an array of lines\nconst lines = fileContents.split('\\n');\n\n// Remove the first 2 lines\nlines.splice(0, 2);\n\n// Join the remaining lines back into a single string\nconst newFileContents = lines.join('\\n');\n\n// Set the new file contents as the output\n// return [{ json: { filecontents: newFileContents } }];\nreturn { json: { filecontents: newFileContents.trim() } };\n" 778 | }, 779 | "id": "30e7e9f6-b51c-4281-8ccc-86cc80b8210f", 780 | "name": "Code3", 781 | "type": "n8n-nodes-base.code", 782 | "typeVersion": 1, 783 | "position": [ 784 | -1160, 785 | 1100 786 | ] 787 | }, 788 | { 789 | "parameters": { 790 | "mode": "runOnceForEachItem", 791 | "jsCode": "// Get the file contents from the input data\nconst fileContents = $input.item.json.filecontents;\n\n// Split the file contents into an array of lines\nconst lines = fileContents.split('\\n');\n\n// Remove the first 4 lines\nlines.splice(0, 4);\n\n// Join the remaining lines back into a single string\nconst newFileContents = lines.join('\\n');\n\n// Set the new file contents as the output\n// return [{ json: { filecontents: newFileContents } }];\nreturn { json: { filecontents: newFileContents.trim() } };\n" 792 | }, 793 | "id": "74720bc5-da4f-413f-b57a-653cd4f948c5", 794 | "name": "Code4", 795 | "type": "n8n-nodes-base.code", 796 | "typeVersion": 1, 797 | "position": [ 798 | -1160, 799 | 820 800 | ] 801 | }, 802 | { 803 | "parameters": { 804 | "batchSize": 1, 805 | "options": {} 806 | }, 807 | "id": "00a6c71c-7e97-4139-a8b8-ef640c5071c4", 808 | "name": "Split In Batches1", 809 | "type": "n8n-nodes-base.splitInBatches", 810 | "typeVersion": 2, 811 | "position": [ 812 | -2220, 813 | 920 814 | ] 815 | }, 816 | { 817 | "parameters": { 818 | "jsCode": "// Get the file content from the previous node\nconst fileContent = items[0].json.filecontents;\n\n// Split the file content into an array of lines\nconst lines = fileContent.split('\\n');\n\n// Get the first line as the title\nconst title = lines[0].trim();\n\n// Get the rest of the lines as the body and join them together\nconst body = lines.slice(1).join('\\n').trim();\n\n// Set the output\nreturn [{json: {title, body}}];\n" 819 | }, 820 | "id": "94075012-74b7-433b-b04d-85892f709a09", 821 | "name": "Code5", 822 | "type": "n8n-nodes-base.code", 823 | "typeVersion": 1, 824 | "position": [ 825 | -800, 826 | 900 827 | ] 828 | }, 829 | { 830 | "parameters": { 831 | "conditions": { 832 | "boolean": [ 833 | { 834 | "value1": true, 835 | "value2": "={{$node[\"SplitInBatches1\"].context[\"noItemsLeft\"]}}" 836 | } 837 | ] 838 | } 839 | }, 840 | "id": "06d7c713-e57d-479e-a9aa-263d95b1211d", 841 | "name": "IF1", 842 | "type": "n8n-nodes-base.if", 843 | "typeVersion": 1, 844 | "position": [ 845 | 2240, 846 | 1240 847 | ] 848 | }, 849 | { 850 | "parameters": {}, 851 | "id": "73d1d95d-496e-46dd-95a7-1704e51e1174", 852 | "name": "No Operation, do nothing1", 853 | "type": "n8n-nodes-base.noOp", 854 | "typeVersion": 1, 855 | "position": [ 856 | 2500, 857 | 880 858 | ] 859 | }, 860 | { 861 | "parameters": { 862 | "resource": "chat", 863 | "prompt": { 864 | "messages": [ 865 | { 866 | "content": "=give me a 3 to 6 word search phrase for a youtube video based on this:{{ $json.title }}. I dont want any plus, minus, quotations, or parentheses. Do not include Maine. Do not use the company name like \"your brand name\"" 867 | } 868 | ] 869 | }, 870 | "options": { 871 | "maxTokens": 2500, 872 | "n": 1 873 | } 874 | }, 875 | "id": "2d4c59c9-2bbb-45c3-ab5f-928e89860f93", 876 | "name": "Find Keyword1", 877 | "type": "n8n-nodes-base.openAi", 878 | "typeVersion": 1, 879 | "position": [ 880 | -380, 881 | 1020 882 | ], 883 | "credentials": { 884 | "openAiApi": { 885 | "id": "48", 886 | "name": "OpenAi Richards API" 887 | } 888 | } 889 | }, 890 | { 891 | "parameters": { 892 | "pollTimes": { 893 | "item": [ 894 | { 895 | "mode": "everyMinute" 896 | } 897 | ] 898 | }, 899 | "triggerOn": "specificFile", 900 | "fileToWatch": { 901 | "__rl": true, 902 | "value": "Enter Your Upload Folder", 903 | "mode": "id" 904 | } 905 | }, 906 | "id": "1e042ba9-d0e5-44f5-93a3-84022d0aba7e", 907 | "name": "Google Drive Trigger", 908 | "type": "n8n-nodes-base.googleDriveTrigger", 909 | "typeVersion": 1, 910 | "position": [ 911 | -2620, 912 | 920 913 | ] 914 | } 915 | ], 916 | "pinData": {}, 917 | "connections": { 918 | "Markdown": { 919 | "main": [ 920 | [ 921 | { 922 | "node": "OpenAI", 923 | "type": "main", 924 | "index": 0 925 | }, 926 | { 927 | "node": "Merge2", 928 | "type": "main", 929 | "index": 0 930 | }, 931 | { 932 | "node": "Find Keyword", 933 | "type": "main", 934 | "index": 0 935 | }, 936 | { 937 | "node": "Find Keyword1", 938 | "type": "main", 939 | "index": 0 940 | } 941 | ] 942 | ] 943 | }, 944 | "Code1": { 945 | "main": [ 946 | [ 947 | { 948 | "node": "Code5", 949 | "type": "main", 950 | "index": 0 951 | } 952 | ] 953 | ] 954 | }, 955 | "Move Binary Data": { 956 | "main": [ 957 | [ 958 | { 959 | "node": "Switch", 960 | "type": "main", 961 | "index": 0 962 | } 963 | ] 964 | ] 965 | }, 966 | "Google Drive2": { 967 | "main": [ 968 | [ 969 | { 970 | "node": "Move Binary Data", 971 | "type": "main", 972 | "index": 0 973 | } 974 | ] 975 | ] 976 | }, 977 | "Google Drive3": { 978 | "main": [ 979 | [ 980 | { 981 | "node": "Split In Batches1", 982 | "type": "main", 983 | "index": 0 984 | } 985 | ] 986 | ] 987 | }, 988 | "When clicking \"Execute Workflow\"": { 989 | "main": [ 990 | [ 991 | { 992 | "node": "Google Drive3", 993 | "type": "main", 994 | "index": 0 995 | } 996 | ] 997 | ] 998 | }, 999 | "OpenAI": { 1000 | "main": [ 1001 | [ 1002 | { 1003 | "node": "Set", 1004 | "type": "main", 1005 | "index": 0 1006 | } 1007 | ] 1008 | ] 1009 | }, 1010 | "Merge": { 1011 | "main": [ 1012 | [ 1013 | { 1014 | "node": "Wordpress", 1015 | "type": "main", 1016 | "index": 0 1017 | } 1018 | ] 1019 | ] 1020 | }, 1021 | "Merge1": { 1022 | "main": [ 1023 | [ 1024 | { 1025 | "node": "HTTP Request", 1026 | "type": "main", 1027 | "index": 0 1028 | } 1029 | ] 1030 | ] 1031 | }, 1032 | "HTTP Request": { 1033 | "main": [ 1034 | [ 1035 | { 1036 | "node": "Google Drive1", 1037 | "type": "main", 1038 | "index": 0 1039 | } 1040 | ] 1041 | ] 1042 | }, 1043 | "Wordpress": { 1044 | "main": [ 1045 | [ 1046 | { 1047 | "node": "Merge1", 1048 | "type": "main", 1049 | "index": 1 1050 | } 1051 | ] 1052 | ] 1053 | }, 1054 | "Set3": { 1055 | "main": [ 1056 | [ 1057 | { 1058 | "node": "Merge", 1059 | "type": "main", 1060 | "index": 0 1061 | } 1062 | ] 1063 | ] 1064 | }, 1065 | "HTTP Request1": { 1066 | "main": [ 1067 | [ 1068 | { 1069 | "node": "Set Video URL", 1070 | "type": "main", 1071 | "index": 0 1072 | } 1073 | ] 1074 | ] 1075 | }, 1076 | "Set Video URL": { 1077 | "main": [ 1078 | [ 1079 | { 1080 | "node": "Merge2", 1081 | "type": "main", 1082 | "index": 1 1083 | } 1084 | ] 1085 | ] 1086 | }, 1087 | "Merge2": { 1088 | "main": [ 1089 | [ 1090 | { 1091 | "node": "Set3", 1092 | "type": "main", 1093 | "index": 0 1094 | } 1095 | ] 1096 | ] 1097 | }, 1098 | "Set": { 1099 | "main": [ 1100 | [ 1101 | { 1102 | "node": "Merge", 1103 | "type": "main", 1104 | "index": 1 1105 | } 1106 | ] 1107 | ] 1108 | }, 1109 | "Set1": { 1110 | "main": [ 1111 | [ 1112 | { 1113 | "node": "Download File", 1114 | "type": "main", 1115 | "index": 0 1116 | } 1117 | ] 1118 | ] 1119 | }, 1120 | "Pixabay HTTP Request1": { 1121 | "main": [ 1122 | [ 1123 | { 1124 | "node": "Set Pixabay Image URL1", 1125 | "type": "main", 1126 | "index": 0 1127 | } 1128 | ] 1129 | ] 1130 | }, 1131 | "Set Pixabay Image URL1": { 1132 | "main": [ 1133 | [ 1134 | { 1135 | "node": "Merge3", 1136 | "type": "main", 1137 | "index": 1 1138 | } 1139 | ] 1140 | ] 1141 | }, 1142 | "Find Keyword": { 1143 | "main": [ 1144 | [ 1145 | { 1146 | "node": "Pixabay HTTP Request1", 1147 | "type": "main", 1148 | "index": 0 1149 | }, 1150 | { 1151 | "node": "Pexels HTTP Request", 1152 | "type": "main", 1153 | "index": 0 1154 | } 1155 | ] 1156 | ] 1157 | }, 1158 | "Upload To Wordpress": { 1159 | "main": [ 1160 | [ 1161 | { 1162 | "node": "Set2", 1163 | "type": "main", 1164 | "index": 0 1165 | } 1166 | ] 1167 | ] 1168 | }, 1169 | "Set Headers": { 1170 | "main": [ 1171 | [ 1172 | { 1173 | "node": "Upload To Wordpress", 1174 | "type": "main", 1175 | "index": 0 1176 | } 1177 | ] 1178 | ] 1179 | }, 1180 | "Download File": { 1181 | "main": [ 1182 | [ 1183 | { 1184 | "node": "Set Headers", 1185 | "type": "main", 1186 | "index": 0 1187 | } 1188 | ] 1189 | ] 1190 | }, 1191 | "Merge3": { 1192 | "main": [ 1193 | [ 1194 | { 1195 | "node": "Set1", 1196 | "type": "main", 1197 | "index": 0 1198 | } 1199 | ] 1200 | ] 1201 | }, 1202 | "Pexels HTTP Request": { 1203 | "main": [ 1204 | [ 1205 | { 1206 | "node": "Set Pexels Image URL", 1207 | "type": "main", 1208 | "index": 0 1209 | } 1210 | ] 1211 | ] 1212 | }, 1213 | "Set Pexels Image URL": { 1214 | "main": [ 1215 | [ 1216 | { 1217 | "node": "Merge3", 1218 | "type": "main", 1219 | "index": 0 1220 | } 1221 | ] 1222 | ] 1223 | }, 1224 | "Set2": { 1225 | "main": [ 1226 | [ 1227 | { 1228 | "node": "Merge1", 1229 | "type": "main", 1230 | "index": 0 1231 | } 1232 | ] 1233 | ] 1234 | }, 1235 | "Switch": { 1236 | "main": [ 1237 | [ 1238 | { 1239 | "node": "IF", 1240 | "type": "main", 1241 | "index": 0 1242 | } 1243 | ], 1244 | [ 1245 | { 1246 | "node": "IF2", 1247 | "type": "main", 1248 | "index": 0 1249 | } 1250 | ] 1251 | ] 1252 | }, 1253 | "Code": { 1254 | "main": [ 1255 | [ 1256 | { 1257 | "node": "Code5", 1258 | "type": "main", 1259 | "index": 0 1260 | } 1261 | ] 1262 | ] 1263 | }, 1264 | "IF": { 1265 | "main": [ 1266 | [ 1267 | { 1268 | "node": "Code1", 1269 | "type": "main", 1270 | "index": 0 1271 | } 1272 | ], 1273 | [ 1274 | { 1275 | "node": "Code4", 1276 | "type": "main", 1277 | "index": 0 1278 | } 1279 | ] 1280 | ] 1281 | }, 1282 | "IF2": { 1283 | "main": [ 1284 | [ 1285 | { 1286 | "node": "Code", 1287 | "type": "main", 1288 | "index": 0 1289 | } 1290 | ], 1291 | [ 1292 | { 1293 | "node": "Code3", 1294 | "type": "main", 1295 | "index": 0 1296 | } 1297 | ] 1298 | ] 1299 | }, 1300 | "Code4": { 1301 | "main": [ 1302 | [ 1303 | { 1304 | "node": "Code5", 1305 | "type": "main", 1306 | "index": 0 1307 | } 1308 | ] 1309 | ] 1310 | }, 1311 | "Code3": { 1312 | "main": [ 1313 | [ 1314 | { 1315 | "node": "Code5", 1316 | "type": "main", 1317 | "index": 0 1318 | } 1319 | ] 1320 | ] 1321 | }, 1322 | "Split In Batches1": { 1323 | "main": [ 1324 | [ 1325 | { 1326 | "node": "Google Drive2", 1327 | "type": "main", 1328 | "index": 0 1329 | } 1330 | ] 1331 | ] 1332 | }, 1333 | "Code5": { 1334 | "main": [ 1335 | [ 1336 | { 1337 | "node": "Markdown", 1338 | "type": "main", 1339 | "index": 0 1340 | } 1341 | ] 1342 | ] 1343 | }, 1344 | "IF1": { 1345 | "main": [ 1346 | [ 1347 | { 1348 | "node": "No Operation, do nothing1", 1349 | "type": "main", 1350 | "index": 0 1351 | } 1352 | ], 1353 | [ 1354 | { 1355 | "node": "Split In Batches1", 1356 | "type": "main", 1357 | "index": 0 1358 | } 1359 | ] 1360 | ] 1361 | }, 1362 | "Google Drive1": { 1363 | "main": [ 1364 | [ 1365 | { 1366 | "node": "IF1", 1367 | "type": "main", 1368 | "index": 0 1369 | } 1370 | ] 1371 | ] 1372 | }, 1373 | "Find Keyword1": { 1374 | "main": [ 1375 | [ 1376 | { 1377 | "node": "HTTP Request1", 1378 | "type": "main", 1379 | "index": 0 1380 | } 1381 | ] 1382 | ] 1383 | }, 1384 | "Google Drive Trigger": { 1385 | "main": [ 1386 | [ 1387 | { 1388 | "node": "Google Drive3", 1389 | "type": "main", 1390 | "index": 0 1391 | } 1392 | ] 1393 | ] 1394 | } 1395 | }, 1396 | "active": false, 1397 | "settings": {}, 1398 | "versionId": "d129db2f-99f0-488f-b97f-3ccbd79492cb", 1399 | "id": "219", 1400 | "meta": { 1401 | "instanceId": "7bfea076db05271bda3779ae68f8c25c7bf6ab9038c7c740cee303eb9b445dd4" 1402 | }, 1403 | "tags": [ 1404 | { 1405 | "createdAt": "2023-03-22T20:48:19.209Z", 1406 | "updatedAt": "2023-03-22T20:48:19.209Z", 1407 | "id": "22", 1408 | "name": "ZimmWriter" 1409 | }, 1410 | { 1411 | "createdAt": "2023-04-01T08:59:11.354Z", 1412 | "updatedAt": "2023-04-01T08:59:11.354Z", 1413 | "id": "34", 1414 | "name": "ReadyToTest" 1415 | }, 1416 | { 1417 | "name": "Couse", 1418 | "createdAt": "2023-05-01T04:38:07.102Z", 1419 | "updatedAt": "2023-05-01T04:38:07.102Z", 1420 | "id": "42" 1421 | } 1422 | ] 1423 | } --------------------------------------------------------------------------------