xosski

Google drive automation

Nov 1st, 2024
20
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 270.12 KB | None | 0 0
  1. {
  2. "name": "v4 Test - 4 workflows EK main (copie 16 Avril) -R",
  3. "nodes": [
  4. {
  5. "parameters": {
  6. "content": "## Generate PDF in folder",
  7. "width": 268.039543103924
  8. },
  9. "id": "cf149094-59e5-4912-90e2-e9242d2151cd",
  10. "name": "Sticky Note6",
  11. "type": "n8n-nodes-base.stickyNote",
  12. "typeVersion": 1,
  13. "position": [
  14. -1260,
  15. -4200
  16. ]
  17. },
  18. {
  19. "parameters": {
  20. "url": "=https://www.googleapis.com/drive/v3/files/{{ $json.body.presentationId }}/export?mimeType=application/pdf",
  21. "authentication": "predefinedCredentialType",
  22. "nodeCredentialType": "googleDriveOAuth2Api",
  23. "options": {
  24. "response": {
  25. "response": {
  26. "responseFormat": "file"
  27. }
  28. }
  29. }
  30. },
  31. "id": "b5401657-1aeb-49f7-91ac-17018b27e983",
  32. "name": "Drive API Export PDF1",
  33. "type": "n8n-nodes-base.httpRequest",
  34. "typeVersion": 4.1,
  35. "position": [
  36. -700,
  37. -4100
  38. ],
  39. "credentials": {
  40. "googleDriveOAuth2Api": {
  41. "id": "Ez0VV5Mm43ioqg7r",
  42. "name": "Google Drive account 2"
  43. }
  44. }
  45. },
  46. {
  47. "parameters": {
  48. "inputDataFieldName": "=data",
  49. "name": "=Devis Hit Film pour {{ $('Webhook : Generate PDF1').item.json.body.companyName }}",
  50. "driveId": {
  51. "__rl": true,
  52. "mode": "list",
  53. "value": "My Drive"
  54. },
  55. "folderId": {
  56. "__rl": true,
  57. "mode": "list",
  58. "value": "root",
  59. "cachedResultName": "/ (Root folder)"
  60. },
  61. "options": {}
  62. },
  63. "id": "4a08ac07-9f7f-4083-8485-93ef94521ea6",
  64. "name": "Save PDF in Drive1",
  65. "type": "n8n-nodes-base.googleDrive",
  66. "typeVersion": 3,
  67. "position": [
  68. -520,
  69. -4100
  70. ],
  71. "credentials": {
  72. "googleDriveOAuth2Api": {
  73. "id": "qipLEwtX0VvgOAKy",
  74. "name": "Google Drive account 2"
  75. }
  76. }
  77. },
  78. {
  79. "parameters": {
  80. "method": "=POST",
  81. "url": "=https://www.googleapis.com/drive/v3/files/{{ $json.id }}/permissions",
  82. "authentication": "predefinedCredentialType",
  83. "nodeCredentialType": "googleDriveOAuth2Api",
  84. "sendBody": true,
  85. "specifyBody": "json",
  86. "jsonBody": "{\n \"role\": \"reader\",\n \"type\": \"anyone\"\n}",
  87. "options": {}
  88. },
  89. "id": "f4c6f11a-d5a6-4fd1-aee1-b4565552d1b4",
  90. "name": "Change permission access PDF1",
  91. "type": "n8n-nodes-base.httpRequest",
  92. "typeVersion": 4.1,
  93. "position": [
  94. -220,
  95. -4340
  96. ],
  97. "credentials": {
  98. "googleDriveOAuth2Api": {
  99. "id": "Ez0VV5Mm43ioqg7r",
  100. "name": "Google Drive account 2"
  101. }
  102. }
  103. },
  104. {
  105. "parameters": {
  106. "respondWith": "allIncomingItems",
  107. "options": {}
  108. },
  109. "id": "958a7850-4e5e-47b0-aa25-f0cf9cad2a82",
  110. "name": "Réponse au Webhook PDF1",
  111. "type": "n8n-nodes-base.respondToWebhook",
  112. "typeVersion": 1,
  113. "position": [
  114. -220,
  115. -3980
  116. ]
  117. },
  118. {
  119. "parameters": {
  120. "httpMethod": "POST",
  121. "path": "v4-generate-pdf-folder",
  122. "responseMode": "responseNode",
  123. "options": {
  124. "allowedOrigins": "*"
  125. }
  126. },
  127. "id": "e5540116-8bdc-4574-9e24-7d1291cb0077",
  128. "name": "Webhook : Generate PDF1",
  129. "type": "n8n-nodes-base.webhook",
  130. "typeVersion": 1.1,
  131. "position": [
  132. -940,
  133. -4180
  134. ],
  135. "webhookId": "966de1a5-971b-40ef-89a8-a448e5e24c87"
  136. },
  137. {
  138. "parameters": {
  139. "operation": "move",
  140. "fileId": {
  141. "__rl": true,
  142. "value": "={{ $json.pdfId }}",
  143. "mode": "id"
  144. },
  145. "driveId": {
  146. "__rl": true,
  147. "mode": "list",
  148. "value": "My Drive"
  149. },
  150. "folderId": {
  151. "__rl": true,
  152. "value": "={{ $json.folderId }}",
  153. "mode": "id"
  154. }
  155. },
  156. "id": "9b222aae-c9f8-4040-8ff0-7d7c166ae373",
  157. "name": "Google Drive5",
  158. "type": "n8n-nodes-base.googleDrive",
  159. "typeVersion": 3,
  160. "position": [
  161. 220,
  162. -4160
  163. ],
  164. "credentials": {
  165. "googleDriveOAuth2Api": {
  166. "id": "qipLEwtX0VvgOAKy",
  167. "name": "Google Drive account 2"
  168. }
  169. }
  170. },
  171. {
  172. "parameters": {
  173. "jsCode": "return [\n {\n json: {\n folderId: items[0].json.body.folderId,\n pdfId: items[1].json.id,\n pdfUrl: items[1].json.webContentLink,\n }\n }\n];"
  174. },
  175. "id": "95ea73d9-7801-4b5a-97be-d8a92db582c5",
  176. "name": "FolderId4",
  177. "type": "n8n-nodes-base.code",
  178. "typeVersion": 2,
  179. "position": [
  180. 0,
  181. -4160
  182. ]
  183. },
  184. {
  185. "parameters": {},
  186. "id": "23c42eb3-1ee8-427d-9122-5ae32e1d08bf",
  187. "name": "Merge15",
  188. "type": "n8n-nodes-base.merge",
  189. "typeVersion": 2.1,
  190. "position": [
  191. -220,
  192. -4160
  193. ]
  194. },
  195. {
  196. "parameters": {
  197. "content": "## Generate text-assistant avec specialite\n",
  198. "width": 276.28646754625464
  199. },
  200. "id": "8474e987-e886-47d2-b174-795010e2aac0",
  201. "name": "Sticky Note2",
  202. "type": "n8n-nodes-base.stickyNote",
  203. "typeVersion": 1,
  204. "position": [
  205. -1240,
  206. -2440
  207. ]
  208. },
  209. {
  210. "parameters": {
  211. "assistantId": "asst_i2QUuO0EVMPzGApRaLSGNkB5",
  212. "text": "= {{ $json.body.promptText }}",
  213. "options": {}
  214. },
  215. "id": "86c76dc8-5dea-47e9-89f2-0f12dba427ea",
  216. "name": "OpenAI Assistant1",
  217. "type": "@n8n/n8n-nodes-langchain.openAiAssistant",
  218. "typeVersion": 1,
  219. "position": [
  220. -700,
  221. -2420
  222. ],
  223. "credentials": {
  224. "openAiApi": {
  225. "id": "EO2RhIFsAhnbcENg",
  226. "name": "OpenAi account 2"
  227. }
  228. }
  229. },
  230. {
  231. "parameters": {
  232. "httpMethod": "POST",
  233. "path": "v4-generate-text-assistant",
  234. "responseMode": "responseNode",
  235. "options": {
  236. "allowedOrigins": "*"
  237. }
  238. },
  239. "id": "7cf3504d-628e-4ae5-b654-2c3c6fa34b49",
  240. "name": "Webhook : générer texte1",
  241. "type": "n8n-nodes-base.webhook",
  242. "typeVersion": 1.1,
  243. "position": [
  244. -920,
  245. -2420
  246. ],
  247. "webhookId": "d845efd4-3b7b-4447-be4d-3cdfb1cddf2d"
  248. },
  249. {
  250. "parameters": {
  251. "respondWith": "allIncomingItems",
  252. "options": {}
  253. },
  254. "id": "45922dea-46f3-414a-b100-5229437bb09c",
  255. "name": "Réponse au Webhook TEXTE1",
  256. "type": "n8n-nodes-base.respondToWebhook",
  257. "typeVersion": 1,
  258. "position": [
  259. -320,
  260. -2420
  261. ]
  262. },
  263. {
  264. "parameters": {
  265. "httpMethod": "POST",
  266. "path": "v4-merge-pdfs-folder",
  267. "responseMode": "responseNode",
  268. "options": {
  269. "allowedOrigins": "*"
  270. }
  271. },
  272. "id": "fce1e77b-5bfa-491c-9b08-3e8a3dd91fc2",
  273. "name": "Webhook : Merge PDFs",
  274. "type": "n8n-nodes-base.webhook",
  275. "typeVersion": 1.1,
  276. "position": [
  277. -940,
  278. -3600
  279. ],
  280. "webhookId": "966de1a5-971b-40ef-89a8-a448e5e24c87"
  281. },
  282. {
  283. "parameters": {
  284. "content": "## Merge PDFs in folder",
  285. "width": 267.520986963149
  286. },
  287. "id": "6ba51974-4a77-4ce2-9241-40a77601f239",
  288. "name": "Sticky Note15",
  289. "type": "n8n-nodes-base.stickyNote",
  290. "typeVersion": 1,
  291. "position": [
  292. -1260,
  293. -3620
  294. ]
  295. },
  296. {
  297. "parameters": {
  298. "inputDataFieldName": "=file",
  299. "driveId": {
  300. "__rl": true,
  301. "mode": "list",
  302. "value": "My Drive"
  303. },
  304. "folderId": {
  305. "__rl": true,
  306. "mode": "list",
  307. "value": "root",
  308. "cachedResultName": "/ (Root folder)"
  309. },
  310. "options": {}
  311. },
  312. "id": "a2384767-cc2d-4ed9-b57d-f5ffa812e1fa",
  313. "name": "Google Drive Upload chosen PDF2",
  314. "type": "n8n-nodes-base.googleDrive",
  315. "typeVersion": 3,
  316. "position": [
  317. -700,
  318. -3520
  319. ],
  320. "credentials": {
  321. "googleDriveOAuth2Api": {
  322. "id": "qipLEwtX0VvgOAKy",
  323. "name": "Google Drive account 2"
  324. }
  325. }
  326. },
  327. {
  328. "parameters": {
  329. "respondWith": "allIncomingItems",
  330. "options": {}
  331. },
  332. "id": "5bb6af32-8982-4aab-be77-14150195addf",
  333. "name": "Réponse au Webhook upload PDF2",
  334. "type": "n8n-nodes-base.respondToWebhook",
  335. "typeVersion": 1,
  336. "position": [
  337. -420,
  338. -3400
  339. ]
  340. },
  341. {
  342. "parameters": {
  343. "method": "=POST",
  344. "url": "=https://www.googleapis.com/drive/v3/files/{{ $json.id }}/permissions",
  345. "authentication": "predefinedCredentialType",
  346. "nodeCredentialType": "googleDriveOAuth2Api",
  347. "sendBody": true,
  348. "specifyBody": "json",
  349. "jsonBody": "{\n \"role\": \"reader\",\n \"type\": \"anyone\"\n}",
  350. "options": {}
  351. },
  352. "id": "17e9549c-b425-4b27-80dd-bba9dd710bbe",
  353. "name": "Change permission access pdf1",
  354. "type": "n8n-nodes-base.httpRequest",
  355. "typeVersion": 4.1,
  356. "position": [
  357. -420,
  358. -3760
  359. ],
  360. "credentials": {
  361. "googleDriveOAuth2Api": {
  362. "id": "Ez0VV5Mm43ioqg7r",
  363. "name": "Google Drive account 2"
  364. }
  365. }
  366. },
  367. {
  368. "parameters": {
  369. "operation": "move",
  370. "fileId": {
  371. "__rl": true,
  372. "value": "={{ $json.pdfId }}",
  373. "mode": "id"
  374. },
  375. "driveId": {
  376. "__rl": true,
  377. "mode": "list",
  378. "value": "My Drive"
  379. },
  380. "folderId": {
  381. "__rl": true,
  382. "value": "={{ $json.folderId }}",
  383. "mode": "id"
  384. }
  385. },
  386. "id": "ac9e1cc4-31d9-4b6c-87dd-a2dfd72936c7",
  387. "name": "Google Drive6",
  388. "type": "n8n-nodes-base.googleDrive",
  389. "typeVersion": 3,
  390. "position": [
  391. 20,
  392. -3580
  393. ],
  394. "credentials": {
  395. "googleDriveOAuth2Api": {
  396. "id": "qipLEwtX0VvgOAKy",
  397. "name": "Google Drive account 2"
  398. }
  399. }
  400. },
  401. {
  402. "parameters": {
  403. "jsCode": "return [\n {\n json: {\n folderId: items[0].json.body.folderId,\n pdfId: items[1].json.id,\n pdfUrl: items[1].json.webContentLink,\n }\n }\n];"
  404. },
  405. "id": "2a395c49-f190-4e9b-94be-8e7dbefe618f",
  406. "name": "FolderId5",
  407. "type": "n8n-nodes-base.code",
  408. "typeVersion": 2,
  409. "position": [
  410. -200,
  411. -3580
  412. ]
  413. },
  414. {
  415. "parameters": {},
  416. "id": "2c553847-b78b-45a5-9b48-b3aca1a85c5a",
  417. "name": "Merge16",
  418. "type": "n8n-nodes-base.merge",
  419. "typeVersion": 2.1,
  420. "position": [
  421. -420,
  422. -3580
  423. ]
  424. },
  425. {
  426. "parameters": {
  427. "content": "## Upload Devis to Google Drive in folder",
  428. "height": 168.1377342479297,
  429. "width": 264.3913647049092
  430. },
  431. "id": "013ecf63-bd1f-450e-9445-19127bbc1508",
  432. "name": "Sticky Note8",
  433. "type": "n8n-nodes-base.stickyNote",
  434. "typeVersion": 1,
  435. "position": [
  436. -1240,
  437. -2960
  438. ]
  439. },
  440. {
  441. "parameters": {
  442. "httpMethod": "POST",
  443. "path": "v4-upload-devis-folder",
  444. "responseMode": "responseNode",
  445. "options": {
  446. "allowedOrigins": "*"
  447. }
  448. },
  449. "id": "fc4920f8-fb08-4a19-9c70-73c5f62edcab",
  450. "name": "Webhook: Upload chosen PDF1",
  451. "type": "n8n-nodes-base.webhook",
  452. "typeVersion": 1.1,
  453. "position": [
  454. -940,
  455. -2940
  456. ],
  457. "webhookId": "ea78f9eb-ae04-43a1-9c7f-eb04726fd699"
  458. },
  459. {
  460. "parameters": {
  461. "respondWith": "allIncomingItems",
  462. "options": {}
  463. },
  464. "id": "d53ba04c-4990-4a99-8c2f-02dd707c50d9",
  465. "name": "Réponse au Webhook upload PDF3",
  466. "type": "n8n-nodes-base.respondToWebhook",
  467. "typeVersion": 1,
  468. "position": [
  469. -420,
  470. -2740
  471. ]
  472. },
  473. {
  474. "parameters": {
  475. "inputDataFieldName": "=file",
  476. "driveId": {
  477. "__rl": true,
  478. "mode": "list",
  479. "value": "My Drive"
  480. },
  481. "folderId": {
  482. "__rl": true,
  483. "mode": "list",
  484. "value": "root",
  485. "cachedResultName": "/ (Root folder)"
  486. },
  487. "options": {}
  488. },
  489. "id": "5fef5738-537e-44c2-83fe-7d3fdb9bcb4c",
  490. "name": "Google Drive Upload chosen PDF3",
  491. "type": "n8n-nodes-base.googleDrive",
  492. "typeVersion": 3,
  493. "position": [
  494. -680,
  495. -2840
  496. ],
  497. "credentials": {
  498. "googleDriveOAuth2Api": {
  499. "id": "qipLEwtX0VvgOAKy",
  500. "name": "Google Drive account 2"
  501. }
  502. }
  503. },
  504. {
  505. "parameters": {
  506. "method": "=POST",
  507. "url": "=https://www.googleapis.com/drive/v3/files/{{ $json.id }}/permissions",
  508. "authentication": "predefinedCredentialType",
  509. "nodeCredentialType": "googleDriveOAuth2Api",
  510. "sendBody": true,
  511. "specifyBody": "json",
  512. "jsonBody": "{\n \"role\": \"reader\",\n \"type\": \"anyone\"\n}",
  513. "options": {}
  514. },
  515. "id": "f99a51fb-706b-480b-91d0-8f08aae818d9",
  516. "name": "Change permission access pdf3",
  517. "type": "n8n-nodes-base.httpRequest",
  518. "typeVersion": 4.1,
  519. "position": [
  520. -420,
  521. -3100
  522. ],
  523. "credentials": {
  524. "googleDriveOAuth2Api": {
  525. "id": "Ez0VV5Mm43ioqg7r",
  526. "name": "Google Drive account 2"
  527. }
  528. }
  529. },
  530. {
  531. "parameters": {
  532. "content": "## Generate PDF",
  533. "width": 268.039543103924,
  534. "color": 7
  535. },
  536. "id": "fcb5a5ef-2e21-4bbd-861c-9a32d9fe28ae",
  537. "name": "Sticky Note5",
  538. "type": "n8n-nodes-base.stickyNote",
  539. "typeVersion": 1,
  540. "position": [
  541. -1120,
  542. 2980
  543. ]
  544. },
  545. {
  546. "parameters": {
  547. "url": "=https://www.googleapis.com/drive/v3/files/{{ $json.body.presentationId }}/export?mimeType=application/pdf",
  548. "authentication": "predefinedCredentialType",
  549. "nodeCredentialType": "googleDriveOAuth2Api",
  550. "options": {
  551. "response": {
  552. "response": {
  553. "responseFormat": "file"
  554. }
  555. }
  556. }
  557. },
  558. "id": "7c443bfc-7438-48c7-a02f-6832b0ce53d3",
  559. "name": "Drive API Export PDF",
  560. "type": "n8n-nodes-base.httpRequest",
  561. "typeVersion": 4.1,
  562. "position": [
  563. -620,
  564. 3000
  565. ],
  566. "credentials": {
  567. "googleDriveOAuth2Api": {
  568. "id": "Ez0VV5Mm43ioqg7r",
  569. "name": "Google Drive account 2"
  570. }
  571. }
  572. },
  573. {
  574. "parameters": {
  575. "inputDataFieldName": "=data",
  576. "name": "=Devis Hit Film pour {{ $('Webhook : Generate PDF').item.json.body.companyName }}",
  577. "driveId": {
  578. "__rl": true,
  579. "mode": "list",
  580. "value": "My Drive"
  581. },
  582. "folderId": {
  583. "__rl": true,
  584. "mode": "list",
  585. "value": "root",
  586. "cachedResultName": "/ (Root folder)"
  587. },
  588. "options": {}
  589. },
  590. "id": "0e68b562-b9d8-4888-93de-d76da4d16f7e",
  591. "name": "Save PDF in Drive",
  592. "type": "n8n-nodes-base.googleDrive",
  593. "typeVersion": 3,
  594. "position": [
  595. -440,
  596. 3000
  597. ],
  598. "credentials": {
  599. "googleDriveOAuth2Api": {
  600. "id": "qipLEwtX0VvgOAKy",
  601. "name": "Google Drive account 2"
  602. }
  603. }
  604. },
  605. {
  606. "parameters": {
  607. "method": "=POST",
  608. "url": "=https://www.googleapis.com/drive/v3/files/{{ $json.id }}/permissions",
  609. "authentication": "predefinedCredentialType",
  610. "nodeCredentialType": "googleDriveOAuth2Api",
  611. "sendBody": true,
  612. "specifyBody": "json",
  613. "jsonBody": "{\n \"role\": \"reader\",\n \"type\": \"anyone\"\n}",
  614. "options": {}
  615. },
  616. "id": "736bd33b-c480-4254-a1c6-f415da89ee3e",
  617. "name": "Change permission access PDF",
  618. "type": "n8n-nodes-base.httpRequest",
  619. "typeVersion": 4.1,
  620. "position": [
  621. -160,
  622. 2920
  623. ],
  624. "credentials": {
  625. "googleDriveOAuth2Api": {
  626. "id": "Ez0VV5Mm43ioqg7r",
  627. "name": "Google Drive account 2"
  628. }
  629. }
  630. },
  631. {
  632. "parameters": {
  633. "respondWith": "allIncomingItems",
  634. "options": {}
  635. },
  636. "id": "64645ce4-0241-4ff7-91b8-6f0a704f4b60",
  637. "name": "Réponse au Webhook PDF",
  638. "type": "n8n-nodes-base.respondToWebhook",
  639. "typeVersion": 1,
  640. "position": [
  641. -160,
  642. 3120
  643. ]
  644. },
  645. {
  646. "parameters": {
  647. "content": "## Upload Devis to Google Drive",
  648. "height": 168.1377342479297,
  649. "width": 264.3913647049092,
  650. "color": 7
  651. },
  652. "id": "804e3839-741d-428b-b1cc-b5bdd7bbde88",
  653. "name": "Sticky Note7",
  654. "type": "n8n-nodes-base.stickyNote",
  655. "typeVersion": 1,
  656. "position": [
  657. -1100,
  658. 3820
  659. ]
  660. },
  661. {
  662. "parameters": {
  663. "httpMethod": "POST",
  664. "path": "v4-upload-devis",
  665. "responseMode": "responseNode",
  666. "options": {
  667. "allowedOrigins": "*"
  668. }
  669. },
  670. "id": "956a1ce8-dfa0-4f37-b915-fb8ac90ed4f1",
  671. "name": "Webhook: Upload chosen PDF",
  672. "type": "n8n-nodes-base.webhook",
  673. "typeVersion": 1.1,
  674. "position": [
  675. -800,
  676. 3840
  677. ],
  678. "webhookId": "ea78f9eb-ae04-43a1-9c7f-eb04726fd699"
  679. },
  680. {
  681. "parameters": {
  682. "respondWith": "allIncomingItems",
  683. "options": {}
  684. },
  685. "id": "b67650df-f825-44c7-acd0-e5b9e46260ee",
  686. "name": "Réponse au Webhook upload PDF",
  687. "type": "n8n-nodes-base.respondToWebhook",
  688. "typeVersion": 1,
  689. "position": [
  690. -360,
  691. 3940
  692. ]
  693. },
  694. {
  695. "parameters": {
  696. "inputDataFieldName": "=file",
  697. "driveId": {
  698. "__rl": true,
  699. "mode": "list",
  700. "value": "My Drive"
  701. },
  702. "folderId": {
  703. "__rl": true,
  704. "mode": "list",
  705. "value": "root",
  706. "cachedResultName": "/ (Root folder)"
  707. },
  708. "options": {}
  709. },
  710. "id": "b7939dfc-d475-47ac-b264-f125c32d39f0",
  711. "name": "Google Drive Upload chosen PDF",
  712. "type": "n8n-nodes-base.googleDrive",
  713. "typeVersion": 3,
  714. "position": [
  715. -600,
  716. 3840
  717. ],
  718. "credentials": {
  719. "googleDriveOAuth2Api": {
  720. "id": "qipLEwtX0VvgOAKy",
  721. "name": "Google Drive account 2"
  722. }
  723. }
  724. },
  725. {
  726. "parameters": {
  727. "method": "=POST",
  728. "url": "=https://www.googleapis.com/drive/v3/files/{{ $json.id }}/permissions",
  729. "authentication": "predefinedCredentialType",
  730. "nodeCredentialType": "googleDriveOAuth2Api",
  731. "sendBody": true,
  732. "specifyBody": "json",
  733. "jsonBody": "{\n \"role\": \"reader\",\n \"type\": \"anyone\"\n}",
  734. "options": {}
  735. },
  736. "id": "cd5b8efc-b7dd-499d-b3df-fd06333f6c1d",
  737. "name": "Change permission access pdf2",
  738. "type": "n8n-nodes-base.httpRequest",
  739. "typeVersion": 4.1,
  740. "position": [
  741. -360,
  742. 3740
  743. ],
  744. "credentials": {
  745. "googleDriveOAuth2Api": {
  746. "id": "Ez0VV5Mm43ioqg7r",
  747. "name": "Google Drive account 2"
  748. }
  749. }
  750. },
  751. {
  752. "parameters": {
  753. "inputDataFieldName": "=data",
  754. "driveId": {
  755. "__rl": true,
  756. "mode": "list",
  757. "value": "My Drive"
  758. },
  759. "folderId": {
  760. "__rl": true,
  761. "mode": "list",
  762. "value": "root",
  763. "cachedResultName": "/ (Root folder)"
  764. },
  765. "options": {}
  766. },
  767. "id": "71760a3e-f1cc-4e97-9d4f-38468299f96a",
  768. "name": "Google Drive Upload image1",
  769. "type": "n8n-nodes-base.googleDrive",
  770. "typeVersion": 3,
  771. "position": [
  772. -280,
  773. 2440
  774. ],
  775. "credentials": {
  776. "googleDriveOAuth2Api": {
  777. "id": "qipLEwtX0VvgOAKy",
  778. "name": "Google Drive account 2"
  779. }
  780. }
  781. },
  782. {
  783. "parameters": {
  784. "content": "## Generate slides\n\n",
  785. "color": 7
  786. },
  787. "id": "fe408011-3b76-4a1e-8afb-1b01c5373b29",
  788. "name": "Sticky Note13",
  789. "type": "n8n-nodes-base.stickyNote",
  790. "typeVersion": 1,
  791. "position": [
  792. -1100,
  793. 1980
  794. ]
  795. },
  796. {
  797. "parameters": {
  798. "httpMethod": "POST",
  799. "path": "v4-generate-slides",
  800. "responseMode": "responseNode",
  801. "options": {
  802. "allowedOrigins": "*"
  803. }
  804. },
  805. "id": "5130e84b-47db-4b89-8cf3-a0b6eaeeb00a",
  806. "name": "Webhook : générer slides",
  807. "type": "n8n-nodes-base.webhook",
  808. "typeVersion": 1.1,
  809. "position": [
  810. -800,
  811. 2000
  812. ],
  813. "webhookId": "d845efd4-3b7b-4447-be4d-3cdfb1cddf2d"
  814. },
  815. {
  816. "parameters": {
  817. "content": "## Generate text\n",
  818. "color": 7
  819. },
  820. "id": "21f182d9-ca38-4b94-bdbc-627a7bb90d4d",
  821. "name": "Sticky Note",
  822. "type": "n8n-nodes-base.stickyNote",
  823. "typeVersion": 1,
  824. "position": [
  825. -1100,
  826. 4240
  827. ]
  828. },
  829. {
  830. "parameters": {
  831. "assistantId": "asst_i2QUuO0EVMPzGApRaLSGNkB5",
  832. "text": "= {{ $json.body.promptText }}",
  833. "nativeTools": [
  834. "retrieval"
  835. ],
  836. "options": {}
  837. },
  838. "id": "dd3828fa-3edb-407f-adb3-146f2e57c14f",
  839. "name": "OpenAI Assistant",
  840. "type": "@n8n/n8n-nodes-langchain.openAiAssistant",
  841. "typeVersion": 1,
  842. "position": [
  843. -560,
  844. 4260
  845. ],
  846. "credentials": {
  847. "openAiApi": {
  848. "id": "EO2RhIFsAhnbcENg",
  849. "name": "OpenAi account 2"
  850. }
  851. }
  852. },
  853. {
  854. "parameters": {
  855. "content": "## Generate image\n"
  856. },
  857. "id": "4c8bc662-e28f-49b8-939b-a2b358b610b2",
  858. "name": "Sticky Note1",
  859. "type": "n8n-nodes-base.stickyNote",
  860. "typeVersion": 1,
  861. "position": [
  862. -1200,
  863. -1920
  864. ]
  865. },
  866. {
  867. "parameters": {
  868. "method": "POST",
  869. "url": "https://api.openai.com/v1/images/generations",
  870. "authentication": "predefinedCredentialType",
  871. "nodeCredentialType": "openAiApi",
  872. "sendBody": true,
  873. "bodyParameters": {
  874. "parameters": [
  875. {
  876. "name": "prompt",
  877. "value": "={{ $json.body.textImage }}"
  878. },
  879. {
  880. "name": "model",
  881. "value": "dall-e-3"
  882. },
  883. {
  884. "name": "size",
  885. "value": "1792x1024"
  886. }
  887. ]
  888. },
  889. "options": {}
  890. },
  891. "id": "f4306147-3b90-4a07-9793-621a1fb4f359",
  892. "name": "Generate image (DE-3, 1792x1024)",
  893. "type": "n8n-nodes-base.httpRequest",
  894. "typeVersion": 4.1,
  895. "position": [
  896. -620,
  897. -1900
  898. ],
  899. "credentials": {
  900. "openAiApi": {
  901. "id": "tx6ly9gMjT46qPeU",
  902. "name": "OpenAi account 3"
  903. }
  904. }
  905. },
  906. {
  907. "parameters": {
  908. "inputDataFieldName": "=data",
  909. "driveId": {
  910. "__rl": true,
  911. "mode": "list",
  912. "value": "My Drive"
  913. },
  914. "folderId": {
  915. "__rl": true,
  916. "mode": "list",
  917. "value": "root",
  918. "cachedResultName": "/ (Root folder)"
  919. },
  920. "options": {}
  921. },
  922. "id": "f533513f-437d-42fb-b67d-7dc5d6c25b3b",
  923. "name": "Google Drive Upload image2",
  924. "type": "n8n-nodes-base.googleDrive",
  925. "typeVersion": 3,
  926. "position": [
  927. -280,
  928. 2640
  929. ],
  930. "credentials": {
  931. "googleDriveOAuth2Api": {
  932. "id": "qipLEwtX0VvgOAKy",
  933. "name": "Google Drive account 2"
  934. }
  935. }
  936. },
  937. {
  938. "parameters": {
  939. "method": "=POST",
  940. "url": "=https://www.googleapis.com/drive/v3/files/{{ $json.id }}/permissions",
  941. "authentication": "predefinedCredentialType",
  942. "nodeCredentialType": "googleDriveOAuth2Api",
  943. "sendBody": true,
  944. "specifyBody": "json",
  945. "jsonBody": "{\n \"role\": \"reader\",\n \"type\": \"anyone\"\n}",
  946. "options": {}
  947. },
  948. "id": "d01147db-49c4-4579-aed4-d28063985bca",
  949. "name": "Change permission access",
  950. "type": "n8n-nodes-base.httpRequest",
  951. "typeVersion": 4.1,
  952. "position": [
  953. 540,
  954. 2200
  955. ],
  956. "credentials": {
  957. "googleDriveOAuth2Api": {
  958. "id": "Ez0VV5Mm43ioqg7r",
  959. "name": "Google Drive account 2"
  960. }
  961. }
  962. },
  963. {
  964. "parameters": {},
  965. "id": "7fce5ff5-75f8-4b56-ae4d-622d48aaff53",
  966. "name": "Merge1",
  967. "type": "n8n-nodes-base.merge",
  968. "typeVersion": 2.1,
  969. "position": [
  970. -20,
  971. 2540
  972. ]
  973. },
  974. {
  975. "parameters": {},
  976. "id": "03f9aae2-d218-4e50-83db-baea7bb3791f",
  977. "name": "Merge2",
  978. "type": "n8n-nodes-base.merge",
  979. "typeVersion": 2.1,
  980. "position": [
  981. 220,
  982. 2280
  983. ]
  984. },
  985. {
  986. "parameters": {
  987. "operation": "get",
  988. "presentationId": "1bRj2003LHoNJWfjQ3N3meVlgpDD8cmMmOWniHfpgFLQ"
  989. },
  990. "id": "987802ed-81af-4c2e-b32e-9ba7995806ab",
  991. "name": "Get Templace Source1",
  992. "type": "n8n-nodes-base.googleSlides",
  993. "typeVersion": 2,
  994. "position": [
  995. -520,
  996. 2080
  997. ],
  998. "credentials": {
  999. "googleSlidesOAuth2Api": {
  1000. "id": "yloV13TPeYn5lmdZ",
  1001. "name": "Google Slides account"
  1002. }
  1003. }
  1004. },
  1005. {
  1006. "parameters": {
  1007. "operation": "copy",
  1008. "fileId": {
  1009. "__rl": true,
  1010. "value": "1bRj2003LHoNJWfjQ3N3meVlgpDD8cmMmOWniHfpgFLQ",
  1011. "mode": "id"
  1012. },
  1013. "name": "=\"Pitch\" + {{new Date().getFullYear()}}-{{(\"0\" + (new Date().getMonth() + 1)).slice(-2)}}-{{(\"0\" + new Date().getDate()).slice(-2)}}-{{(\"0\" + new Date().getHours()).slice(-2)}}:{{(\"0\" + new Date().getMinutes()).slice(-2)}}:{{(\"0\" + new Date().getSeconds()).slice(-2)}}",
  1014. "sameFolder": false,
  1015. "driveId": {
  1016. "__rl": true,
  1017. "mode": "list",
  1018. "value": "My Drive"
  1019. },
  1020. "folderId": {
  1021. "__rl": true,
  1022. "value": "root",
  1023. "mode": "list",
  1024. "cachedResultName": "/ (Root folder)",
  1025. "cachedResultUrl": "https://drive.google.com/drive"
  1026. },
  1027. "options": {}
  1028. },
  1029. "id": "f5e0ba66-f96a-491a-8f7a-539e72189b1d",
  1030. "name": "Copy temp src and generate unique name file1",
  1031. "type": "n8n-nodes-base.googleDrive",
  1032. "typeVersion": 3,
  1033. "position": [
  1034. -280,
  1035. 2080
  1036. ],
  1037. "credentials": {
  1038. "googleDriveOAuth2Api": {
  1039. "id": "qipLEwtX0VvgOAKy",
  1040. "name": "Google Drive account 2"
  1041. }
  1042. }
  1043. },
  1044. {
  1045. "parameters": {
  1046. "operation": "get",
  1047. "presentationId": "={{ $json.id }}"
  1048. },
  1049. "id": "5fced670-a4b4-4bf2-8cd6-4a40bf789dc7",
  1050. "name": "Getting the copied Slide1",
  1051. "type": "n8n-nodes-base.googleSlides",
  1052. "typeVersion": 2,
  1053. "position": [
  1054. -20,
  1055. 2080
  1056. ],
  1057. "credentials": {
  1058. "googleSlidesOAuth2Api": {
  1059. "id": "yloV13TPeYn5lmdZ",
  1060. "name": "Google Slides account"
  1061. }
  1062. }
  1063. },
  1064. {
  1065. "parameters": {},
  1066. "id": "a9f10523-6be4-4b2d-895a-00001230aa38",
  1067. "name": "Merge5",
  1068. "type": "n8n-nodes-base.merge",
  1069. "typeVersion": 2.1,
  1070. "position": [
  1071. 540,
  1072. 2020
  1073. ]
  1074. },
  1075. {
  1076. "parameters": {
  1077. "jsCode": "\n\n\n// Le alt text du triangle qu'on cherche\nconst targetDescription = \"bordure\";\n\n// Correcting the path to access borderColor \nif (!items[0].json.body || !items[0].json.body.selectedColor) {\n throw new Error(\"borderColor is undefined or not passed correctly.\");\n}\n\n// Adjusting to the correct path\nconst inputColor = items[0].json.body.selectedColor;\n\n// Assuming `items[0].json.slides` is the array of slides you received from the Slides API.\nconst slides = items[1].json.slides;\n\n// Placeholder for the found shapes\nlet foundShapes = [];\n\n// Loop over each slide\nfor (const slide of slides) {\n // Check if slide has pageElements and it's an array\n if (Array.isArray(slide.pageElements)) {\n // Find all shapes with the description 'triangle1' within the current slide\n const matchingShapes = slide.pageElements.filter(\n (element) => element.description === targetDescription\n );\n foundShapes = foundShapes.concat(matchingShapes);\n }\n}\n\n// Check if we found any shapes\nif (foundShapes.length > 0) {\n // Apply the new color to all found shapes.\n foundShapes.forEach(foundShape => {\n foundShape.shape.shapeProperties.shapeBackgroundFill.solidFill.color.rgbColor = {\n red: inputColor.red, // Ensure this is a value between 0 and 1\n green: inputColor.green, // Ensure this is a value between 0 and 1\n blue: inputColor.blue, // Ensure this is a value between 0 and 1\n alpha: inputColor.alpha || 1, // Default to 1 if alpha is not provided\n };\n });\n\n // Return the modified shapes and the presentationId\n return foundShapes.map(foundShape => ({\n json: {\n foundShape: foundShape,\n presentationId: items[1].json.presentationId\n }\n }));\n} else {\n // If no shapes with 'triangle1' description were found in any slide\n return [{ json: { error: \"Shape with description 'triangle1' not found\" } }];\n}\n"
  1078. },
  1079. "id": "77bee001-921f-4291-8735-275223d0f89a",
  1080. "name": "Code for color modification1",
  1081. "type": "n8n-nodes-base.code",
  1082. "typeVersion": 2,
  1083. "position": [
  1084. 960,
  1085. 2020
  1086. ]
  1087. },
  1088. {
  1089. "parameters": {
  1090. "method": "POST",
  1091. "url": "=https://slides.googleapis.com/v1/presentations/{{ $('Code for color modification1').item.json.presentationId }}:batchUpdate",
  1092. "authentication": "predefinedCredentialType",
  1093. "nodeCredentialType": "googleSlidesOAuth2Api",
  1094. "sendBody": true,
  1095. "specifyBody": "json",
  1096. "jsonBody": "={\n \"requests\": [\n {\n \"updateShapeProperties\": {\n \"objectId\": \"{{ $json['foundShape']['objectId'] }}\",\n \"fields\": \"shapeBackgroundFill.solidFill.color\",\n \"shapeProperties\": {\n \"shapeBackgroundFill\": {\n \"solidFill\": {\n \"color\": {\n \"rgbColor\": {\n \"red\": \"{{ $json['foundShape']['shape']['shapeProperties']['shapeBackgroundFill']['solidFill']['color']['rgbColor']['red'] }}\",\n \"green\": \"{{ $json['foundShape']['shape']['shapeProperties']['shapeBackgroundFill']['solidFill']['color']['rgbColor']['green'] }}\",\n \"blue\": \"{{ $json['foundShape']['shape']['shapeProperties']['shapeBackgroundFill']['solidFill']['color']['rgbColor']['blue'] }}\"\n }\n }\n }\n }\n }\n }\n }\n ]\n}\n",
  1097. "options": {}
  1098. },
  1099. "id": "7d6a830d-ecc5-43a2-9f40-48a7ce210fbc",
  1100. "name": "Send new color to slides1",
  1101. "type": "n8n-nodes-base.httpRequest",
  1102. "typeVersion": 4.1,
  1103. "position": [
  1104. 1240,
  1105. 2020
  1106. ],
  1107. "credentials": {
  1108. "googleSlidesOAuth2Api": {
  1109. "id": "yloV13TPeYn5lmdZ",
  1110. "name": "Google Slides account"
  1111. }
  1112. }
  1113. },
  1114. {
  1115. "parameters": {
  1116. "operation": "replaceText",
  1117. "presentationId": "={{ $json.presentationId }}",
  1118. "textUi": {
  1119. "textValues": [
  1120. {
  1121. "pageObjectIds": [
  1122. "g1f1e0df403e_0_20"
  1123. ],
  1124. "replaceText": "={{ $json.sections.sectionContenu1 }}",
  1125. "text": "{{sectionContenu1}}"
  1126. },
  1127. {
  1128. "pageObjectIds": [
  1129. "g2c0a7f6a914_0_21"
  1130. ],
  1131. "replaceText": "={{ $json.sections.sectionContenu2 }}",
  1132. "text": "{{sectionContenu2}}"
  1133. },
  1134. {
  1135. "pageObjectIds": [
  1136. "g2c0a7f6a914_0_129"
  1137. ],
  1138. "replaceText": "={{ $json.sections.sectionContenu3 }}",
  1139. "text": "{{sectionContenu3}}"
  1140. },
  1141. {
  1142. "pageObjectIds": [
  1143. "g2c0a7f6a914_0_148"
  1144. ],
  1145. "replaceText": "={{ $json.sections.sectionContenu4 }}",
  1146. "text": "{{sectionContenu4}}"
  1147. },
  1148. {
  1149. "pageObjectIds": [
  1150. "g2c0a7f6a914_0_164"
  1151. ],
  1152. "replaceText": "={{ $json.sections.sectionContenu5 }}",
  1153. "text": "{{sectionContenu5}}"
  1154. },
  1155. {
  1156. "pageObjectIds": [
  1157. "g2c0a7f6a914_0_193"
  1158. ],
  1159. "replaceText": "={{ $json.sections.sectionContenu6 }}",
  1160. "text": "{{sectionContenu6}}"
  1161. },
  1162. {
  1163. "pageObjectIds": [
  1164. "g2c1a0221ae8_0_0"
  1165. ],
  1166. "replaceText": "={{ $json.sections.sectionContenu7 }}",
  1167. "text": "{{sectionContenu7}}"
  1168. }
  1169. ]
  1170. },
  1171. "options": {
  1172. "revisionId": ""
  1173. }
  1174. },
  1175. "id": "a383a20d-0864-471d-bed9-ed1f24847c6a",
  1176. "name": "Insert cutText1",
  1177. "type": "n8n-nodes-base.googleSlides",
  1178. "typeVersion": 2,
  1179. "position": [
  1180. 1620,
  1181. 1820
  1182. ],
  1183. "credentials": {
  1184. "googleSlidesOAuth2Api": {
  1185. "id": "yloV13TPeYn5lmdZ",
  1186. "name": "Google Slides account"
  1187. }
  1188. }
  1189. },
  1190. {
  1191. "parameters": {
  1192. "method": "POST",
  1193. "url": "=https://slides.googleapis.com/v1/presentations/{{ $json.presentationId }}:batchUpdate ",
  1194. "authentication": "predefinedCredentialType",
  1195. "nodeCredentialType": "googleSlidesOAuth2Api",
  1196. "sendBody": true,
  1197. "specifyBody": "json",
  1198. "jsonBody": "={\n \"requests\": [\n {\n \"replaceAllShapesWithImage\": {\n \"imageUrl\": \"https://drive.google.com/uc?id={{ $json.image2Id }}\",\n \"imageReplaceMethod\": \"CENTER_INSIDE\",\n \"containsText\": { \"text\": \"placeholder-image-x\" }\n }\n }\n ]\n}",
  1199. "options": {}
  1200. },
  1201. "id": "80512a3e-aeb0-4294-9a52-27567f8a8a35",
  1202. "name": "Insert images 2 into placeholders ",
  1203. "type": "n8n-nodes-base.httpRequest",
  1204. "typeVersion": 4.1,
  1205. "position": [
  1206. 1620,
  1207. 2460
  1208. ],
  1209. "credentials": {
  1210. "googleSlidesOAuth2Api": {
  1211. "id": "yloV13TPeYn5lmdZ",
  1212. "name": "Google Slides account"
  1213. }
  1214. }
  1215. },
  1216. {
  1217. "parameters": {
  1218. "method": "POST",
  1219. "url": "=https://slides.googleapis.com/v1/presentations/{{ $json.presentationId }}:batchUpdate",
  1220. "authentication": "predefinedCredentialType",
  1221. "nodeCredentialType": "googleSlidesOAuth2Api",
  1222. "sendBody": true,
  1223. "specifyBody": "json",
  1224. "jsonBody": "={\n \"requests\": [\n {\n \"replaceAllShapesWithImage\": {\n \"imageUrl\": \"https://drive.google.com/uc?id={{ $json.logoId }}\",\n \"imageReplaceMethod\": \"CENTER_INSIDE\",\n \"containsText\": { \"text\": \"Logo_client\" }\n }\n }\n ]\n} ",
  1225. "options": {}
  1226. },
  1227. "id": "92cd926b-6160-4513-b353-0db1cb0d8296",
  1228. "name": "Insert logo into PH1",
  1229. "type": "n8n-nodes-base.httpRequest",
  1230. "typeVersion": 4.1,
  1231. "position": [
  1232. 1620,
  1233. 2660
  1234. ],
  1235. "credentials": {
  1236. "googleSlidesOAuth2Api": {
  1237. "id": "yloV13TPeYn5lmdZ",
  1238. "name": "Google Slides account"
  1239. }
  1240. }
  1241. },
  1242. {
  1243. "parameters": {
  1244. "operation": "replaceText",
  1245. "presentationId": "={{ $json.presentationId }}",
  1246. "textUi": {
  1247. "textValues": [
  1248. {
  1249. "pageObjectIds": [
  1250. "p"
  1251. ],
  1252. "replaceText": "={{ $json.companyName }}",
  1253. "text": "{{nom_compagnie}}"
  1254. }
  1255. ]
  1256. },
  1257. "options": {
  1258. "revisionId": ""
  1259. }
  1260. },
  1261. "id": "c9761908-b9c1-4d86-af1c-941830a767be",
  1262. "name": "Insert companyName1",
  1263. "type": "n8n-nodes-base.googleSlides",
  1264. "typeVersion": 2,
  1265. "position": [
  1266. 1620,
  1267. 2020
  1268. ],
  1269. "credentials": {
  1270. "googleSlidesOAuth2Api": {
  1271. "id": "yloV13TPeYn5lmdZ",
  1272. "name": "Google Slides account"
  1273. }
  1274. }
  1275. },
  1276. {
  1277. "parameters": {
  1278. "operation": "replaceText",
  1279. "presentationId": "={{ $json.presentationId }}",
  1280. "textUi": {
  1281. "textValues": [
  1282. {
  1283. "replaceText": "= \n",
  1284. "text": "\\n"
  1285. }
  1286. ]
  1287. },
  1288. "options": {
  1289. "revisionId": ""
  1290. }
  1291. },
  1292. "id": "c5829be9-9036-43a2-b6f9-634dd0dc0b5d",
  1293. "name": "remove \\n1",
  1294. "type": "n8n-nodes-base.googleSlides",
  1295. "typeVersion": 2,
  1296. "position": [
  1297. 1880,
  1298. 1820
  1299. ],
  1300. "credentials": {
  1301. "googleSlidesOAuth2Api": {
  1302. "id": "yloV13TPeYn5lmdZ",
  1303. "name": "Google Slides account"
  1304. }
  1305. }
  1306. },
  1307. {
  1308. "parameters": {
  1309. "method": "POST",
  1310. "url": "=https://slides.googleapis.com/v1/presentations/{{ $json.presentationId }}:batchUpdate ",
  1311. "authentication": "predefinedCredentialType",
  1312. "nodeCredentialType": "googleSlidesOAuth2Api",
  1313. "sendBody": true,
  1314. "specifyBody": "json",
  1315. "jsonBody": "={\n \"requests\": [\n {\n \"replaceAllShapesWithImage\": {\n \"imageUrl\": \"https://drive.google.com/uc?id={{ $json.image1Id }}\",\n \"imageReplaceMethod\": \"CENTER_INSIDE\",\n \"containsText\": { \"text\": \"placeholder-image-p\" }\n }\n }\n ]\n}\n",
  1316. "options": {}
  1317. },
  1318. "id": "cf06fa7f-793a-4e31-9872-edaca6fe3913",
  1319. "name": "Insert images into placeholders1",
  1320. "type": "n8n-nodes-base.httpRequest",
  1321. "typeVersion": 4.1,
  1322. "position": [
  1323. 1620,
  1324. 2260
  1325. ],
  1326. "credentials": {
  1327. "googleSlidesOAuth2Api": {
  1328. "id": "yloV13TPeYn5lmdZ",
  1329. "name": "Google Slides account"
  1330. }
  1331. }
  1332. },
  1333. {
  1334. "parameters": {
  1335. "url": "={{ $json.body.logoData }}",
  1336. "options": {
  1337. "response": {
  1338. "response": {
  1339. "responseFormat": "file"
  1340. }
  1341. }
  1342. }
  1343. },
  1344. "id": "93e81159-9763-4fae-be0b-45705500e33f",
  1345. "name": "Send logo to Google Drive",
  1346. "type": "n8n-nodes-base.httpRequest",
  1347. "typeVersion": 4.1,
  1348. "position": [
  1349. -520,
  1350. 2260
  1351. ]
  1352. },
  1353. {
  1354. "parameters": {
  1355. "inputDataFieldName": "=data",
  1356. "driveId": {
  1357. "__rl": true,
  1358. "mode": "list",
  1359. "value": "My Drive"
  1360. },
  1361. "folderId": {
  1362. "__rl": true,
  1363. "mode": "list",
  1364. "value": "root",
  1365. "cachedResultName": "/ (Root folder)"
  1366. },
  1367. "options": {}
  1368. },
  1369. "id": "3e3d54b0-1cc5-4d3b-8ec6-fbeb08c5678b",
  1370. "name": "Google Drive Upload logo",
  1371. "type": "n8n-nodes-base.googleDrive",
  1372. "typeVersion": 3,
  1373. "position": [
  1374. -280,
  1375. 2260
  1376. ],
  1377. "credentials": {
  1378. "googleDriveOAuth2Api": {
  1379. "id": "qipLEwtX0VvgOAKy",
  1380. "name": "Google Drive account 2"
  1381. }
  1382. }
  1383. },
  1384. {
  1385. "parameters": {
  1386. "operation": "replaceText",
  1387. "presentationId": "={{ $json.presentationId }}",
  1388. "textUi": {
  1389. "textValues": [
  1390. {
  1391. "replaceText": "={{ $json.sections.sectionTitre1 }}",
  1392. "text": "{{sectionTitre1}}"
  1393. },
  1394. {
  1395. "replaceText": "={{ $json.sections.sectionTitre2 }}",
  1396. "text": "{{sectionTitre2}}"
  1397. },
  1398. {
  1399. "replaceText": "={{ $json.sections.sectionTitre3 }}",
  1400. "text": "{{sectionTitre3}}"
  1401. },
  1402. {
  1403. "replaceText": "={{ $json.sections.sectionTitre4 }}",
  1404. "text": "{{sectionTitre4}}"
  1405. },
  1406. {
  1407. "replaceText": "={{ $json.sections.sectionTitre5 }}",
  1408. "text": "{{sectionTitre5}}"
  1409. },
  1410. {
  1411. "replaceText": "={{ $json.sections.sectionTitre6 }}",
  1412. "text": "{{sectionTitre6}}"
  1413. },
  1414. {
  1415. "replaceText": "={{ $json.sections.sectionTitre7 }}",
  1416. "text": "{{sectionTitre7}}"
  1417. },
  1418. {
  1419. "pageObjectIds": [
  1420. "g1f4ef1b3123_0_0"
  1421. ],
  1422. "replaceText": "={{ $json.firstLinkDescription }}",
  1423. "text": "{{sectionDescription1}}"
  1424. },
  1425. {
  1426. "pageObjectIds": [
  1427. "g1f4ef1b3123_0_0"
  1428. ],
  1429. "replaceText": "={{ $json.secondLinkDescription }}",
  1430. "text": "{{sectionDescription2}}"
  1431. },
  1432. {
  1433. "pageObjectIds": [
  1434. "g1f4ef1b3123_0_0"
  1435. ],
  1436. "replaceText": "={{ $json.thirdLinkDescription }}",
  1437. "text": "{{sectionDescription3}}"
  1438. },
  1439. {
  1440. "pageObjectIds": [
  1441. "g1f4ef1b3123_0_0"
  1442. ],
  1443. "replaceText": "={{ $json.firstLinkDisplayName }} ",
  1444. "text": "{{sectionLien1}}"
  1445. },
  1446. {
  1447. "pageObjectIds": [
  1448. "g1f4ef1b3123_0_0"
  1449. ],
  1450. "replaceText": "={{ $json.secondLinkDisplayName }}",
  1451. "text": "{{sectionLien2}}"
  1452. },
  1453. {
  1454. "pageObjectIds": [
  1455. "g1f4ef1b3123_0_0"
  1456. ],
  1457. "replaceText": "={{ $json.thirdLinkDisplayName }}",
  1458. "text": "{{sectionLien3}}"
  1459. }
  1460. ]
  1461. },
  1462. "options": {
  1463. "revisionId": ""
  1464. }
  1465. },
  1466. "id": "95ff9dce-5e88-4b86-8198-4f482750069c",
  1467. "name": "Insert cutTitles1",
  1468. "type": "n8n-nodes-base.googleSlides",
  1469. "typeVersion": 2,
  1470. "position": [
  1471. 1620,
  1472. 1620
  1473. ],
  1474. "credentials": {
  1475. "googleSlidesOAuth2Api": {
  1476. "id": "yloV13TPeYn5lmdZ",
  1477. "name": "Google Slides account"
  1478. }
  1479. }
  1480. },
  1481. {
  1482. "parameters": {},
  1483. "id": "8a0c2922-9097-4c1d-bfee-26b67724c69b",
  1484. "name": "Merge3",
  1485. "type": "n8n-nodes-base.merge",
  1486. "typeVersion": 2.1,
  1487. "position": [
  1488. 960,
  1489. 2260
  1490. ]
  1491. },
  1492. {
  1493. "parameters": {
  1494. "jsCode": "\nconst presentationId = items[1].json.presentationId;\nconst logoId = items[2].json.id;\nconst image1Id = items[3].json.id;\nconst image2Id = items[4].json.id;\n\n\n\n// Combine sections and presentationId in one object\nconst result = {\n presentationId: presentationId,\n image1Id: image1Id,\n image2Id: image2Id,\n logoId: logoId\n};\n\nreturn { json: result };\n"
  1495. },
  1496. "id": "77fa26e2-7874-442c-9ab8-bcbc06eed47e",
  1497. "name": "InsertImages",
  1498. "type": "n8n-nodes-base.code",
  1499. "typeVersion": 2,
  1500. "position": [
  1501. 1240,
  1502. 2260
  1503. ],
  1504. "alwaysOutputData": false
  1505. },
  1506. {
  1507. "parameters": {
  1508. "jsCode": "\nconst presentationId = items[0].json.presentationId;\n\n// presentationId in one object\nconst result = {\n presentationId: presentationId\n};\n\nreturn { json: result };\n"
  1509. },
  1510. "id": "509ba496-b505-4083-bfd2-58889f24cc48",
  1511. "name": "InsertImages2",
  1512. "type": "n8n-nodes-base.code",
  1513. "typeVersion": 2,
  1514. "position": [
  1515. 1900,
  1516. 2660
  1517. ],
  1518. "alwaysOutputData": false
  1519. },
  1520. {
  1521. "parameters": {
  1522. "respondWith": "allIncomingItems",
  1523. "options": {}
  1524. },
  1525. "id": "6759c749-ce2a-44f2-82c5-32dd69b2b7fa",
  1526. "name": "Réponse au Webhook TEXT2",
  1527. "type": "n8n-nodes-base.respondToWebhook",
  1528. "typeVersion": 1,
  1529. "position": [
  1530. 2160,
  1531. 2660
  1532. ]
  1533. },
  1534. {
  1535. "parameters": {
  1536. "httpMethod": "POST",
  1537. "path": "v4-generate-text",
  1538. "responseMode": "responseNode",
  1539. "options": {
  1540. "allowedOrigins": "*"
  1541. }
  1542. },
  1543. "id": "cc34d56f-3562-49e5-8e31-31e99853c4d9",
  1544. "name": "Webhook : générer texte",
  1545. "type": "n8n-nodes-base.webhook",
  1546. "typeVersion": 1.1,
  1547. "position": [
  1548. -780,
  1549. 4260
  1550. ],
  1551. "webhookId": "d845efd4-3b7b-4447-be4d-3cdfb1cddf2d"
  1552. },
  1553. {
  1554. "parameters": {
  1555. "httpMethod": "POST",
  1556. "path": "v4-generate-image",
  1557. "responseMode": "responseNode",
  1558. "options": {
  1559. "allowedOrigins": "*"
  1560. }
  1561. },
  1562. "id": "75ccabed-f4b5-4427-875f-c4c79d3a0464",
  1563. "name": "Webhook : générer image",
  1564. "type": "n8n-nodes-base.webhook",
  1565. "typeVersion": 1.1,
  1566. "position": [
  1567. -900,
  1568. -1900
  1569. ],
  1570. "webhookId": "d845efd4-3b7b-4447-be4d-3cdfb1cddf2d"
  1571. },
  1572. {
  1573. "parameters": {
  1574. "respondWith": "allIncomingItems",
  1575. "options": {}
  1576. },
  1577. "id": "7b1a10b5-e763-455f-a783-8cde23efb030",
  1578. "name": "Réponse au Webhook TEXTE",
  1579. "type": "n8n-nodes-base.respondToWebhook",
  1580. "typeVersion": 1,
  1581. "position": [
  1582. -180,
  1583. 4260
  1584. ]
  1585. },
  1586. {
  1587. "parameters": {
  1588. "respondWith": "allIncomingItems",
  1589. "options": {}
  1590. },
  1591. "id": "c5a46fb4-2350-4bfa-a3c8-175e667976d8",
  1592. "name": "Réponse au Webhook IMAGE",
  1593. "type": "n8n-nodes-base.respondToWebhook",
  1594. "typeVersion": 1,
  1595. "position": [
  1596. 140,
  1597. -1880
  1598. ]
  1599. },
  1600. {
  1601. "parameters": {
  1602. "url": "={{ $json.body.imageUrls[0] }}",
  1603. "options": {
  1604. "response": {
  1605. "response": {
  1606. "responseFormat": "file"
  1607. }
  1608. }
  1609. }
  1610. },
  1611. "id": "5ad4fa3d-6bb9-4947-80f9-049d46e0ccad",
  1612. "name": "Send image 1 to Google Drive",
  1613. "type": "n8n-nodes-base.httpRequest",
  1614. "typeVersion": 4.1,
  1615. "position": [
  1616. -520,
  1617. 2440
  1618. ]
  1619. },
  1620. {
  1621. "parameters": {
  1622. "url": "={{ $json.body.imageUrls[1] }}",
  1623. "options": {
  1624. "response": {
  1625. "response": {
  1626. "responseFormat": "file"
  1627. }
  1628. }
  1629. }
  1630. },
  1631. "id": "35af9944-39d4-41c0-8953-770e8d34a934",
  1632. "name": "Send image 2 to Google Drive",
  1633. "type": "n8n-nodes-base.httpRequest",
  1634. "typeVersion": 4.1,
  1635. "position": [
  1636. -520,
  1637. 2640
  1638. ]
  1639. },
  1640. {
  1641. "parameters": {
  1642. "httpMethod": "POST",
  1643. "path": "v4-merge-pdfs",
  1644. "responseMode": "responseNode",
  1645. "options": {
  1646. "allowedOrigins": "*"
  1647. }
  1648. },
  1649. "id": "e64e2b4e-d390-4c08-8deb-867293861663",
  1650. "name": "Webhook : Merge PDFs1",
  1651. "type": "n8n-nodes-base.webhook",
  1652. "typeVersion": 1.1,
  1653. "position": [
  1654. -800,
  1655. 3420
  1656. ],
  1657. "webhookId": "966de1a5-971b-40ef-89a8-a448e5e24c87"
  1658. },
  1659. {
  1660. "parameters": {
  1661. "content": "## Merge PDFs",
  1662. "width": 267.520986963149,
  1663. "color": 7
  1664. },
  1665. "id": "9852a71d-1929-452d-8aca-85f63cb94e86",
  1666. "name": "Sticky Note12",
  1667. "type": "n8n-nodes-base.stickyNote",
  1668. "typeVersion": 1,
  1669. "position": [
  1670. -1120,
  1671. 3400
  1672. ]
  1673. },
  1674. {
  1675. "parameters": {
  1676. "inputDataFieldName": "=file",
  1677. "driveId": {
  1678. "__rl": true,
  1679. "mode": "list",
  1680. "value": "My Drive"
  1681. },
  1682. "folderId": {
  1683. "__rl": true,
  1684. "mode": "list",
  1685. "value": "root",
  1686. "cachedResultName": "/ (Root folder)"
  1687. },
  1688. "options": {}
  1689. },
  1690. "id": "4faad8c7-1773-4152-a3f2-84e0aa4f2c78",
  1691. "name": "Google Drive Upload chosen PDF1",
  1692. "type": "n8n-nodes-base.googleDrive",
  1693. "typeVersion": 3,
  1694. "position": [
  1695. -600,
  1696. 3420
  1697. ],
  1698. "credentials": {
  1699. "googleDriveOAuth2Api": {
  1700. "id": "qipLEwtX0VvgOAKy",
  1701. "name": "Google Drive account 2"
  1702. }
  1703. }
  1704. },
  1705. {
  1706. "parameters": {
  1707. "respondWith": "allIncomingItems",
  1708. "options": {}
  1709. },
  1710. "id": "b4db2adb-01fd-4077-81bd-34e3311ba914",
  1711. "name": "Réponse au Webhook upload PDF1",
  1712. "type": "n8n-nodes-base.respondToWebhook",
  1713. "typeVersion": 1,
  1714. "position": [
  1715. -360,
  1716. 3520
  1717. ]
  1718. },
  1719. {
  1720. "parameters": {
  1721. "method": "=POST",
  1722. "url": "=https://www.googleapis.com/drive/v3/files/{{ $json.id }}/permissions",
  1723. "authentication": "predefinedCredentialType",
  1724. "nodeCredentialType": "googleDriveOAuth2Api",
  1725. "sendBody": true,
  1726. "specifyBody": "json",
  1727. "jsonBody": "{\n \"role\": \"reader\",\n \"type\": \"anyone\"\n}",
  1728. "options": {}
  1729. },
  1730. "id": "142bc62e-2e0e-4dd8-9fe1-3639179cdb01",
  1731. "name": "Change permission access pdf",
  1732. "type": "n8n-nodes-base.httpRequest",
  1733. "typeVersion": 4.1,
  1734. "position": [
  1735. -360,
  1736. 3320
  1737. ],
  1738. "credentials": {
  1739. "googleDriveOAuth2Api": {
  1740. "id": "Ez0VV5Mm43ioqg7r",
  1741. "name": "Google Drive account 2"
  1742. }
  1743. }
  1744. },
  1745. {
  1746. "parameters": {
  1747. "httpMethod": "POST",
  1748. "path": "v4-generate-pdf",
  1749. "responseMode": "responseNode",
  1750. "options": {
  1751. "allowedOrigins": "*"
  1752. }
  1753. },
  1754. "id": "2b302e0f-1d06-4c92-85b6-5f416fea2646",
  1755. "name": "Webhook : Generate PDF",
  1756. "type": "n8n-nodes-base.webhook",
  1757. "typeVersion": 1.1,
  1758. "position": [
  1759. -800,
  1760. 3000
  1761. ],
  1762. "webhookId": "966de1a5-971b-40ef-89a8-a448e5e24c87"
  1763. },
  1764. {
  1765. "parameters": {
  1766. "method": "POST",
  1767. "url": "https://api.openai.com/v1/images/generations",
  1768. "authentication": "predefinedCredentialType",
  1769. "nodeCredentialType": "openAiApi",
  1770. "sendBody": true,
  1771. "bodyParameters": {
  1772. "parameters": [
  1773. {
  1774. "name": "prompt",
  1775. "value": "={{ $json.body.textImage }}"
  1776. },
  1777. {
  1778. "name": "model",
  1779. "value": "dall-e-3"
  1780. },
  1781. {
  1782. "name": "size",
  1783. "value": "1792x1024"
  1784. }
  1785. ]
  1786. },
  1787. "options": {}
  1788. },
  1789. "id": "386097b1-e918-479a-8834-4f62501f62f8",
  1790. "name": "Generate image (DE-3, 1792x1024)1",
  1791. "type": "n8n-nodes-base.httpRequest",
  1792. "typeVersion": 4.1,
  1793. "position": [
  1794. -620,
  1795. -2080
  1796. ],
  1797. "credentials": {
  1798. "openAiApi": {
  1799. "id": "tx6ly9gMjT46qPeU",
  1800. "name": "OpenAi account 3"
  1801. }
  1802. }
  1803. },
  1804. {
  1805. "parameters": {
  1806. "method": "POST",
  1807. "url": "https://api.openai.com/v1/images/generations",
  1808. "authentication": "predefinedCredentialType",
  1809. "nodeCredentialType": "openAiApi",
  1810. "sendBody": true,
  1811. "bodyParameters": {
  1812. "parameters": [
  1813. {
  1814. "name": "prompt",
  1815. "value": "={{ $json.body.textImage }}"
  1816. },
  1817. {
  1818. "name": "model",
  1819. "value": "dall-e-3"
  1820. },
  1821. {
  1822. "name": "size",
  1823. "value": "1792x1024"
  1824. }
  1825. ]
  1826. },
  1827. "options": {}
  1828. },
  1829. "id": "283ac20f-1233-453f-bf58-8f369cbc104b",
  1830. "name": "Generate image (DE-3, 1792x1024)2",
  1831. "type": "n8n-nodes-base.httpRequest",
  1832. "typeVersion": 4.1,
  1833. "position": [
  1834. -620,
  1835. -1720
  1836. ],
  1837. "credentials": {
  1838. "openAiApi": {
  1839. "id": "tx6ly9gMjT46qPeU",
  1840. "name": "OpenAi account 3"
  1841. }
  1842. }
  1843. },
  1844. {
  1845. "parameters": {},
  1846. "id": "7b00ee1d-616c-4d65-a00b-7f1737853621",
  1847. "name": "Merge",
  1848. "type": "n8n-nodes-base.merge",
  1849. "typeVersion": 2.1,
  1850. "position": [
  1851. -360,
  1852. -2000
  1853. ]
  1854. },
  1855. {
  1856. "parameters": {},
  1857. "id": "5e91a855-93b4-47c5-b334-04736a4199d7",
  1858. "name": "Merge4",
  1859. "type": "n8n-nodes-base.merge",
  1860. "typeVersion": 2.1,
  1861. "position": [
  1862. -100,
  1863. -1880
  1864. ]
  1865. },
  1866. {
  1867. "parameters": {
  1868. "jsCode": "\nconst presentationId = items[1].json.presentationId;\nconst imageUrls = items[0].json.body.imageUrls;\nconst logoData = items[0].json.body.logoData;\nconst companyName = items[0].json.body.companyName;\nconst urlGenerative = items[0].json.body.urlGenerative;\nconst firstLinkDescription = items[0].json.body.firstLink.description;\nconst firstLinkUrl = items[0].json.body.firstLink.url;\nconst firstLinkDisplayName = items[0].json.body.firstLink.displayName;\nconst secondLinkDescription = items[0].json.body.secondLink.description;\nconst secondLinkUrl = items[0].json.body.secondLink.url;\nconst secondLinkDisplayName = items[0].json.body.secondLink.displayName;\nconst thirdLinkDescription = items[0].json.body.thirdLink.description;\nconst thirdLinkUrl = items[0].json.body.thirdLink.url;\nconst thirdLinkDisplayName = items[0].json.body.thirdLink.displayName;\nconst red = items[0].json.body.selectedColor.red;\nconst green = items[0].json.body.selectedColor.green;\nconst blue = items[0].json.body.selectedColor.blue;\n\nconst text = items[0].json.body.output; // Make sure this is where your text is located\nconst sections = {};\nconst regex = /<h1 className=\"h1title\">(.*?)<\\/h1>\\s*<[^>]+>(.*?)<\\/[^>]+>/gis;\nconst removalRegex = /【\\d†source】/g; // Expression to remove undesired strings\n\nlet match;\nlet contentCounter = 1; // Counter for contents\nlet titleCounter = 1; // Counter for titles\n\nwhile ((match = regex.exec(text)) !== null) {\n let title = match[1].trim().replace(removalRegex, '');\n let content = match[2].trim().replace(removalRegex, '');\n \n const titlePlaceholder = `sectionTitre${titleCounter}`; // Placeholder for the title\n const contentPlaceholder = `sectionContenu${contentCounter}`; // Placeholder for the content\n sections[titlePlaceholder] = title.toUpperCase();\n sections[contentPlaceholder] = content;\n \n titleCounter++;\n contentCounter++;\n}\n\n// Combine sections and presentationId in one object\nconst result = {\n presentationId: presentationId,\n sections: sections,\n imageUrls: imageUrls,\n logoData: logoData,\n urlGenerative: urlGenerative,\n companyName: companyName,\n firstLinkDescription: firstLinkDescription,\n firstLinkUrl: firstLinkUrl,\n firstLinkDisplayName: firstLinkDisplayName,\n secondLinkDescription: secondLinkDescription,\n secondLinkUrl: secondLinkUrl,\n secondLinkDisplayName: secondLinkDisplayName,\n thirdLinkDescription: thirdLinkDescription,\n thirdLinkUrl: thirdLinkUrl,\n thirdLinkDisplayName: thirdLinkDisplayName,\n red: red,\n green: green,\n blue: blue\n};\n\nreturn { json: result };"
  1869. },
  1870. "id": "9587ea15-b809-428c-9911-20fbaa1ffef6",
  1871. "name": "OutputTextCut",
  1872. "type": "n8n-nodes-base.code",
  1873. "typeVersion": 2,
  1874. "position": [
  1875. 960,
  1876. 1720
  1877. ],
  1878. "alwaysOutputData": false
  1879. },
  1880. {
  1881. "parameters": {
  1882. "method": "POST",
  1883. "url": "=https://slides.googleapis.com/v1/presentations/{{ $('OutputTextCut').item.json.presentationId }}:batchUpdate",
  1884. "authentication": "predefinedCredentialType",
  1885. "nodeCredentialType": "googleSlidesOAuth2Api",
  1886. "sendHeaders": true,
  1887. "headerParameters": {
  1888. "parameters": [
  1889. {
  1890. "name": "Content-Type",
  1891. "value": "application/json"
  1892. }
  1893. ]
  1894. },
  1895. "sendBody": true,
  1896. "specifyBody": "json",
  1897. "jsonBody": "={\n \"requests\": [\n {\n \"updateTextStyle\": {\n \"objectId\": \"g2c0a7f6a914_0_4\",\n \"textRange\": {\n \"type\": \"FIXED_RANGE\",\n \"startIndex\": 0,\n \"endIndex\": 14\n },\n \"style\": {\n \"link\": {\n \"url\": \"{{ $json.urlGenerative }}\"\n },\n \"foregroundColor\": {\n \"opaqueColor\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n }\n }\n },\n \"underline\": false\n },\n \"fields\": \"link,foregroundColor,underline\"\n }\n },\n {\n \"updateImageProperties\": {\n \"objectId\": \"g2c0a7f6a914_0_6\",\n \"fields\": \"link\",\n \"imageProperties\": {\n \"link\": {\n \"url\": \"{{ $json.urlGenerative }}\"\n }\n }\n }\n },\n {\n \"updateTextStyle\": {\n \"objectId\": \"g2c7c4771883_0_0\",\n \"textRange\": {\n \"type\": \"FIXED_RANGE\",\n \"startIndex\": 0,\n \"endIndex\": 14\n },\n \"style\": {\n \"link\": {\n \"url\": \"{{ $json.urlGenerative }}\"\n },\n \"foregroundColor\": {\n \"opaqueColor\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n }\n }\n },\n \"underline\": false\n },\n \"fields\": \"link,foregroundColor,underline\"\n }\n },\n {\n \"updateImageProperties\": {\n \"objectId\": \"g2c0a7f6a914_0_32\",\n \"fields\": \"link\",\n \"imageProperties\": {\n \"link\": {\n \"url\": \"{{ $json.urlGenerative }}\"\n }\n }\n }\n },\n {\n \"updateTextStyle\": {\n \"objectId\": \"g2c7c4771883_0_2\",\n \"textRange\": {\n \"type\": \"FIXED_RANGE\",\n \"startIndex\": 0,\n \"endIndex\": 14\n },\n \"style\": {\n \"link\": {\n \"url\": \"{{ $json.urlGenerative }}\"\n },\n \"foregroundColor\": {\n \"opaqueColor\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n }\n }\n },\n \"underline\": false\n },\n \"fields\": \"link,foregroundColor,underline\"\n }\n },\n {\n \"updateImageProperties\": {\n \"objectId\": \"g2c0a7f6a914_0_138\",\n \"fields\": \"link\",\n \"imageProperties\": {\n \"link\": {\n \"url\": \"{{ $json.urlGenerative }}\"\n }\n }\n }\n },\n {\n \"updateTextStyle\": {\n \"objectId\": \"g2c7c4771883_0_1\",\n \"textRange\": {\n \"type\": \"FIXED_RANGE\",\n \"startIndex\": 0,\n \"endIndex\": 14\n },\n \"style\": {\n \"link\": {\n \"url\": \"{{ $json.urlGenerative }}\"\n },\n \"foregroundColor\": {\n \"opaqueColor\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n }\n }\n },\n \"underline\": false\n },\n \"fields\": \"link,foregroundColor,underline\"\n }\n },\n {\n \"updateImageProperties\": {\n \"objectId\": \"g2c0a7f6a914_0_159\",\n \"fields\": \"link\",\n \"imageProperties\": {\n \"link\": {\n \"url\": \"{{ $json.urlGenerative }}\"\n }\n }\n }\n },\n {\n \"updateTextStyle\": {\n \"objectId\": \"g2c7c4771883_0_3\",\n \"textRange\": {\n \"type\": \"FIXED_RANGE\",\n \"startIndex\": 0,\n \"endIndex\": 14\n },\n \"style\": {\n \"link\": {\n \"url\": \"{{ $json.urlGenerative }}\"\n },\n \"foregroundColor\": {\n \"opaqueColor\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n }\n }\n },\n \"underline\": false\n },\n \"fields\": \"link,foregroundColor,underline\"\n }\n },\n {\n \"updateImageProperties\": {\n \"objectId\": \"g2c0a7f6a914_0_174\",\n \"fields\": \"link\",\n \"imageProperties\": {\n \"link\": {\n \"url\": \"{{ $json.urlGenerative }}\"\n }\n }\n }\n },\n {\n \"updateTextStyle\": {\n \"objectId\": \"g2c7c4771883_0_4\",\n \"textRange\": {\n \"type\": \"FIXED_RANGE\",\n \"startIndex\": 0,\n \"endIndex\": 14\n },\n \"style\": {\n \"link\": {\n \"url\": \"{{ $json.urlGenerative }}\"\n },\n \"foregroundColor\": {\n \"opaqueColor\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n }\n }\n },\n \"underline\": false\n },\n \"fields\": \"link,foregroundColor,underline\"\n }\n },\n {\n \"updateImageProperties\": {\n \"objectId\": \"g2c0a7f6a914_0_204\",\n \"fields\": \"link\",\n \"imageProperties\": {\n \"link\": {\n \"url\": \"{{ $json.urlGenerative }}\"\n }\n }\n }\n },\n {\n \"updateTextStyle\": {\n \"objectId\": \"g2c7c4771883_0_6\",\n \"textRange\": {\n \"type\": \"FIXED_RANGE\",\n \"startIndex\": 0,\n \"endIndex\": 14\n },\n \"style\": {\n \"link\": {\n \"url\": \"{{ $json.urlGenerative }}\"\n },\n \"foregroundColor\": {\n \"opaqueColor\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n }\n }\n },\n \"underline\": false\n },\n \"fields\": \"link,foregroundColor,underline\"\n }\n },\n {\n \"updateImageProperties\": {\n \"objectId\": \"g2c1a0221ae8_0_11\",\n \"fields\": \"link\",\n \"imageProperties\": {\n \"link\": {\n \"url\": \"{{ $json.urlGenerative }}\"\n }\n }\n }\n },\n {\n \"updateTextStyle\": {\n \"objectId\": \"g2c7c4771883_0_7\",\n \"textRange\": {\n \"type\": \"FIXED_RANGE\",\n \"startIndex\": 0,\n \"endIndex\": 14\n },\n \"style\": {\n \"link\": {\n \"url\": \"{{ $json.urlGenerative }}\"\n },\n \"foregroundColor\": {\n \"opaqueColor\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n }\n }\n },\n \"underline\": false\n },\n \"fields\": \"link,foregroundColor,underline\"\n }\n },\n {\n \"updateImageProperties\": {\n \"objectId\": \"g2c0a7f6a914_0_16\",\n \"fields\": \"link\",\n \"imageProperties\": {\n \"link\": {\n \"url\": \"{{ $json.urlGenerative }}\"\n }\n }\n }\n },\n {\n \"updateTextStyle\": {\n \"objectId\": \"g2c7c4771883_0_9\",\n \"textRange\": {\n \"type\": \"FIXED_RANGE\",\n \"startIndex\": 0,\n \"endIndex\": 14\n },\n \"style\": {\n \"link\": {\n \"url\": \"{{ $json.urlGenerative }}\"\n },\n \"foregroundColor\": {\n \"opaqueColor\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n }\n }\n },\n \"underline\": false\n },\n \"fields\": \"link,foregroundColor,underline\"\n }\n },\n {\n \"updateImageProperties\": {\n \"objectId\": \"g1f4e164aa46_0_10\",\n \"fields\": \"link\",\n \"imageProperties\": {\n \"link\": {\n \"url\": \"{{ $json.urlGenerative }}\"\n }\n }\n }\n },\n {\n \"updateTextStyle\": {\n \"objectId\": \"g2c7c4771883_0_10\",\n \"textRange\": {\n \"type\": \"FIXED_RANGE\",\n \"startIndex\": 0,\n \"endIndex\": 14\n },\n \"style\": {\n \"link\": {\n \"url\": \"{{ $json.urlGenerative }}\"\n },\n \"foregroundColor\": {\n \"opaqueColor\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n }\n }\n },\n \"underline\": false\n },\n \"fields\": \"link,foregroundColor,underline\"\n }\n },\n {\n \"updateImageProperties\": {\n \"objectId\": \"g1f4ef1b3123_0_11\",\n \"fields\": \"link\",\n \"imageProperties\": {\n \"link\": {\n \"url\": \"{{ $json.urlGenerative }}\"\n }\n }\n }\n },\n {\n \"updateImageProperties\": {\n \"objectId\": \"g1f4ef1b3123_0_11\",\n \"fields\": \"link\",\n \"imageProperties\": {\n \"link\": {\n \"url\": \"{{ $json.urlGenerative }}\"\n }\n }\n }\n },\n {\n \"updateTextStyle\": {\n \"objectId\": \"g1f4ef1b3123_0_9\",\n \"textRange\": {\n \"type\": \"FIXED_RANGE\",\n \"startIndex\": 24,\n \"endIndex\": 41\n },\n \"style\": {\n \"link\": {\n \"url\": \"{{ $json.firstLinkUrl }}\"\n },\n \"foregroundColor\": {\n \"opaqueColor\": {\n \"rgbColor\": {\n \"red\": {{ $json.red }},\n \"green\": {{ $json.green }},\n \"blue\": {{ $json.blue }}\n }\n }\n },\n \"underline\": false\n },\n \"fields\": \"link,foregroundColor,underline\"\n }\n },\n {\n \"updateTextStyle\": {\n \"objectId\": \"g1f4ef1b3123_0_9\",\n \"textRange\": {\n \"type\": \"FIXED_RANGE\",\n \"startIndex\": 66,\n \"endIndex\": 83\n },\n \"style\": {\n \"link\": {\n \"url\": \"{{ $json.secondLinkUrl }}\"\n },\n \"foregroundColor\": {\n \"opaqueColor\": {\n \"rgbColor\": {\n \"red\": {{ $json.red }},\n \"green\": {{ $json.green }},\n \"blue\": {{ $json.blue }}\n }\n }\n },\n \"underline\": false\n },\n \"fields\": \"link,foregroundColor,underline\"\n }\n },\n {\n \"updateTextStyle\": {\n \"objectId\": \"g1f4ef1b3123_0_9\",\n \"textRange\": {\n \"type\": \"FIXED_RANGE\",\n \"startIndex\": 108,\n \"endIndex\": 125\n },\n \"style\": {\n \"link\": {\n \"url\": \"{{ $json.thirdLinkUrl }}\"\n },\n \"foregroundColor\": {\n \"opaqueColor\": {\n \"rgbColor\": {\n \"red\": {{ $json.red }},\n \"green\": {{ $json.green }},\n \"blue\": {{ $json.blue }}\n }\n }\n },\n \"underline\": false\n },\n \"fields\": \"link,foregroundColor,underline\"\n }\n }\n ]\n}\n",
  1898. "options": {}
  1899. },
  1900. "id": "09cd3a41-030b-4b58-ac4a-e37452c56933",
  1901. "name": "Send urlGenerative",
  1902. "type": "n8n-nodes-base.httpRequest",
  1903. "typeVersion": 4.1,
  1904. "position": [
  1905. 1620,
  1906. 1440
  1907. ],
  1908. "credentials": {
  1909. "googleSlidesOAuth2Api": {
  1910. "id": "yloV13TPeYn5lmdZ",
  1911. "name": "Google Slides account"
  1912. }
  1913. }
  1914. },
  1915. {
  1916. "parameters": {
  1917. "operation": "getSlides",
  1918. "presentationId": "={{ $json.id }}"
  1919. },
  1920. "id": "50ed6304-f824-4fea-a3fd-3aaabe27987e",
  1921. "name": "Google Slides",
  1922. "type": "n8n-nodes-base.googleSlides",
  1923. "typeVersion": 2,
  1924. "position": [
  1925. -20,
  1926. 1900
  1927. ],
  1928. "credentials": {
  1929. "googleSlidesOAuth2Api": {
  1930. "id": "yloV13TPeYn5lmdZ",
  1931. "name": "Google Slides account"
  1932. }
  1933. }
  1934. },
  1935. {
  1936. "parameters": {
  1937. "operation": "move",
  1938. "fileId": {
  1939. "__rl": true,
  1940. "value": "={{ $json.pdfId }}",
  1941. "mode": "id"
  1942. },
  1943. "driveId": {
  1944. "__rl": true,
  1945. "mode": "list",
  1946. "value": "My Drive"
  1947. },
  1948. "folderId": {
  1949. "__rl": true,
  1950. "value": "={{ $json.folderId }}",
  1951. "mode": "id"
  1952. }
  1953. },
  1954. "id": "39d6a948-f2b8-439c-83fe-aa4ab399734b",
  1955. "name": "Google Drive7",
  1956. "type": "n8n-nodes-base.googleDrive",
  1957. "typeVersion": 3,
  1958. "position": [
  1959. 20,
  1960. -2920
  1961. ],
  1962. "credentials": {
  1963. "googleDriveOAuth2Api": {
  1964. "id": "qipLEwtX0VvgOAKy",
  1965. "name": "Google Drive account 2"
  1966. }
  1967. }
  1968. },
  1969. {
  1970. "parameters": {
  1971. "jsCode": "return [\n {\n json: {\n folderId: items[0].json.body.folderId,\n pdfId: items[1].json.id,\n pdfUrl: items[1].json.webContentLink,\n }\n }\n];"
  1972. },
  1973. "id": "c9e78336-2286-474d-89f0-cac822cd5019",
  1974. "name": "FolderId6",
  1975. "type": "n8n-nodes-base.code",
  1976. "typeVersion": 2,
  1977. "position": [
  1978. -200,
  1979. -2920
  1980. ]
  1981. },
  1982. {
  1983. "parameters": {},
  1984. "id": "0bb563a2-6c44-4760-81e5-9b63c7fadb7b",
  1985. "name": "Merge17",
  1986. "type": "n8n-nodes-base.merge",
  1987. "typeVersion": 2.1,
  1988. "position": [
  1989. -420,
  1990. -2920
  1991. ]
  1992. },
  1993. {
  1994. "parameters": {
  1995. "inputDataFieldName": "=data",
  1996. "driveId": {
  1997. "__rl": true,
  1998. "mode": "list",
  1999. "value": "My Drive"
  2000. },
  2001. "folderId": {
  2002. "__rl": true,
  2003. "value": "root",
  2004. "mode": "list",
  2005. "cachedResultName": "/ (Root folder)",
  2006. "cachedResultUrl": "https://drive.google.com/drive"
  2007. },
  2008. "options": {}
  2009. },
  2010. "id": "ab245fef-ef3e-48b1-a4bf-10bc8f826595",
  2011. "name": "Google Drive Upload image4",
  2012. "type": "n8n-nodes-base.googleDrive",
  2013. "typeVersion": 3,
  2014. "position": [
  2015. -340,
  2016. -6640
  2017. ],
  2018. "credentials": {
  2019. "googleDriveOAuth2Api": {
  2020. "id": "qipLEwtX0VvgOAKy",
  2021. "name": "Google Drive account 2"
  2022. }
  2023. }
  2024. },
  2025. {
  2026. "parameters": {
  2027. "content": "## Generate slides in sub folders in parent folder (Si vous en avez de besoin)\n\n",
  2028. "color": 5
  2029. },
  2030. "id": "2a6b963e-8490-4cc9-b18c-7aae525f4e75",
  2031. "name": "Sticky Note16",
  2032. "type": "n8n-nodes-base.stickyNote",
  2033. "typeVersion": 1,
  2034. "position": [
  2035. -1220,
  2036. -7100
  2037. ]
  2038. },
  2039. {
  2040. "parameters": {
  2041. "inputDataFieldName": "=data",
  2042. "driveId": {
  2043. "__rl": true,
  2044. "mode": "list",
  2045. "value": "My Drive"
  2046. },
  2047. "folderId": {
  2048. "__rl": true,
  2049. "value": "root",
  2050. "mode": "list",
  2051. "cachedResultName": "/ (Root folder)",
  2052. "cachedResultUrl": "https://drive.google.com/drive"
  2053. },
  2054. "options": {}
  2055. },
  2056. "id": "5e778d61-e98d-4184-b862-59c2e37f70b4",
  2057. "name": "Google Drive Upload image5",
  2058. "type": "n8n-nodes-base.googleDrive",
  2059. "typeVersion": 3,
  2060. "position": [
  2061. -340,
  2062. -6440
  2063. ],
  2064. "credentials": {
  2065. "googleDriveOAuth2Api": {
  2066. "id": "qipLEwtX0VvgOAKy",
  2067. "name": "Google Drive account 2"
  2068. }
  2069. }
  2070. },
  2071. {
  2072. "parameters": {
  2073. "method": "=POST",
  2074. "url": "=https://www.googleapis.com/drive/v3/files/{{ $json.id }}/permissions",
  2075. "authentication": "predefinedCredentialType",
  2076. "nodeCredentialType": "googleDriveOAuth2Api",
  2077. "sendBody": true,
  2078. "specifyBody": "json",
  2079. "jsonBody": "{\n \"role\": \"reader\",\n \"type\": \"anyone\"\n}",
  2080. "options": {}
  2081. },
  2082. "id": "7bae8337-58ba-4dfc-b259-af82e5722eda",
  2083. "name": "Change permission access2",
  2084. "type": "n8n-nodes-base.httpRequest",
  2085. "typeVersion": 4.1,
  2086. "position": [
  2087. 1680,
  2088. -6900
  2089. ],
  2090. "credentials": {
  2091. "googleDriveOAuth2Api": {
  2092. "id": "Ez0VV5Mm43ioqg7r",
  2093. "name": "Google Drive account 2"
  2094. }
  2095. }
  2096. },
  2097. {
  2098. "parameters": {},
  2099. "id": "c573bd10-d3f8-475b-a943-1e20d76ff29c",
  2100. "name": "Merge18",
  2101. "type": "n8n-nodes-base.merge",
  2102. "typeVersion": 2.1,
  2103. "position": [
  2104. 1240,
  2105. -6620
  2106. ]
  2107. },
  2108. {
  2109. "parameters": {},
  2110. "id": "c5303975-7669-4b0d-a7db-376504d87b77",
  2111. "name": "Merge19",
  2112. "type": "n8n-nodes-base.merge",
  2113. "typeVersion": 2.1,
  2114. "position": [
  2115. 1420,
  2116. -6800
  2117. ]
  2118. },
  2119. {
  2120. "parameters": {
  2121. "operation": "get",
  2122. "presentationId": "1bRj2003LHoNJWfjQ3N3meVlgpDD8cmMmOWniHfpgFLQ"
  2123. },
  2124. "id": "2fa1c4a1-3921-456d-981e-e1d77880529a",
  2125. "name": "Get Templace Source2",
  2126. "type": "n8n-nodes-base.googleSlides",
  2127. "typeVersion": 2,
  2128. "position": [
  2129. -640,
  2130. -7000
  2131. ],
  2132. "credentials": {
  2133. "googleSlidesOAuth2Api": {
  2134. "id": "yloV13TPeYn5lmdZ",
  2135. "name": "Google Slides account"
  2136. }
  2137. }
  2138. },
  2139. {
  2140. "parameters": {
  2141. "operation": "copy",
  2142. "fileId": {
  2143. "__rl": true,
  2144. "value": "1bRj2003LHoNJWfjQ3N3meVlgpDD8cmMmOWniHfpgFLQ",
  2145. "mode": "id"
  2146. },
  2147. "name": "=\"Pitch\" + {{new Date().getFullYear()}}-{{(\"0\" + (new Date().getMonth() + 1)).slice(-2)}}-{{(\"0\" + new Date().getDate()).slice(-2)}}-{{(\"0\" + new Date().getHours()).slice(-2)}}:{{(\"0\" + new Date().getMinutes()).slice(-2)}}:{{(\"0\" + new Date().getSeconds()).slice(-2)}}",
  2148. "sameFolder": false,
  2149. "driveId": {
  2150. "__rl": true,
  2151. "mode": "list",
  2152. "value": "My Drive"
  2153. },
  2154. "folderId": {
  2155. "__rl": true,
  2156. "value": "={{ $json.id }}",
  2157. "mode": "id"
  2158. },
  2159. "options": {}
  2160. },
  2161. "id": "b8e22415-55ce-4662-8f0e-a0df3a223b79",
  2162. "name": "Copy temp src and generate unique name file2",
  2163. "type": "n8n-nodes-base.googleDrive",
  2164. "typeVersion": 3,
  2165. "position": [
  2166. -340,
  2167. -7000
  2168. ],
  2169. "credentials": {
  2170. "googleDriveOAuth2Api": {
  2171. "id": "qipLEwtX0VvgOAKy",
  2172. "name": "Google Drive account 2"
  2173. }
  2174. }
  2175. },
  2176. {
  2177. "parameters": {
  2178. "operation": "get",
  2179. "presentationId": "={{ $json.id }}"
  2180. },
  2181. "id": "0388d0b2-72bf-4046-a232-5aa33927a6da",
  2182. "name": "Getting the copied Slide2",
  2183. "type": "n8n-nodes-base.googleSlides",
  2184. "typeVersion": 2,
  2185. "position": [
  2186. 1420,
  2187. -7000
  2188. ],
  2189. "credentials": {
  2190. "googleSlidesOAuth2Api": {
  2191. "id": "yloV13TPeYn5lmdZ",
  2192. "name": "Google Slides account"
  2193. }
  2194. }
  2195. },
  2196. {
  2197. "parameters": {},
  2198. "id": "aad2049b-0ead-42f7-a5b1-a03d7c47aa22",
  2199. "name": "Merge20",
  2200. "type": "n8n-nodes-base.merge",
  2201. "typeVersion": 2.1,
  2202. "position": [
  2203. 1680,
  2204. -7060
  2205. ]
  2206. },
  2207. {
  2208. "parameters": {
  2209. "jsCode": "\n\n\n// Le alt text du triangle qu'on cherche\nconst targetDescription = \"bordure\";\n\n// Correcting the path to access borderColor \nif (!items[0].json.body || !items[0].json.body.selectedColor) {\n throw new Error(\"borderColor is undefined or not passed correctly.\");\n}\n\n// Adjusting to the correct path\nconst inputColor = items[0].json.body.selectedColor;\n\n// Assuming `items[0].json.slides` is the array of slides you received from the Slides API.\nconst slides = items[1].json.slides;\n\n// Placeholder for the found shapes\nlet foundShapes = [];\n\n// Loop over each slide\nfor (const slide of slides) {\n // Check if slide has pageElements and it's an array\n if (Array.isArray(slide.pageElements)) {\n // Find all shapes with the description 'triangle1' within the current slide\n const matchingShapes = slide.pageElements.filter(\n (element) => element.description === targetDescription\n );\n foundShapes = foundShapes.concat(matchingShapes);\n }\n}\n\n// Check if we found any shapes\nif (foundShapes.length > 0) {\n // Apply the new color to all found shapes.\n foundShapes.forEach(foundShape => {\n foundShape.shape.shapeProperties.shapeBackgroundFill.solidFill.color.rgbColor = {\n red: inputColor.red, // Ensure this is a value between 0 and 1\n green: inputColor.green, // Ensure this is a value between 0 and 1\n blue: inputColor.blue, // Ensure this is a value between 0 and 1\n alpha: inputColor.alpha || 1, // Default to 1 if alpha is not provided\n };\n });\n\n // Return the modified shapes and the presentationId\n return foundShapes.map(foundShape => ({\n json: {\n foundShape: foundShape,\n presentationId: items[1].json.presentationId\n }\n }));\n} else {\n // If no shapes with 'triangle1' description were found in any slide\n return [{ json: { error: \"Shape with description 'triangle1' not found\" } }];\n}\n"
  2210. },
  2211. "id": "2f9d6c29-b8df-482b-9e80-a652035399a8",
  2212. "name": "Code for color modification2",
  2213. "type": "n8n-nodes-base.code",
  2214. "typeVersion": 2,
  2215. "position": [
  2216. 1940,
  2217. -7060
  2218. ]
  2219. },
  2220. {
  2221. "parameters": {
  2222. "method": "POST",
  2223. "url": "=https://slides.googleapis.com/v1/presentations/{{ $('Code for color modification2').item.json.presentationId }}:batchUpdate",
  2224. "authentication": "predefinedCredentialType",
  2225. "nodeCredentialType": "googleSlidesOAuth2Api",
  2226. "sendBody": true,
  2227. "specifyBody": "json",
  2228. "jsonBody": "={\n \"requests\": [\n {\n \"updateShapeProperties\": {\n \"objectId\": \"{{ $json['foundShape']['objectId'] }}\",\n \"fields\": \"shapeBackgroundFill.solidFill.color\",\n \"shapeProperties\": {\n \"shapeBackgroundFill\": {\n \"solidFill\": {\n \"color\": {\n \"rgbColor\": {\n \"red\": \"{{ $json['foundShape']['shape']['shapeProperties']['shapeBackgroundFill']['solidFill']['color']['rgbColor']['red'] }}\",\n \"green\": \"{{ $json['foundShape']['shape']['shapeProperties']['shapeBackgroundFill']['solidFill']['color']['rgbColor']['green'] }}\",\n \"blue\": \"{{ $json['foundShape']['shape']['shapeProperties']['shapeBackgroundFill']['solidFill']['color']['rgbColor']['blue'] }}\"\n }\n }\n }\n }\n }\n }\n }\n ]\n}\n",
  2229. "options": {}
  2230. },
  2231. "id": "698e82f2-0ddb-4579-b3c5-41d7ced4a3e3",
  2232. "name": "Send new color to slides2",
  2233. "type": "n8n-nodes-base.httpRequest",
  2234. "typeVersion": 4.1,
  2235. "position": [
  2236. 2220,
  2237. -7060
  2238. ],
  2239. "credentials": {
  2240. "googleSlidesOAuth2Api": {
  2241. "id": "yloV13TPeYn5lmdZ",
  2242. "name": "Google Slides account"
  2243. }
  2244. }
  2245. },
  2246. {
  2247. "parameters": {
  2248. "operation": "replaceText",
  2249. "presentationId": "={{ $json.presentationId }}",
  2250. "textUi": {
  2251. "textValues": [
  2252. {
  2253. "pageObjectIds": [
  2254. "g1f1e0df403e_0_20"
  2255. ],
  2256. "replaceText": "={{ $json.sections.sectionContenu1 }}",
  2257. "text": "{{sectionContenu1}}"
  2258. },
  2259. {
  2260. "pageObjectIds": [
  2261. "g2c0a7f6a914_0_21"
  2262. ],
  2263. "replaceText": "={{ $json.sections.sectionContenu2 }}",
  2264. "text": "{{sectionContenu2}}"
  2265. },
  2266. {
  2267. "pageObjectIds": [
  2268. "g2c0a7f6a914_0_129"
  2269. ],
  2270. "replaceText": "={{ $json.sections.sectionContenu3 }}",
  2271. "text": "{{sectionContenu3}}"
  2272. },
  2273. {
  2274. "pageObjectIds": [
  2275. "g2c0a7f6a914_0_148"
  2276. ],
  2277. "replaceText": "={{ $json.sections.sectionContenu4 }}",
  2278. "text": "{{sectionContenu4}}"
  2279. },
  2280. {
  2281. "pageObjectIds": [
  2282. "g2c0a7f6a914_0_164"
  2283. ],
  2284. "replaceText": "={{ $json.sections.sectionContenu5 }}",
  2285. "text": "{{sectionContenu5}}"
  2286. },
  2287. {
  2288. "pageObjectIds": [
  2289. "g2c0a7f6a914_0_193"
  2290. ],
  2291. "replaceText": "={{ $json.sections.sectionContenu6 }}",
  2292. "text": "{{sectionContenu6}}"
  2293. },
  2294. {
  2295. "pageObjectIds": [
  2296. "g2c1a0221ae8_0_0"
  2297. ],
  2298. "replaceText": "={{ $json.sections.sectionContenu7 }}",
  2299. "text": "{{sectionContenu7}}"
  2300. }
  2301. ]
  2302. },
  2303. "options": {
  2304. "revisionId": ""
  2305. }
  2306. },
  2307. "id": "45b57613-4701-4c27-977c-43cb9c699dd1",
  2308. "name": "Insert cutText2",
  2309. "type": "n8n-nodes-base.googleSlides",
  2310. "typeVersion": 2,
  2311. "position": [
  2312. 2600,
  2313. -7260
  2314. ],
  2315. "credentials": {
  2316. "googleSlidesOAuth2Api": {
  2317. "id": "yloV13TPeYn5lmdZ",
  2318. "name": "Google Slides account"
  2319. }
  2320. }
  2321. },
  2322. {
  2323. "parameters": {
  2324. "method": "POST",
  2325. "url": "=https://slides.googleapis.com/v1/presentations/{{ $json.presentationId }}:batchUpdate ",
  2326. "authentication": "predefinedCredentialType",
  2327. "nodeCredentialType": "googleSlidesOAuth2Api",
  2328. "sendBody": true,
  2329. "specifyBody": "json",
  2330. "jsonBody": "={\n \"requests\": [\n {\n \"replaceAllShapesWithImage\": {\n \"imageUrl\": \"https://drive.google.com/uc?id={{ $json.image2Id }}\",\n \"imageReplaceMethod\": \"CENTER_INSIDE\",\n \"containsText\": { \"text\": \"placeholder-image-x\" }\n }\n }\n ]\n}",
  2331. "options": {}
  2332. },
  2333. "id": "ae8dea26-cbe9-48ca-a492-181d10fc2a9d",
  2334. "name": "Insert images 2 into placeholders 2",
  2335. "type": "n8n-nodes-base.httpRequest",
  2336. "typeVersion": 4.1,
  2337. "position": [
  2338. 2600,
  2339. -6620
  2340. ],
  2341. "credentials": {
  2342. "googleSlidesOAuth2Api": {
  2343. "id": "yloV13TPeYn5lmdZ",
  2344. "name": "Google Slides account"
  2345. }
  2346. }
  2347. },
  2348. {
  2349. "parameters": {
  2350. "method": "POST",
  2351. "url": "=https://slides.googleapis.com/v1/presentations/{{ $json.presentationId }}:batchUpdate",
  2352. "authentication": "predefinedCredentialType",
  2353. "nodeCredentialType": "googleSlidesOAuth2Api",
  2354. "sendBody": true,
  2355. "specifyBody": "json",
  2356. "jsonBody": "={\n \"requests\": [\n {\n \"replaceAllShapesWithImage\": {\n \"imageUrl\": \"https://drive.google.com/uc?id={{ $json.logoId }}\",\n \"imageReplaceMethod\": \"CENTER_INSIDE\",\n \"containsText\": { \"text\": \"Logo_client\" }\n }\n }\n ]\n} ",
  2357. "options": {}
  2358. },
  2359. "id": "92018233-075c-418f-b489-8f4c9beb74af",
  2360. "name": "Insert logo into PH2",
  2361. "type": "n8n-nodes-base.httpRequest",
  2362. "typeVersion": 4.1,
  2363. "position": [
  2364. 2600,
  2365. -6420
  2366. ],
  2367. "credentials": {
  2368. "googleSlidesOAuth2Api": {
  2369. "id": "yloV13TPeYn5lmdZ",
  2370. "name": "Google Slides account"
  2371. }
  2372. }
  2373. },
  2374. {
  2375. "parameters": {
  2376. "operation": "replaceText",
  2377. "presentationId": "={{ $json.presentationId }}",
  2378. "textUi": {
  2379. "textValues": [
  2380. {
  2381. "pageObjectIds": [
  2382. "p"
  2383. ],
  2384. "replaceText": "={{ $json.companyName }}",
  2385. "text": "{{nom_compagnie}}"
  2386. }
  2387. ]
  2388. },
  2389. "options": {
  2390. "revisionId": ""
  2391. }
  2392. },
  2393. "id": "b0cd3fb3-956e-4309-84e9-92eeaf1d3f80",
  2394. "name": "Insert companyName2",
  2395. "type": "n8n-nodes-base.googleSlides",
  2396. "typeVersion": 2,
  2397. "position": [
  2398. 2600,
  2399. -7060
  2400. ],
  2401. "credentials": {
  2402. "googleSlidesOAuth2Api": {
  2403. "id": "yloV13TPeYn5lmdZ",
  2404. "name": "Google Slides account"
  2405. }
  2406. }
  2407. },
  2408. {
  2409. "parameters": {
  2410. "operation": "replaceText",
  2411. "presentationId": "={{ $json.presentationId }}",
  2412. "textUi": {
  2413. "textValues": [
  2414. {
  2415. "replaceText": "= \n",
  2416. "text": "\\n"
  2417. }
  2418. ]
  2419. },
  2420. "options": {
  2421. "revisionId": ""
  2422. }
  2423. },
  2424. "id": "d7a3350f-7d2e-4c9f-9b27-75f30fc009e0",
  2425. "name": "remove \\n2",
  2426. "type": "n8n-nodes-base.googleSlides",
  2427. "typeVersion": 2,
  2428. "position": [
  2429. 2860,
  2430. -7260
  2431. ],
  2432. "credentials": {
  2433. "googleSlidesOAuth2Api": {
  2434. "id": "yloV13TPeYn5lmdZ",
  2435. "name": "Google Slides account"
  2436. }
  2437. }
  2438. },
  2439. {
  2440. "parameters": {
  2441. "method": "POST",
  2442. "url": "=https://slides.googleapis.com/v1/presentations/{{ $json.presentationId }}:batchUpdate ",
  2443. "authentication": "predefinedCredentialType",
  2444. "nodeCredentialType": "googleSlidesOAuth2Api",
  2445. "sendBody": true,
  2446. "specifyBody": "json",
  2447. "jsonBody": "={\n \"requests\": [\n {\n \"replaceAllShapesWithImage\": {\n \"imageUrl\": \"https://drive.google.com/uc?id={{ $json.image1Id }}\",\n \"imageReplaceMethod\": \"CENTER_INSIDE\",\n \"containsText\": { \"text\": \"placeholder-image-p\" }\n }\n }\n ]\n}\n",
  2448. "options": {}
  2449. },
  2450. "id": "bd65f526-6d8d-4a20-9069-267d3b90d37a",
  2451. "name": "Insert images into placeholders2",
  2452. "type": "n8n-nodes-base.httpRequest",
  2453. "typeVersion": 4.1,
  2454. "position": [
  2455. 2600,
  2456. -6820
  2457. ],
  2458. "credentials": {
  2459. "googleSlidesOAuth2Api": {
  2460. "id": "yloV13TPeYn5lmdZ",
  2461. "name": "Google Slides account"
  2462. }
  2463. }
  2464. },
  2465. {
  2466. "parameters": {
  2467. "url": "={{ $json.body.logoData }}",
  2468. "options": {
  2469. "response": {
  2470. "response": {
  2471. "responseFormat": "file"
  2472. }
  2473. }
  2474. }
  2475. },
  2476. "id": "979f62dc-7e90-4ec8-b9eb-ce3dd6a8ef5c",
  2477. "name": "Send logo to Google Drive2",
  2478. "type": "n8n-nodes-base.httpRequest",
  2479. "typeVersion": 4.1,
  2480. "position": [
  2481. -640,
  2482. -6820
  2483. ]
  2484. },
  2485. {
  2486. "parameters": {
  2487. "inputDataFieldName": "=data",
  2488. "driveId": {
  2489. "__rl": true,
  2490. "mode": "list",
  2491. "value": "My Drive"
  2492. },
  2493. "folderId": {
  2494. "__rl": true,
  2495. "value": "root",
  2496. "mode": "list",
  2497. "cachedResultName": "/ (Root folder)",
  2498. "cachedResultUrl": "https://drive.google.com/drive"
  2499. },
  2500. "options": {}
  2501. },
  2502. "id": "ea6ea03e-4572-4ed3-af19-96c53f705ce8",
  2503. "name": "Google Drive Upload logo2",
  2504. "type": "n8n-nodes-base.googleDrive",
  2505. "typeVersion": 3,
  2506. "position": [
  2507. -340,
  2508. -6820
  2509. ],
  2510. "credentials": {
  2511. "googleDriveOAuth2Api": {
  2512. "id": "qipLEwtX0VvgOAKy",
  2513. "name": "Google Drive account 2"
  2514. }
  2515. }
  2516. },
  2517. {
  2518. "parameters": {
  2519. "operation": "replaceText",
  2520. "presentationId": "={{ $json.presentationId }}",
  2521. "textUi": {
  2522. "textValues": [
  2523. {
  2524. "replaceText": "={{ $json.sections.sectionTitre1 }}",
  2525. "text": "{{sectionTitre1}}"
  2526. },
  2527. {
  2528. "replaceText": "={{ $json.sections.sectionTitre2 }}",
  2529. "text": "{{sectionTitre2}}"
  2530. },
  2531. {
  2532. "replaceText": "={{ $json.sections.sectionTitre3 }}",
  2533. "text": "{{sectionTitre3}}"
  2534. },
  2535. {
  2536. "replaceText": "={{ $json.sections.sectionTitre4 }}",
  2537. "text": "{{sectionTitre4}}"
  2538. },
  2539. {
  2540. "replaceText": "={{ $json.sections.sectionTitre5 }}",
  2541. "text": "{{sectionTitre5}}"
  2542. },
  2543. {
  2544. "replaceText": "={{ $json.sections.sectionTitre6 }}",
  2545. "text": "{{sectionTitre6}}"
  2546. },
  2547. {
  2548. "replaceText": "={{ $json.sections.sectionTitre7 }}",
  2549. "text": "{{sectionTitre7}}"
  2550. },
  2551. {
  2552. "pageObjectIds": [
  2553. "g1f4ef1b3123_0_0"
  2554. ],
  2555. "replaceText": "={{ $json.firstLinkDescription }}",
  2556. "text": "{{sectionDescription1}}"
  2557. },
  2558. {
  2559. "pageObjectIds": [
  2560. "g1f4ef1b3123_0_0"
  2561. ],
  2562. "replaceText": "={{ $json.secondLinkDescription }}",
  2563. "text": "{{sectionDescription2}}"
  2564. },
  2565. {
  2566. "pageObjectIds": [
  2567. "g1f4ef1b3123_0_0"
  2568. ],
  2569. "replaceText": "={{ $json.thirdLinkDescription }}",
  2570. "text": "{{sectionDescription3}}"
  2571. },
  2572. {
  2573. "pageObjectIds": [
  2574. "g1f4ef1b3123_0_0"
  2575. ],
  2576. "replaceText": "={{ $json.firstLinkDisplayName }} ",
  2577. "text": "{{sectionLien1}}"
  2578. },
  2579. {
  2580. "pageObjectIds": [
  2581. "g1f4ef1b3123_0_0"
  2582. ],
  2583. "replaceText": "={{ $json.secondLinkDisplayName }}",
  2584. "text": "{{sectionLien2}}"
  2585. },
  2586. {
  2587. "pageObjectIds": [
  2588. "g1f4ef1b3123_0_0"
  2589. ],
  2590. "replaceText": "={{ $json.thirdLinkDisplayName }}",
  2591. "text": "{{sectionLien3}}"
  2592. }
  2593. ]
  2594. },
  2595. "options": {
  2596. "revisionId": ""
  2597. }
  2598. },
  2599. "id": "148f5eeb-0a26-44d0-a52d-b0e23bfa40ea",
  2600. "name": "Insert cutTitles2",
  2601. "type": "n8n-nodes-base.googleSlides",
  2602. "typeVersion": 2,
  2603. "position": [
  2604. 2600,
  2605. -7460
  2606. ],
  2607. "credentials": {
  2608. "googleSlidesOAuth2Api": {
  2609. "id": "yloV13TPeYn5lmdZ",
  2610. "name": "Google Slides account"
  2611. }
  2612. }
  2613. },
  2614. {
  2615. "parameters": {},
  2616. "id": "39559b32-b93c-4e79-8200-49f66a19a7f2",
  2617. "name": "Merge21",
  2618. "type": "n8n-nodes-base.merge",
  2619. "typeVersion": 2.1,
  2620. "position": [
  2621. 1940,
  2622. -6820
  2623. ]
  2624. },
  2625. {
  2626. "parameters": {
  2627. "jsCode": "\nconst presentationId = items[1].json.presentationId;\nconst logoId = items[2].json.id;\nconst image1Id = items[3].json.id;\nconst image2Id = items[4].json.id;\n\n\n\n// Combine sections and presentationId in one object\nconst result = {\n presentationId: presentationId,\n image1Id: image1Id,\n image2Id: image2Id,\n logoId: logoId\n};\n\nreturn { json: result };\n"
  2628. },
  2629. "id": "d844d335-69a9-4e1d-a15d-d64c563209ff",
  2630. "name": "InsertImages4",
  2631. "type": "n8n-nodes-base.code",
  2632. "typeVersion": 2,
  2633. "position": [
  2634. 2220,
  2635. -6820
  2636. ],
  2637. "alwaysOutputData": false
  2638. },
  2639. {
  2640. "parameters": {
  2641. "jsCode": "const presentationId = items[0].json.presentationId;\nconst folderId = items[1].json.folderId;\n\n// presentationId in one object\nconst result = {\n presentationId: presentationId,\n folderId: folderId\n};\n\nreturn { json: result };\n"
  2642. },
  2643. "id": "eec9584d-cfb6-457c-b3ca-d692d175c178",
  2644. "name": "InsertImages5",
  2645. "type": "n8n-nodes-base.code",
  2646. "typeVersion": 2,
  2647. "position": [
  2648. 3020,
  2649. -6340
  2650. ],
  2651. "alwaysOutputData": false
  2652. },
  2653. {
  2654. "parameters": {
  2655. "respondWith": "allIncomingItems",
  2656. "options": {}
  2657. },
  2658. "id": "9fcdd9cf-01f4-4105-a221-a5fe75d58528",
  2659. "name": "Réponse au Webhook TEXT1",
  2660. "type": "n8n-nodes-base.respondToWebhook",
  2661. "typeVersion": 1,
  2662. "position": [
  2663. 3220,
  2664. -6340
  2665. ]
  2666. },
  2667. {
  2668. "parameters": {
  2669. "url": "={{ $json.body.imageUrls[0] }}",
  2670. "sendHeaders": true,
  2671. "headerParameters": {
  2672. "parameters": [
  2673. {
  2674. "name": "Accept",
  2675. "value": "image/*"
  2676. }
  2677. ]
  2678. },
  2679. "options": {
  2680. "response": {
  2681. "response": {
  2682. "responseFormat": "file"
  2683. }
  2684. }
  2685. }
  2686. },
  2687. "id": "a1028bfd-78ba-4073-84aa-c77625723aae",
  2688. "name": "Send image 1 to Google Drive2",
  2689. "type": "n8n-nodes-base.httpRequest",
  2690. "typeVersion": 4.1,
  2691. "position": [
  2692. -640,
  2693. -6640
  2694. ]
  2695. },
  2696. {
  2697. "parameters": {
  2698. "url": "={{ $json.body.imageUrls[1] }}",
  2699. "options": {
  2700. "response": {
  2701. "response": {
  2702. "responseFormat": "file"
  2703. }
  2704. }
  2705. }
  2706. },
  2707. "id": "82607f5e-8ff7-45e4-8a2b-fbea1f634466",
  2708. "name": "Send image 2 to Google Drive2",
  2709. "type": "n8n-nodes-base.httpRequest",
  2710. "typeVersion": 4.1,
  2711. "position": [
  2712. -640,
  2713. -6440
  2714. ]
  2715. },
  2716. {
  2717. "parameters": {
  2718. "jsCode": "\nconst presentationId = items[1].json.presentationId;\nconst imageUrls = items[0].json.body.imageUrls;\nconst logoData = items[0].json.body.logoData;\nconst companyName = items[0].json.body.companyName;\nconst urlGenerative = items[0].json.body.urlGenerative;\nconst firstLinkDescription = items[0].json.body.firstLink.description;\nconst firstLinkUrl = items[0].json.body.firstLink.url;\nconst firstLinkDisplayName = items[0].json.body.firstLink.displayName;\nconst secondLinkDescription = items[0].json.body.secondLink.description;\nconst secondLinkUrl = items[0].json.body.secondLink.url;\nconst secondLinkDisplayName = items[0].json.body.secondLink.displayName;\nconst thirdLinkDescription = items[0].json.body.thirdLink.description;\nconst thirdLinkUrl = items[0].json.body.thirdLink.url;\nconst thirdLinkDisplayName = items[0].json.body.thirdLink.displayName;\nconst red = items[0].json.body.selectedColor.red;\nconst green = items[0].json.body.selectedColor.green;\nconst blue = items[0].json.body.selectedColor.blue;\n\nconst text = items[0].json.body.output; // Make sure this is where your text is located\nconst sections = {};\nconst regex = /<h1 className=\"h1title\">(.*?)<\\/h1>\\s*<[^>]+>(.*?)<\\/[^>]+>/gis;\nconst removalRegex = /【\\d†source】/g; // Expression to remove undesired strings\n\nlet match;\nlet contentCounter = 1; // Counter for contents\nlet titleCounter = 1; // Counter for titles\n\nwhile ((match = regex.exec(text)) !== null) {\n let title = match[1].trim().replace(removalRegex, '');\n let content = match[2].trim().replace(removalRegex, '');\n \n const titlePlaceholder = `sectionTitre${titleCounter}`; // Placeholder for the title\n const contentPlaceholder = `sectionContenu${contentCounter}`; // Placeholder for the content\n sections[titlePlaceholder] = title.toUpperCase();\n sections[contentPlaceholder] = content;\n \n titleCounter++;\n contentCounter++;\n}\n\n// Combine sections and presentationId in one object\nconst result = {\n presentationId: presentationId,\n sections: sections,\n imageUrls: imageUrls,\n logoData: logoData,\n urlGenerative: urlGenerative,\n companyName: companyName,\n firstLinkDescription: firstLinkDescription,\n firstLinkUrl: firstLinkUrl,\n firstLinkDisplayName: firstLinkDisplayName,\n secondLinkDescription: secondLinkDescription,\n secondLinkUrl: secondLinkUrl,\n secondLinkDisplayName: secondLinkDisplayName,\n thirdLinkDescription: thirdLinkDescription,\n thirdLinkUrl: thirdLinkUrl,\n thirdLinkDisplayName: thirdLinkDisplayName,\n red: red,\n green: green,\n blue: blue\n};\n\nreturn { json: result };"
  2719. },
  2720. "id": "b438bd22-72f3-4371-9d79-105e91a634ae",
  2721. "name": "OutputTextCut2",
  2722. "type": "n8n-nodes-base.code",
  2723. "typeVersion": 2,
  2724. "position": [
  2725. 1940,
  2726. -7360
  2727. ],
  2728. "alwaysOutputData": false
  2729. },
  2730. {
  2731. "parameters": {
  2732. "method": "POST",
  2733. "url": "=https://slides.googleapis.com/v1/presentations/{{ $('OutputTextCut2').item.json.presentationId }}:batchUpdate",
  2734. "authentication": "predefinedCredentialType",
  2735. "nodeCredentialType": "googleSlidesOAuth2Api",
  2736. "sendHeaders": true,
  2737. "headerParameters": {
  2738. "parameters": [
  2739. {
  2740. "name": "Content-Type",
  2741. "value": "application/json"
  2742. }
  2743. ]
  2744. },
  2745. "sendBody": true,
  2746. "specifyBody": "json",
  2747. "jsonBody": "={\n \"requests\": [\n {\n \"updateTextStyle\": {\n \"objectId\": \"g2c0a7f6a914_0_4\",\n \"textRange\": {\n \"type\": \"FIXED_RANGE\",\n \"startIndex\": 0,\n \"endIndex\": 14\n },\n \"style\": {\n \"link\": {\n \"url\": \"{{ $json.urlGenerative }}\"\n },\n \"foregroundColor\": {\n \"opaqueColor\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n }\n }\n },\n \"underline\": false\n },\n \"fields\": \"link,foregroundColor,underline\"\n }\n },\n {\n \"updateImageProperties\": {\n \"objectId\": \"g2c0a7f6a914_0_6\",\n \"fields\": \"link\",\n \"imageProperties\": {\n \"link\": {\n \"url\": \"{{ $json.urlGenerative }}\"\n }\n }\n }\n },\n {\n \"updateTextStyle\": {\n \"objectId\": \"g2c7c4771883_0_0\",\n \"textRange\": {\n \"type\": \"FIXED_RANGE\",\n \"startIndex\": 0,\n \"endIndex\": 14\n },\n \"style\": {\n \"link\": {\n \"url\": \"{{ $json.urlGenerative }}\"\n },\n \"foregroundColor\": {\n \"opaqueColor\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n }\n }\n },\n \"underline\": false\n },\n \"fields\": \"link,foregroundColor,underline\"\n }\n },\n {\n \"updateImageProperties\": {\n \"objectId\": \"g2c0a7f6a914_0_32\",\n \"fields\": \"link\",\n \"imageProperties\": {\n \"link\": {\n \"url\": \"{{ $json.urlGenerative }}\"\n }\n }\n }\n },\n {\n \"updateTextStyle\": {\n \"objectId\": \"g2c7c4771883_0_2\",\n \"textRange\": {\n \"type\": \"FIXED_RANGE\",\n \"startIndex\": 0,\n \"endIndex\": 14\n },\n \"style\": {\n \"link\": {\n \"url\": \"{{ $json.urlGenerative }}\"\n },\n \"foregroundColor\": {\n \"opaqueColor\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n }\n }\n },\n \"underline\": false\n },\n \"fields\": \"link,foregroundColor,underline\"\n }\n },\n {\n \"updateImageProperties\": {\n \"objectId\": \"g2c0a7f6a914_0_138\",\n \"fields\": \"link\",\n \"imageProperties\": {\n \"link\": {\n \"url\": \"{{ $json.urlGenerative }}\"\n }\n }\n }\n },\n {\n \"updateTextStyle\": {\n \"objectId\": \"g2c7c4771883_0_1\",\n \"textRange\": {\n \"type\": \"FIXED_RANGE\",\n \"startIndex\": 0,\n \"endIndex\": 14\n },\n \"style\": {\n \"link\": {\n \"url\": \"{{ $json.urlGenerative }}\"\n },\n \"foregroundColor\": {\n \"opaqueColor\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n }\n }\n },\n \"underline\": false\n },\n \"fields\": \"link,foregroundColor,underline\"\n }\n },\n {\n \"updateImageProperties\": {\n \"objectId\": \"g2c0a7f6a914_0_159\",\n \"fields\": \"link\",\n \"imageProperties\": {\n \"link\": {\n \"url\": \"{{ $json.urlGenerative }}\"\n }\n }\n }\n },\n {\n \"updateTextStyle\": {\n \"objectId\": \"g2c7c4771883_0_3\",\n \"textRange\": {\n \"type\": \"FIXED_RANGE\",\n \"startIndex\": 0,\n \"endIndex\": 14\n },\n \"style\": {\n \"link\": {\n \"url\": \"{{ $json.urlGenerative }}\"\n },\n \"foregroundColor\": {\n \"opaqueColor\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n }\n }\n },\n \"underline\": false\n },\n \"fields\": \"link,foregroundColor,underline\"\n }\n },\n {\n \"updateImageProperties\": {\n \"objectId\": \"g2c0a7f6a914_0_174\",\n \"fields\": \"link\",\n \"imageProperties\": {\n \"link\": {\n \"url\": \"{{ $json.urlGenerative }}\"\n }\n }\n }\n },\n {\n \"updateTextStyle\": {\n \"objectId\": \"g2c7c4771883_0_4\",\n \"textRange\": {\n \"type\": \"FIXED_RANGE\",\n \"startIndex\": 0,\n \"endIndex\": 14\n },\n \"style\": {\n \"link\": {\n \"url\": \"{{ $json.urlGenerative }}\"\n },\n \"foregroundColor\": {\n \"opaqueColor\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n }\n }\n },\n \"underline\": false\n },\n \"fields\": \"link,foregroundColor,underline\"\n }\n },\n {\n \"updateImageProperties\": {\n \"objectId\": \"g2c0a7f6a914_0_204\",\n \"fields\": \"link\",\n \"imageProperties\": {\n \"link\": {\n \"url\": \"{{ $json.urlGenerative }}\"\n }\n }\n }\n },\n {\n \"updateTextStyle\": {\n \"objectId\": \"g2c7c4771883_0_6\",\n \"textRange\": {\n \"type\": \"FIXED_RANGE\",\n \"startIndex\": 0,\n \"endIndex\": 14\n },\n \"style\": {\n \"link\": {\n \"url\": \"{{ $json.urlGenerative }}\"\n },\n \"foregroundColor\": {\n \"opaqueColor\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n }\n }\n },\n \"underline\": false\n },\n \"fields\": \"link,foregroundColor,underline\"\n }\n },\n {\n \"updateImageProperties\": {\n \"objectId\": \"g2c1a0221ae8_0_11\",\n \"fields\": \"link\",\n \"imageProperties\": {\n \"link\": {\n \"url\": \"{{ $json.urlGenerative }}\"\n }\n }\n }\n },\n {\n \"updateTextStyle\": {\n \"objectId\": \"g2c7c4771883_0_7\",\n \"textRange\": {\n \"type\": \"FIXED_RANGE\",\n \"startIndex\": 0,\n \"endIndex\": 14\n },\n \"style\": {\n \"link\": {\n \"url\": \"{{ $json.urlGenerative }}\"\n },\n \"foregroundColor\": {\n \"opaqueColor\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n }\n }\n },\n \"underline\": false\n },\n \"fields\": \"link,foregroundColor,underline\"\n }\n },\n {\n \"updateImageProperties\": {\n \"objectId\": \"g2c0a7f6a914_0_16\",\n \"fields\": \"link\",\n \"imageProperties\": {\n \"link\": {\n \"url\": \"{{ $json.urlGenerative }}\"\n }\n }\n }\n },\n {\n \"updateTextStyle\": {\n \"objectId\": \"g2c7c4771883_0_9\",\n \"textRange\": {\n \"type\": \"FIXED_RANGE\",\n \"startIndex\": 0,\n \"endIndex\": 14\n },\n \"style\": {\n \"link\": {\n \"url\": \"{{ $json.urlGenerative }}\"\n },\n \"foregroundColor\": {\n \"opaqueColor\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n }\n }\n },\n \"underline\": false\n },\n \"fields\": \"link,foregroundColor,underline\"\n }\n },\n {\n \"updateImageProperties\": {\n \"objectId\": \"g1f4e164aa46_0_10\",\n \"fields\": \"link\",\n \"imageProperties\": {\n \"link\": {\n \"url\": \"{{ $json.urlGenerative }}\"\n }\n }\n }\n },\n {\n \"updateTextStyle\": {\n \"objectId\": \"g2c7c4771883_0_10\",\n \"textRange\": {\n \"type\": \"FIXED_RANGE\",\n \"startIndex\": 0,\n \"endIndex\": 14\n },\n \"style\": {\n \"link\": {\n \"url\": \"{{ $json.urlGenerative }}\"\n },\n \"foregroundColor\": {\n \"opaqueColor\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n }\n }\n },\n \"underline\": false\n },\n \"fields\": \"link,foregroundColor,underline\"\n }\n },\n {\n \"updateImageProperties\": {\n \"objectId\": \"g1f4ef1b3123_0_11\",\n \"fields\": \"link\",\n \"imageProperties\": {\n \"link\": {\n \"url\": \"{{ $json.urlGenerative }}\"\n }\n }\n }\n },\n {\n \"updateImageProperties\": {\n \"objectId\": \"g1f4ef1b3123_0_11\",\n \"fields\": \"link\",\n \"imageProperties\": {\n \"link\": {\n \"url\": \"{{ $json.urlGenerative }}\"\n }\n }\n }\n },\n {\n \"updateTextStyle\": {\n \"objectId\": \"g1f4ef1b3123_0_9\",\n \"textRange\": {\n \"type\": \"FIXED_RANGE\",\n \"startIndex\": 24,\n \"endIndex\": 41\n },\n \"style\": {\n \"link\": {\n \"url\": \"{{ $json.firstLinkUrl }}\"\n },\n \"foregroundColor\": {\n \"opaqueColor\": {\n \"rgbColor\": {\n \"red\": {{ $json.red }},\n \"green\": {{ $json.green }},\n \"blue\": {{ $json.blue }}\n }\n }\n },\n \"underline\": false\n },\n \"fields\": \"link,foregroundColor,underline\"\n }\n },\n {\n \"updateTextStyle\": {\n \"objectId\": \"g1f4ef1b3123_0_9\",\n \"textRange\": {\n \"type\": \"FIXED_RANGE\",\n \"startIndex\": 66,\n \"endIndex\": 83\n },\n \"style\": {\n \"link\": {\n \"url\": \"{{ $json.secondLinkUrl }}\"\n },\n \"foregroundColor\": {\n \"opaqueColor\": {\n \"rgbColor\": {\n \"red\": {{ $json.red }},\n \"green\": {{ $json.green }},\n \"blue\": {{ $json.blue }}\n }\n }\n },\n \"underline\": false\n },\n \"fields\": \"link,foregroundColor,underline\"\n }\n },\n {\n \"updateTextStyle\": {\n \"objectId\": \"g1f4ef1b3123_0_9\",\n \"textRange\": {\n \"type\": \"FIXED_RANGE\",\n \"startIndex\": 108,\n \"endIndex\": 125\n },\n \"style\": {\n \"link\": {\n \"url\": \"{{ $json.thirdLinkUrl }}\"\n },\n \"foregroundColor\": {\n \"opaqueColor\": {\n \"rgbColor\": {\n \"red\": {{ $json.red }},\n \"green\": {{ $json.green }},\n \"blue\": {{ $json.blue }}\n }\n }\n },\n \"underline\": false\n },\n \"fields\": \"link,foregroundColor,underline\"\n }\n }\n ]\n}\n",
  2748. "options": {}
  2749. },
  2750. "id": "e2e6619c-f9ea-48de-a9de-8a3dd8273435",
  2751. "name": "Send urlGenerative2",
  2752. "type": "n8n-nodes-base.httpRequest",
  2753. "typeVersion": 4.1,
  2754. "position": [
  2755. 2600,
  2756. -7640
  2757. ],
  2758. "credentials": {
  2759. "googleSlidesOAuth2Api": {
  2760. "id": "yloV13TPeYn5lmdZ",
  2761. "name": "Google Slides account"
  2762. }
  2763. }
  2764. },
  2765. {
  2766. "parameters": {
  2767. "operation": "getSlides",
  2768. "presentationId": "={{ $json.id }}"
  2769. },
  2770. "id": "f9acf718-40e7-4e4a-b782-c1809fe6733c",
  2771. "name": "Google Slides2",
  2772. "type": "n8n-nodes-base.googleSlides",
  2773. "typeVersion": 2,
  2774. "position": [
  2775. 1420,
  2776. -7200
  2777. ],
  2778. "credentials": {
  2779. "googleSlidesOAuth2Api": {
  2780. "id": "yloV13TPeYn5lmdZ",
  2781. "name": "Google Slides account"
  2782. }
  2783. }
  2784. },
  2785. {
  2786. "parameters": {
  2787. "jsCode": "const folderName = items[0].json.body.companyName;\nconst selectedColor = items[0].json.body.selectedColor;\n\nreturn [\n {\n json: {\n folderPath: folderName,\n color: selectedColor,\n }\n }\n];"
  2788. },
  2789. "id": "fde5d3e6-d887-47ca-939b-9c52a01ee418",
  2790. "name": "FolderName1",
  2791. "type": "n8n-nodes-base.code",
  2792. "typeVersion": 2,
  2793. "position": [
  2794. -640,
  2795. -7340
  2796. ]
  2797. },
  2798. {
  2799. "parameters": {
  2800. "resource": "folder",
  2801. "name": "={{ $json.folderPath }}",
  2802. "driveId": {
  2803. "__rl": true,
  2804. "mode": "list",
  2805. "value": "My Drive"
  2806. },
  2807. "folderId": {
  2808. "__rl": true,
  2809. "mode": "list",
  2810. "value": "root",
  2811. "cachedResultName": "/ (Root folder)"
  2812. },
  2813. "options": {}
  2814. },
  2815. "id": "eaa4f116-8d92-4566-a3d6-1fb937059c42",
  2816. "name": "CreateFolder1",
  2817. "type": "n8n-nodes-base.googleDrive",
  2818. "typeVersion": 3,
  2819. "position": [
  2820. -340,
  2821. -7340
  2822. ],
  2823. "credentials": {
  2824. "googleDriveOAuth2Api": {
  2825. "id": "qipLEwtX0VvgOAKy",
  2826. "name": "Google Drive account 2"
  2827. }
  2828. }
  2829. },
  2830. {
  2831. "parameters": {
  2832. "jsCode": "return [\n {\n json: {\n folderId: items[0].json.id,\n presentationId: items[1].json.id\n }\n }\n];"
  2833. },
  2834. "id": "b71f2380-eef3-44be-a6d2-19198980975f",
  2835. "name": "FolderId7",
  2836. "type": "n8n-nodes-base.code",
  2837. "typeVersion": 2,
  2838. "position": [
  2839. 700,
  2840. -7000
  2841. ]
  2842. },
  2843. {
  2844. "parameters": {
  2845. "operation": "move",
  2846. "fileId": {
  2847. "__rl": true,
  2848. "value": "={{ $json.presentationId }}",
  2849. "mode": "id"
  2850. },
  2851. "driveId": {
  2852. "__rl": true,
  2853. "mode": "list",
  2854. "value": "My Drive"
  2855. },
  2856. "folderId": {
  2857. "__rl": true,
  2858. "value": "=\n{{ $json.folderId }}",
  2859. "mode": "id"
  2860. }
  2861. },
  2862. "id": "d5dedd07-420a-421d-93a7-7adf19697fde",
  2863. "name": "Google Drive8",
  2864. "type": "n8n-nodes-base.googleDrive",
  2865. "typeVersion": 3,
  2866. "position": [
  2867. 980,
  2868. -7000
  2869. ],
  2870. "credentials": {
  2871. "googleDriveOAuth2Api": {
  2872. "id": "qipLEwtX0VvgOAKy",
  2873. "name": "Google Drive account 2"
  2874. }
  2875. }
  2876. },
  2877. {
  2878. "parameters": {},
  2879. "id": "17a3f13e-17bc-4848-8455-537f05e84c85",
  2880. "name": "Merge22",
  2881. "type": "n8n-nodes-base.merge",
  2882. "typeVersion": 2.1,
  2883. "position": [
  2884. 440,
  2885. -7000
  2886. ]
  2887. },
  2888. {
  2889. "parameters": {},
  2890. "id": "848bde7c-45d5-4626-b8b5-1c0a5597c58f",
  2891. "name": "Merge23",
  2892. "type": "n8n-nodes-base.merge",
  2893. "typeVersion": 2.1,
  2894. "position": [
  2895. 440,
  2896. -6820
  2897. ]
  2898. },
  2899. {
  2900. "parameters": {
  2901. "jsCode": "return [\n {\n json: {\n folderId: items[0].json.id,\n presentationId: items[1].json.id\n }\n }\n];"
  2902. },
  2903. "id": "4f1f059c-59c6-4766-a6df-3558af858a49",
  2904. "name": "FolderId8",
  2905. "type": "n8n-nodes-base.code",
  2906. "typeVersion": 2,
  2907. "position": [
  2908. 700,
  2909. -6820
  2910. ]
  2911. },
  2912. {
  2913. "parameters": {
  2914. "operation": "move",
  2915. "fileId": {
  2916. "__rl": true,
  2917. "value": "={{ $json.presentationId }}",
  2918. "mode": "id"
  2919. },
  2920. "driveId": {
  2921. "__rl": true,
  2922. "mode": "list",
  2923. "value": "My Drive"
  2924. },
  2925. "folderId": {
  2926. "__rl": true,
  2927. "value": "=\n{{ $json.folderId }}",
  2928. "mode": "id"
  2929. }
  2930. },
  2931. "id": "186dc2f4-f454-4e70-964f-aee453598277",
  2932. "name": "Google Drive9",
  2933. "type": "n8n-nodes-base.googleDrive",
  2934. "typeVersion": 3,
  2935. "position": [
  2936. 980,
  2937. -6820
  2938. ],
  2939. "credentials": {
  2940. "googleDriveOAuth2Api": {
  2941. "id": "qipLEwtX0VvgOAKy",
  2942. "name": "Google Drive account 2"
  2943. }
  2944. }
  2945. },
  2946. {
  2947. "parameters": {},
  2948. "id": "3478aa52-373a-4e25-8d66-25a251865cff",
  2949. "name": "Merge24",
  2950. "type": "n8n-nodes-base.merge",
  2951. "typeVersion": 2.1,
  2952. "position": [
  2953. 440,
  2954. -6640
  2955. ]
  2956. },
  2957. {
  2958. "parameters": {
  2959. "jsCode": "return [\n {\n json: {\n folderId: items[0].json.id,\n presentationId: items[1].json.id\n }\n }\n];"
  2960. },
  2961. "id": "501ac631-7427-4f0a-96dc-009a2e77a787",
  2962. "name": "FolderId9",
  2963. "type": "n8n-nodes-base.code",
  2964. "typeVersion": 2,
  2965. "position": [
  2966. 700,
  2967. -6640
  2968. ]
  2969. },
  2970. {
  2971. "parameters": {
  2972. "operation": "move",
  2973. "fileId": {
  2974. "__rl": true,
  2975. "value": "={{ $json.presentationId }}",
  2976. "mode": "id"
  2977. },
  2978. "driveId": {
  2979. "__rl": true,
  2980. "mode": "list",
  2981. "value": "My Drive"
  2982. },
  2983. "folderId": {
  2984. "__rl": true,
  2985. "value": "=\n{{ $json.folderId }}",
  2986. "mode": "id"
  2987. }
  2988. },
  2989. "id": "fcdeca37-19fa-46cd-8886-23c852467d54",
  2990. "name": "Google Drive10",
  2991. "type": "n8n-nodes-base.googleDrive",
  2992. "typeVersion": 3,
  2993. "position": [
  2994. 980,
  2995. -6640
  2996. ],
  2997. "credentials": {
  2998. "googleDriveOAuth2Api": {
  2999. "id": "qipLEwtX0VvgOAKy",
  3000. "name": "Google Drive account 2"
  3001. }
  3002. }
  3003. },
  3004. {
  3005. "parameters": {},
  3006. "id": "28c97c41-6e83-4d26-a00d-61691fd9c50c",
  3007. "name": "Merge25",
  3008. "type": "n8n-nodes-base.merge",
  3009. "typeVersion": 2.1,
  3010. "position": [
  3011. 440,
  3012. -6440
  3013. ]
  3014. },
  3015. {
  3016. "parameters": {
  3017. "jsCode": "return [\n {\n json: {\n folderId: items[0].json.id,\n presentationId: items[1].json.id\n }\n }\n];"
  3018. },
  3019. "id": "19184041-ad0e-4de1-949d-8c2cbb857bd8",
  3020. "name": "FolderId10",
  3021. "type": "n8n-nodes-base.code",
  3022. "typeVersion": 2,
  3023. "position": [
  3024. 700,
  3025. -6440
  3026. ]
  3027. },
  3028. {
  3029. "parameters": {
  3030. "operation": "move",
  3031. "fileId": {
  3032. "__rl": true,
  3033. "value": "={{ $json.presentationId }}",
  3034. "mode": "id"
  3035. },
  3036. "driveId": {
  3037. "__rl": true,
  3038. "mode": "list",
  3039. "value": "My Drive"
  3040. },
  3041. "folderId": {
  3042. "__rl": true,
  3043. "value": "=\n{{ $json.folderId }}",
  3044. "mode": "id"
  3045. }
  3046. },
  3047. "id": "f27839d7-8dd8-4eb3-b060-69ba3f175e5f",
  3048. "name": "Google Drive11",
  3049. "type": "n8n-nodes-base.googleDrive",
  3050. "typeVersion": 3,
  3051. "position": [
  3052. 980,
  3053. -6440
  3054. ],
  3055. "credentials": {
  3056. "googleDriveOAuth2Api": {
  3057. "id": "qipLEwtX0VvgOAKy",
  3058. "name": "Google Drive account 2"
  3059. }
  3060. }
  3061. },
  3062. {
  3063. "parameters": {},
  3064. "id": "1b0cbb06-7aab-427b-ab5f-50363c25bfcf",
  3065. "name": "Merge26",
  3066. "type": "n8n-nodes-base.merge",
  3067. "typeVersion": 2.1,
  3068. "position": [
  3069. 2800,
  3070. -6340
  3071. ]
  3072. },
  3073. {
  3074. "parameters": {
  3075. "jsCode": "const folderName = items[0].json.body.companyName;\nconst selectedColor = items[0].json.body.selectedColor;\n\nreturn [\n {\n json: {\n folderPath: folderName,\n color: selectedColor,\n }\n }\n];"
  3076. },
  3077. "id": "8567aebc-443e-4ebf-ade5-ebebf2f3b0c2",
  3078. "name": "FolderName3",
  3079. "type": "n8n-nodes-base.code",
  3080. "typeVersion": 2,
  3081. "position": [
  3082. -640,
  3083. -7180
  3084. ]
  3085. },
  3086. {
  3087. "parameters": {
  3088. "resource": "fileFolder",
  3089. "queryString": "={{ $json.folderPath }}",
  3090. "filter": {
  3091. "folderId": {
  3092. "mode": "list",
  3093. "value": "root",
  3094. "cachedResultName": "/ (Root folder)"
  3095. }
  3096. },
  3097. "options": {}
  3098. },
  3099. "id": "2f1a4698-8708-4666-b112-5abfc1aea430",
  3100. "name": "SearchFolder1",
  3101. "type": "n8n-nodes-base.googleDrive",
  3102. "typeVersion": 3,
  3103. "position": [
  3104. -340,
  3105. -7180
  3106. ],
  3107. "credentials": {
  3108. "googleDriveOAuth2Api": {
  3109. "id": "qipLEwtX0VvgOAKy",
  3110. "name": "Google Drive account 2"
  3111. }
  3112. }
  3113. },
  3114. {
  3115. "parameters": {
  3116. "httpMethod": "POST",
  3117. "path": "v4-generate-slides-folder-create-subfolder",
  3118. "responseMode": "responseNode",
  3119. "options": {
  3120. "allowedOrigins": "*"
  3121. }
  3122. },
  3123. "id": "d0627e62-2197-4f13-945b-58b3470cf6e1",
  3124. "name": "GenerateSlides_Create1",
  3125. "type": "n8n-nodes-base.webhook",
  3126. "typeVersion": 1.1,
  3127. "position": [
  3128. -940,
  3129. -7080
  3130. ],
  3131. "webhookId": "d845efd4-3b7b-4447-be4d-3cdfb1cddf2d"
  3132. },
  3133. {
  3134. "parameters": {
  3135. "httpMethod": "POST",
  3136. "path": "v4-generate-slides-folder-search-subfolder",
  3137. "responseMode": "responseNode",
  3138. "options": {
  3139. "allowedOrigins": "*"
  3140. }
  3141. },
  3142. "id": "9a013a0d-b8f3-489f-a13d-3d91ded74b56",
  3143. "name": "GenerateSlides_Search1",
  3144. "type": "n8n-nodes-base.webhook",
  3145. "typeVersion": 1.1,
  3146. "position": [
  3147. -940,
  3148. -6900
  3149. ],
  3150. "webhookId": "d845efd4-3b7b-4447-be4d-3cdfb1cddf2d"
  3151. },
  3152. {
  3153. "parameters": {
  3154. "resource": "folder",
  3155. "name": "={{new Date().getFullYear()}}-{{(\"0\" + (new Date().getMonth() + 1)).slice(-2)}}-{{(\"0\" + new Date().getDate()).slice(-2)}}_{{(\"0\" + new Date().getHours()).slice(-2)}}:{{(\"0\" + new Date().getMinutes()).slice(-2)}}",
  3156. "driveId": {
  3157. "__rl": true,
  3158. "mode": "list",
  3159. "value": "My Drive"
  3160. },
  3161. "folderId": {
  3162. "__rl": true,
  3163. "value": "={{ $json.id }}",
  3164. "mode": "id"
  3165. },
  3166. "options": {}
  3167. },
  3168. "id": "a85e0a50-7f4a-43f6-a1b5-5f6108cc762c",
  3169. "name": "CreateSubFolder",
  3170. "type": "n8n-nodes-base.googleDrive",
  3171. "typeVersion": 3,
  3172. "position": [
  3173. -80,
  3174. -7260
  3175. ],
  3176. "credentials": {
  3177. "googleDriveOAuth2Api": {
  3178. "id": "qipLEwtX0VvgOAKy",
  3179. "name": "Google Drive account 2"
  3180. }
  3181. }
  3182. },
  3183. {
  3184. "parameters": {
  3185. "method": "POST",
  3186. "url": "=https://slides.googleapis.com/v1/presentations/{{ $('OutputTextCut1').item.json.presentationId }}:batchUpdate",
  3187. "authentication": "predefinedCredentialType",
  3188. "nodeCredentialType": "googleSlidesOAuth2Api",
  3189. "sendHeaders": true,
  3190. "headerParameters": {
  3191. "parameters": [
  3192. {
  3193. "name": "Content-Type",
  3194. "value": "application/json"
  3195. }
  3196. ]
  3197. },
  3198. "sendBody": true,
  3199. "specifyBody": "json",
  3200. "jsonBody": "={\n \"requests\": [\n {\n \"updateTextStyle\": {\n \"objectId\": \"g2c0a7f6a914_0_4\",\n \"textRange\": {\n \"type\": \"FIXED_RANGE\",\n \"startIndex\": 0,\n \"endIndex\": 14\n },\n \"style\": {\n \"link\": {\n \"url\": \"{{ $json.urlGenerative }}\"\n },\n \"foregroundColor\": {\n \"opaqueColor\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n }\n }\n },\n \"underline\": false\n },\n \"fields\": \"link,foregroundColor,underline\"\n }\n },\n {\n \"updateImageProperties\": {\n \"objectId\": \"g2c0a7f6a914_0_6\",\n \"fields\": \"link\",\n \"imageProperties\": {\n \"link\": {\n \"url\": \"{{ $json.urlGenerative }}\"\n }\n }\n }\n },\n {\n \"updateTextStyle\": {\n \"objectId\": \"g2c7c4771883_0_0\",\n \"textRange\": {\n \"type\": \"FIXED_RANGE\",\n \"startIndex\": 0,\n \"endIndex\": 14\n },\n \"style\": {\n \"link\": {\n \"url\": \"{{ $json.urlGenerative }}\"\n },\n \"foregroundColor\": {\n \"opaqueColor\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n }\n }\n },\n \"underline\": false\n },\n \"fields\": \"link,foregroundColor,underline\"\n }\n },\n {\n \"updateImageProperties\": {\n \"objectId\": \"g2c0a7f6a914_0_32\",\n \"fields\": \"link\",\n \"imageProperties\": {\n \"link\": {\n \"url\": \"{{ $json.urlGenerative }}\"\n }\n }\n }\n },\n {\n \"updateTextStyle\": {\n \"objectId\": \"g2c7c4771883_0_2\",\n \"textRange\": {\n \"type\": \"FIXED_RANGE\",\n \"startIndex\": 0,\n \"endIndex\": 14\n },\n \"style\": {\n \"link\": {\n \"url\": \"{{ $json.urlGenerative }}\"\n },\n \"foregroundColor\": {\n \"opaqueColor\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n }\n }\n },\n \"underline\": false\n },\n \"fields\": \"link,foregroundColor,underline\"\n }\n },\n {\n \"updateImageProperties\": {\n \"objectId\": \"g2c0a7f6a914_0_138\",\n \"fields\": \"link\",\n \"imageProperties\": {\n \"link\": {\n \"url\": \"{{ $json.urlGenerative }}\"\n }\n }\n }\n },\n {\n \"updateTextStyle\": {\n \"objectId\": \"g2c7c4771883_0_1\",\n \"textRange\": {\n \"type\": \"FIXED_RANGE\",\n \"startIndex\": 0,\n \"endIndex\": 14\n },\n \"style\": {\n \"link\": {\n \"url\": \"{{ $json.urlGenerative }}\"\n },\n \"foregroundColor\": {\n \"opaqueColor\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n }\n }\n },\n \"underline\": false\n },\n \"fields\": \"link,foregroundColor,underline\"\n }\n },\n {\n \"updateImageProperties\": {\n \"objectId\": \"g2c0a7f6a914_0_159\",\n \"fields\": \"link\",\n \"imageProperties\": {\n \"link\": {\n \"url\": \"{{ $json.urlGenerative }}\"\n }\n }\n }\n },\n {\n \"updateTextStyle\": {\n \"objectId\": \"g2c7c4771883_0_3\",\n \"textRange\": {\n \"type\": \"FIXED_RANGE\",\n \"startIndex\": 0,\n \"endIndex\": 14\n },\n \"style\": {\n \"link\": {\n \"url\": \"{{ $json.urlGenerative }}\"\n },\n \"foregroundColor\": {\n \"opaqueColor\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n }\n }\n },\n \"underline\": false\n },\n \"fields\": \"link,foregroundColor,underline\"\n }\n },\n {\n \"updateImageProperties\": {\n \"objectId\": \"g2c0a7f6a914_0_174\",\n \"fields\": \"link\",\n \"imageProperties\": {\n \"link\": {\n \"url\": \"{{ $json.urlGenerative }}\"\n }\n }\n }\n },\n {\n \"updateTextStyle\": {\n \"objectId\": \"g2c7c4771883_0_4\",\n \"textRange\": {\n \"type\": \"FIXED_RANGE\",\n \"startIndex\": 0,\n \"endIndex\": 14\n },\n \"style\": {\n \"link\": {\n \"url\": \"{{ $json.urlGenerative }}\"\n },\n \"foregroundColor\": {\n \"opaqueColor\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n }\n }\n },\n \"underline\": false\n },\n \"fields\": \"link,foregroundColor,underline\"\n }\n },\n {\n \"updateImageProperties\": {\n \"objectId\": \"g2c0a7f6a914_0_204\",\n \"fields\": \"link\",\n \"imageProperties\": {\n \"link\": {\n \"url\": \"{{ $json.urlGenerative }}\"\n }\n }\n }\n },\n {\n \"updateTextStyle\": {\n \"objectId\": \"g2c7c4771883_0_6\",\n \"textRange\": {\n \"type\": \"FIXED_RANGE\",\n \"startIndex\": 0,\n \"endIndex\": 14\n },\n \"style\": {\n \"link\": {\n \"url\": \"{{ $json.urlGenerative }}\"\n },\n \"foregroundColor\": {\n \"opaqueColor\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n }\n }\n },\n \"underline\": false\n },\n \"fields\": \"link,foregroundColor,underline\"\n }\n },\n {\n \"updateImageProperties\": {\n \"objectId\": \"g2c1a0221ae8_0_11\",\n \"fields\": \"link\",\n \"imageProperties\": {\n \"link\": {\n \"url\": \"{{ $json.urlGenerative }}\"\n }\n }\n }\n },\n {\n \"updateTextStyle\": {\n \"objectId\": \"g2c7c4771883_0_7\",\n \"textRange\": {\n \"type\": \"FIXED_RANGE\",\n \"startIndex\": 0,\n \"endIndex\": 14\n },\n \"style\": {\n \"link\": {\n \"url\": \"{{ $json.urlGenerative }}\"\n },\n \"foregroundColor\": {\n \"opaqueColor\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n }\n }\n },\n \"underline\": false\n },\n \"fields\": \"link,foregroundColor,underline\"\n }\n },\n {\n \"updateImageProperties\": {\n \"objectId\": \"g2c0a7f6a914_0_16\",\n \"fields\": \"link\",\n \"imageProperties\": {\n \"link\": {\n \"url\": \"{{ $json.urlGenerative }}\"\n }\n }\n }\n },\n {\n \"updateTextStyle\": {\n \"objectId\": \"g2c7c4771883_0_9\",\n \"textRange\": {\n \"type\": \"FIXED_RANGE\",\n \"startIndex\": 0,\n \"endIndex\": 14\n },\n \"style\": {\n \"link\": {\n \"url\": \"{{ $json.urlGenerative }}\"\n },\n \"foregroundColor\": {\n \"opaqueColor\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n }\n }\n },\n \"underline\": false\n },\n \"fields\": \"link,foregroundColor,underline\"\n }\n },\n {\n \"updateImageProperties\": {\n \"objectId\": \"g1f4e164aa46_0_10\",\n \"fields\": \"link\",\n \"imageProperties\": {\n \"link\": {\n \"url\": \"{{ $json.urlGenerative }}\"\n }\n }\n }\n },\n {\n \"updateTextStyle\": {\n \"objectId\": \"g2c7c4771883_0_10\",\n \"textRange\": {\n \"type\": \"FIXED_RANGE\",\n \"startIndex\": 0,\n \"endIndex\": 14\n },\n \"style\": {\n \"link\": {\n \"url\": \"{{ $json.urlGenerative }}\"\n },\n \"foregroundColor\": {\n \"opaqueColor\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n }\n }\n },\n \"underline\": false\n },\n \"fields\": \"link,foregroundColor,underline\"\n }\n },\n {\n \"updateImageProperties\": {\n \"objectId\": \"g1f4ef1b3123_0_11\",\n \"fields\": \"link\",\n \"imageProperties\": {\n \"link\": {\n \"url\": \"{{ $json.urlGenerative }}\"\n }\n }\n }\n },\n {\n \"updateImageProperties\": {\n \"objectId\": \"g1f4ef1b3123_0_11\",\n \"fields\": \"link\",\n \"imageProperties\": {\n \"link\": {\n \"url\": \"{{ $json.urlGenerative }}\"\n }\n }\n }\n },\n {\n \"updateTextStyle\": {\n \"objectId\": \"g1f4ef1b3123_0_9\",\n \"textRange\": {\n \"type\": \"FIXED_RANGE\",\n \"startIndex\": 24,\n \"endIndex\": 41\n },\n \"style\": {\n \"link\": {\n \"url\": \"{{ $json.firstLinkUrl }}\"\n },\n \"foregroundColor\": {\n \"opaqueColor\": {\n \"rgbColor\": {\n \"red\": {{ $json.red }},\n \"green\": {{ $json.green }},\n \"blue\": {{ $json.blue }}\n }\n }\n },\n \"underline\": false\n },\n \"fields\": \"link,foregroundColor,underline\"\n }\n },\n {\n \"updateTextStyle\": {\n \"objectId\": \"g1f4ef1b3123_0_9\",\n \"textRange\": {\n \"type\": \"FIXED_RANGE\",\n \"startIndex\": 66,\n \"endIndex\": 83\n },\n \"style\": {\n \"link\": {\n \"url\": \"{{ $json.secondLinkUrl }}\"\n },\n \"foregroundColor\": {\n \"opaqueColor\": {\n \"rgbColor\": {\n \"red\": {{ $json.red }},\n \"green\": {{ $json.green }},\n \"blue\": {{ $json.blue }}\n }\n }\n },\n \"underline\": false\n },\n \"fields\": \"link,foregroundColor,underline\"\n }\n },\n {\n \"updateTextStyle\": {\n \"objectId\": \"g1f4ef1b3123_0_9\",\n \"textRange\": {\n \"type\": \"FIXED_RANGE\",\n \"startIndex\": 108,\n \"endIndex\": 125\n },\n \"style\": {\n \"link\": {\n \"url\": \"{{ $json.thirdLinkUrl }}\"\n },\n \"foregroundColor\": {\n \"opaqueColor\": {\n \"rgbColor\": {\n \"red\": {{ $json.red }},\n \"green\": {{ $json.green }},\n \"blue\": {{ $json.blue }}\n }\n }\n },\n \"underline\": false\n },\n \"fields\": \"link,foregroundColor,underline\"\n }\n }\n ]\n}\n",
  3201. "options": {}
  3202. },
  3203. "id": "508070ee-e9f0-47c3-8b83-09d840664731",
  3204. "name": "Send urlGenerative1",
  3205. "type": "n8n-nodes-base.httpRequest",
  3206. "typeVersion": 4.1,
  3207. "position": [
  3208. 2400,
  3209. -220
  3210. ],
  3211. "credentials": {
  3212. "googleSlidesOAuth2Api": {
  3213. "id": "yloV13TPeYn5lmdZ",
  3214. "name": "Google Slides account"
  3215. }
  3216. }
  3217. },
  3218. {
  3219. "parameters": {
  3220. "httpMethod": "POST",
  3221. "path": "v4-generate-slides-folder-search",
  3222. "responseMode": "responseNode",
  3223. "options": {
  3224. "allowedOrigins": "*"
  3225. }
  3226. },
  3227. "id": "7891309d-88c6-4499-b88e-0568a6e141e4",
  3228. "name": "GenerateSlides_Search",
  3229. "type": "n8n-nodes-base.webhook",
  3230. "typeVersion": 1.1,
  3231. "position": [
  3232. -740,
  3233. 520
  3234. ],
  3235. "webhookId": "d845efd4-3b7b-4447-be4d-3cdfb1cddf2d"
  3236. },
  3237. {
  3238. "parameters": {
  3239. "httpMethod": "POST",
  3240. "path": "v4-generate-slides-folder-create",
  3241. "responseMode": "responseNode",
  3242. "options": {
  3243. "allowedOrigins": "*"
  3244. }
  3245. },
  3246. "id": "70baf5d1-7e24-4bb8-8168-7f90393993a6",
  3247. "name": "GenerateSlides_Create",
  3248. "type": "n8n-nodes-base.webhook",
  3249. "typeVersion": 1.1,
  3250. "position": [
  3251. -740,
  3252. 340
  3253. ],
  3254. "webhookId": "d845efd4-3b7b-4447-be4d-3cdfb1cddf2d"
  3255. },
  3256. {
  3257. "parameters": {
  3258. "resource": "fileFolder",
  3259. "queryString": "={{ $json.folderPath }}",
  3260. "filter": {
  3261. "folderId": {
  3262. "mode": "list",
  3263. "value": "root",
  3264. "cachedResultName": "/ (Root folder)"
  3265. }
  3266. },
  3267. "options": {}
  3268. },
  3269. "id": "316566fe-a896-40d2-8ee2-2697aa3f668f",
  3270. "name": "SearchFolder",
  3271. "type": "n8n-nodes-base.googleDrive",
  3272. "typeVersion": 3,
  3273. "position": [
  3274. -140,
  3275. 240
  3276. ],
  3277. "credentials": {
  3278. "googleDriveOAuth2Api": {
  3279. "id": "qipLEwtX0VvgOAKy",
  3280. "name": "Google Drive account 2"
  3281. }
  3282. }
  3283. },
  3284. {
  3285. "parameters": {
  3286. "jsCode": "const folderName = items[0].json.body.companyName;\nconst selectedColor = items[0].json.body.selectedColor;\n\nreturn [\n {\n json: {\n folderPath: folderName,\n color: selectedColor,\n }\n }\n];"
  3287. },
  3288. "id": "bb1d5549-d6f1-4eb5-9bb4-e3fa9cc8799b",
  3289. "name": "FolderName2",
  3290. "type": "n8n-nodes-base.code",
  3291. "typeVersion": 2,
  3292. "position": [
  3293. -440,
  3294. 240
  3295. ]
  3296. },
  3297. {
  3298. "parameters": {},
  3299. "id": "c2026edd-36c6-4b84-ae89-27749f493d5e",
  3300. "name": "Merge14",
  3301. "type": "n8n-nodes-base.merge",
  3302. "typeVersion": 2.1,
  3303. "position": [
  3304. 2600,
  3305. 1080
  3306. ]
  3307. },
  3308. {
  3309. "parameters": {
  3310. "operation": "move",
  3311. "fileId": {
  3312. "__rl": true,
  3313. "value": "={{ $json.presentationId }}",
  3314. "mode": "id"
  3315. },
  3316. "driveId": {
  3317. "__rl": true,
  3318. "mode": "list",
  3319. "value": "My Drive"
  3320. },
  3321. "folderId": {
  3322. "__rl": true,
  3323. "value": "=\n{{ $json.folderId }}",
  3324. "mode": "id"
  3325. }
  3326. },
  3327. "id": "8a2c2640-ccc1-4494-b06d-87bf5459748b",
  3328. "name": "Google Drive4",
  3329. "type": "n8n-nodes-base.googleDrive",
  3330. "typeVersion": 3,
  3331. "position": [
  3332. 780,
  3333. 980
  3334. ],
  3335. "credentials": {
  3336. "googleDriveOAuth2Api": {
  3337. "id": "qipLEwtX0VvgOAKy",
  3338. "name": "Google Drive account 2"
  3339. }
  3340. }
  3341. },
  3342. {
  3343. "parameters": {
  3344. "jsCode": "return [\n {\n json: {\n folderId: items[0].json.id,\n presentationId: items[1].json.id\n }\n }\n];"
  3345. },
  3346. "id": "9215641d-1838-49fe-b097-6e9cec27a027",
  3347. "name": "FolderId3",
  3348. "type": "n8n-nodes-base.code",
  3349. "typeVersion": 2,
  3350. "position": [
  3351. 500,
  3352. 980
  3353. ]
  3354. },
  3355. {
  3356. "parameters": {},
  3357. "id": "55711424-302b-4f77-8502-c486fe42b4fe",
  3358. "name": "Merge13",
  3359. "type": "n8n-nodes-base.merge",
  3360. "typeVersion": 2.1,
  3361. "position": [
  3362. 240,
  3363. 980
  3364. ]
  3365. },
  3366. {
  3367. "parameters": {
  3368. "operation": "move",
  3369. "fileId": {
  3370. "__rl": true,
  3371. "value": "={{ $json.presentationId }}",
  3372. "mode": "id"
  3373. },
  3374. "driveId": {
  3375. "__rl": true,
  3376. "mode": "list",
  3377. "value": "My Drive"
  3378. },
  3379. "folderId": {
  3380. "__rl": true,
  3381. "value": "=\n{{ $json.folderId }}",
  3382. "mode": "id"
  3383. }
  3384. },
  3385. "id": "372bb3af-95f3-4740-8996-5d0c3a657d07",
  3386. "name": "Google Drive3",
  3387. "type": "n8n-nodes-base.googleDrive",
  3388. "typeVersion": 3,
  3389. "position": [
  3390. 780,
  3391. 780
  3392. ],
  3393. "credentials": {
  3394. "googleDriveOAuth2Api": {
  3395. "id": "qipLEwtX0VvgOAKy",
  3396. "name": "Google Drive account 2"
  3397. }
  3398. }
  3399. },
  3400. {
  3401. "parameters": {
  3402. "jsCode": "return [\n {\n json: {\n folderId: items[0].json.id,\n presentationId: items[1].json.id\n }\n }\n];"
  3403. },
  3404. "id": "fa019f60-0b14-4b3f-bee1-9ca0d5da0df1",
  3405. "name": "FolderId2",
  3406. "type": "n8n-nodes-base.code",
  3407. "typeVersion": 2,
  3408. "position": [
  3409. 500,
  3410. 780
  3411. ]
  3412. },
  3413. {
  3414. "parameters": {},
  3415. "id": "dc75ee62-95c4-4521-8dbc-97ef3418e12a",
  3416. "name": "Merge12",
  3417. "type": "n8n-nodes-base.merge",
  3418. "typeVersion": 2.1,
  3419. "position": [
  3420. 240,
  3421. 780
  3422. ]
  3423. },
  3424. {
  3425. "parameters": {
  3426. "operation": "move",
  3427. "fileId": {
  3428. "__rl": true,
  3429. "value": "={{ $json.presentationId }}",
  3430. "mode": "id"
  3431. },
  3432. "driveId": {
  3433. "__rl": true,
  3434. "mode": "list",
  3435. "value": "My Drive"
  3436. },
  3437. "folderId": {
  3438. "__rl": true,
  3439. "value": "=\n{{ $json.folderId }}",
  3440. "mode": "id"
  3441. }
  3442. },
  3443. "id": "9eb680e9-e607-4982-bc9c-2941b4cbbf7d",
  3444. "name": "Google Drive",
  3445. "type": "n8n-nodes-base.googleDrive",
  3446. "typeVersion": 3,
  3447. "position": [
  3448. 780,
  3449. 600
  3450. ],
  3451. "credentials": {
  3452. "googleDriveOAuth2Api": {
  3453. "id": "qipLEwtX0VvgOAKy",
  3454. "name": "Google Drive account 2"
  3455. }
  3456. }
  3457. },
  3458. {
  3459. "parameters": {
  3460. "jsCode": "return [\n {\n json: {\n folderId: items[0].json.id,\n presentationId: items[1].json.id\n }\n }\n];"
  3461. },
  3462. "id": "3d300779-0fec-4e43-91e6-8d8f281f0e58",
  3463. "name": "FolderId1",
  3464. "type": "n8n-nodes-base.code",
  3465. "typeVersion": 2,
  3466. "position": [
  3467. 500,
  3468. 600
  3469. ]
  3470. },
  3471. {
  3472. "parameters": {},
  3473. "id": "0bb16bc9-e57f-4063-b77b-8d222bd25e25",
  3474. "name": "Merge10",
  3475. "type": "n8n-nodes-base.merge",
  3476. "typeVersion": 2.1,
  3477. "position": [
  3478. 240,
  3479. 600
  3480. ]
  3481. },
  3482. {
  3483. "parameters": {},
  3484. "id": "c815fbbe-ce44-4f4f-ac11-a0c8894d51ee",
  3485. "name": "Merge11",
  3486. "type": "n8n-nodes-base.merge",
  3487. "typeVersion": 2.1,
  3488. "position": [
  3489. 240,
  3490. 420
  3491. ]
  3492. },
  3493. {
  3494. "parameters": {
  3495. "operation": "move",
  3496. "fileId": {
  3497. "__rl": true,
  3498. "value": "={{ $json.presentationId }}",
  3499. "mode": "id"
  3500. },
  3501. "driveId": {
  3502. "__rl": true,
  3503. "mode": "list",
  3504. "value": "My Drive"
  3505. },
  3506. "folderId": {
  3507. "__rl": true,
  3508. "value": "=\n{{ $json.folderId }}",
  3509. "mode": "id"
  3510. }
  3511. },
  3512. "id": "6b711626-ae03-48b8-b790-2bce0727173a",
  3513. "name": "Google Drive1",
  3514. "type": "n8n-nodes-base.googleDrive",
  3515. "typeVersion": 3,
  3516. "position": [
  3517. 780,
  3518. 420
  3519. ],
  3520. "credentials": {
  3521. "googleDriveOAuth2Api": {
  3522. "id": "qipLEwtX0VvgOAKy",
  3523. "name": "Google Drive account 2"
  3524. }
  3525. }
  3526. },
  3527. {
  3528. "parameters": {
  3529. "jsCode": "return [\n {\n json: {\n folderId: items[0].json.id,\n presentationId: items[1].json.id\n }\n }\n];"
  3530. },
  3531. "id": "7c440a10-1e00-4637-ad23-fdfec112f9da",
  3532. "name": "FolderId",
  3533. "type": "n8n-nodes-base.code",
  3534. "typeVersion": 2,
  3535. "position": [
  3536. 500,
  3537. 420
  3538. ]
  3539. },
  3540. {
  3541. "parameters": {
  3542. "resource": "folder",
  3543. "name": "={{ $json.folderPath }}",
  3544. "driveId": {
  3545. "__rl": true,
  3546. "mode": "list",
  3547. "value": "My Drive"
  3548. },
  3549. "folderId": {
  3550. "__rl": true,
  3551. "mode": "list",
  3552. "value": "root",
  3553. "cachedResultName": "/ (Root folder)"
  3554. },
  3555. "options": {}
  3556. },
  3557. "id": "a7abdef2-db99-4b28-b608-09fb8282c9f9",
  3558. "name": "CreateFolder",
  3559. "type": "n8n-nodes-base.googleDrive",
  3560. "typeVersion": 3,
  3561. "position": [
  3562. -140,
  3563. 80
  3564. ],
  3565. "credentials": {
  3566. "googleDriveOAuth2Api": {
  3567. "id": "qipLEwtX0VvgOAKy",
  3568. "name": "Google Drive account 2"
  3569. }
  3570. }
  3571. },
  3572. {
  3573. "parameters": {
  3574. "jsCode": "const folderName = items[0].json.body.companyName;\nconst selectedColor = items[0].json.body.selectedColor;\n\nreturn [\n {\n json: {\n folderPath: folderName,\n color: selectedColor,\n }\n }\n];"
  3575. },
  3576. "id": "365af3ca-c4ef-4c4e-b3f4-2ca984ce1644",
  3577. "name": "FolderName",
  3578. "type": "n8n-nodes-base.code",
  3579. "typeVersion": 2,
  3580. "position": [
  3581. -440,
  3582. 80
  3583. ]
  3584. },
  3585. {
  3586. "parameters": {
  3587. "operation": "getSlides",
  3588. "presentationId": "={{ $json.id }}"
  3589. },
  3590. "id": "cd752b2a-da52-4472-bcd6-694bb33a2125",
  3591. "name": "Google Slides1",
  3592. "type": "n8n-nodes-base.googleSlides",
  3593. "typeVersion": 2,
  3594. "position": [
  3595. 1220,
  3596. 240
  3597. ],
  3598. "credentials": {
  3599. "googleSlidesOAuth2Api": {
  3600. "id": "yloV13TPeYn5lmdZ",
  3601. "name": "Google Slides account"
  3602. }
  3603. }
  3604. },
  3605. {
  3606. "parameters": {
  3607. "jsCode": "\nconst presentationId = items[1].json.presentationId;\nconst imageUrls = items[0].json.body.imageUrls;\nconst logoData = items[0].json.body.logoData;\nconst companyName = items[0].json.body.companyName;\nconst urlGenerative = items[0].json.body.urlGenerative;\nconst firstLinkDescription = items[0].json.body.firstLink.description;\nconst firstLinkUrl = items[0].json.body.firstLink.url;\nconst firstLinkDisplayName = items[0].json.body.firstLink.displayName;\nconst secondLinkDescription = items[0].json.body.secondLink.description;\nconst secondLinkUrl = items[0].json.body.secondLink.url;\nconst secondLinkDisplayName = items[0].json.body.secondLink.displayName;\nconst thirdLinkDescription = items[0].json.body.thirdLink.description;\nconst thirdLinkUrl = items[0].json.body.thirdLink.url;\nconst thirdLinkDisplayName = items[0].json.body.thirdLink.displayName;\nconst red = items[0].json.body.selectedColor.red;\nconst green = items[0].json.body.selectedColor.green;\nconst blue = items[0].json.body.selectedColor.blue;\n\nconst text = items[0].json.body.output; // Make sure this is where your text is located\nconst sections = {};\nconst regex = /<h1 className=\"h1title\">(.*?)<\\/h1>\\s*<[^>]+>(.*?)<\\/[^>]+>/gis;\nconst removalRegex = /【\\d†source】/g; // Expression to remove undesired strings\n\nlet match;\nlet contentCounter = 1; // Counter for contents\nlet titleCounter = 1; // Counter for titles\n\nwhile ((match = regex.exec(text)) !== null) {\n let title = match[1].trim().replace(removalRegex, '');\n let content = match[2].trim().replace(removalRegex, '');\n \n const titlePlaceholder = `sectionTitre${titleCounter}`; // Placeholder for the title\n const contentPlaceholder = `sectionContenu${contentCounter}`; // Placeholder for the content\n sections[titlePlaceholder] = title.toUpperCase();\n sections[contentPlaceholder] = content;\n \n titleCounter++;\n contentCounter++;\n}\n\n// Combine sections and presentationId in one object\nconst result = {\n presentationId: presentationId,\n sections: sections,\n imageUrls: imageUrls,\n logoData: logoData,\n urlGenerative: urlGenerative,\n companyName: companyName,\n firstLinkDescription: firstLinkDescription,\n firstLinkUrl: firstLinkUrl,\n firstLinkDisplayName: firstLinkDisplayName,\n secondLinkDescription: secondLinkDescription,\n secondLinkUrl: secondLinkUrl,\n secondLinkDisplayName: secondLinkDisplayName,\n thirdLinkDescription: thirdLinkDescription,\n thirdLinkUrl: thirdLinkUrl,\n thirdLinkDisplayName: thirdLinkDisplayName,\n red: red,\n green: green,\n blue: blue\n};\n\nreturn { json: result };"
  3608. },
  3609. "id": "9b78d68b-d79f-43f4-b182-0d9bcbc804bf",
  3610. "name": "OutputTextCut1",
  3611. "type": "n8n-nodes-base.code",
  3612. "typeVersion": 2,
  3613. "position": [
  3614. 1740,
  3615. 60
  3616. ],
  3617. "alwaysOutputData": false
  3618. },
  3619. {
  3620. "parameters": {
  3621. "url": "={{ $json.body.imageUrls[1] }}",
  3622. "options": {
  3623. "response": {
  3624. "response": {
  3625. "responseFormat": "file"
  3626. }
  3627. }
  3628. }
  3629. },
  3630. "id": "3dcf8916-89a0-41d2-8f8f-b4102a66d961",
  3631. "name": "Send image 2 to Google Drive1",
  3632. "type": "n8n-nodes-base.httpRequest",
  3633. "typeVersion": 4.1,
  3634. "position": [
  3635. -440,
  3636. 980
  3637. ]
  3638. },
  3639. {
  3640. "parameters": {
  3641. "url": "={{ $json.body.imageUrls[0] }}",
  3642. "options": {
  3643. "response": {
  3644. "response": {
  3645. "responseFormat": "file"
  3646. }
  3647. }
  3648. }
  3649. },
  3650. "id": "1eb8ccfb-10ee-4de6-b0c4-1e7e32d39910",
  3651. "name": "Send image 1 to Google Drive1",
  3652. "type": "n8n-nodes-base.httpRequest",
  3653. "typeVersion": 4.1,
  3654. "position": [
  3655. -440,
  3656. 780
  3657. ]
  3658. },
  3659. {
  3660. "parameters": {
  3661. "respondWith": "allIncomingItems",
  3662. "options": {}
  3663. },
  3664. "id": "112196d9-15a5-4557-a741-46cedaab7f2a",
  3665. "name": "Réponse au Webhook TEXT",
  3666. "type": "n8n-nodes-base.respondToWebhook",
  3667. "typeVersion": 1,
  3668. "position": [
  3669. 3020,
  3670. 1080
  3671. ]
  3672. },
  3673. {
  3674. "parameters": {
  3675. "jsCode": "const presentationId = items[0].json.presentationId;\nconst folderId = items[1].json.folderId;\n\n// presentationId in one object\nconst result = {\n presentationId: presentationId,\n folderId: folderId\n};\n\nreturn { json: result };\n"
  3676. },
  3677. "id": "d9a58dea-b40b-470b-b48b-a6ba65a6ab9f",
  3678. "name": "InsertImages3",
  3679. "type": "n8n-nodes-base.code",
  3680. "typeVersion": 2,
  3681. "position": [
  3682. 2820,
  3683. 1080
  3684. ],
  3685. "alwaysOutputData": false
  3686. },
  3687. {
  3688. "parameters": {
  3689. "jsCode": "\nconst presentationId = items[1].json.presentationId;\nconst logoId = items[2].json.id;\nconst image1Id = items[3].json.id;\nconst image2Id = items[4].json.id;\n\n\n\n// Combine sections and presentationId in one object\nconst result = {\n presentationId: presentationId,\n image1Id: image1Id,\n image2Id: image2Id,\n logoId: logoId\n};\n\nreturn { json: result };\n"
  3690. },
  3691. "id": "15aae91a-86da-4f2a-bab1-7917cd8ee2aa",
  3692. "name": "InsertImages1",
  3693. "type": "n8n-nodes-base.code",
  3694. "typeVersion": 2,
  3695. "position": [
  3696. 2020,
  3697. 600
  3698. ],
  3699. "alwaysOutputData": false
  3700. },
  3701. {
  3702. "parameters": {},
  3703. "id": "1dfed88a-855a-46b2-981e-0ddf6b356fd4",
  3704. "name": "Merge9",
  3705. "type": "n8n-nodes-base.merge",
  3706. "typeVersion": 2.1,
  3707. "position": [
  3708. 1740,
  3709. 600
  3710. ]
  3711. },
  3712. {
  3713. "parameters": {
  3714. "operation": "replaceText",
  3715. "presentationId": "={{ $json.presentationId }}",
  3716. "textUi": {
  3717. "textValues": [
  3718. {
  3719. "replaceText": "={{ $json.sections.sectionTitre1 }}",
  3720. "text": "{{sectionTitre1}}"
  3721. },
  3722. {
  3723. "replaceText": "={{ $json.sections.sectionTitre2 }}",
  3724. "text": "{{sectionTitre2}}"
  3725. },
  3726. {
  3727. "replaceText": "={{ $json.sections.sectionTitre3 }}",
  3728. "text": "{{sectionTitre3}}"
  3729. },
  3730. {
  3731. "replaceText": "={{ $json.sections.sectionTitre4 }}",
  3732. "text": "{{sectionTitre4}}"
  3733. },
  3734. {
  3735. "replaceText": "={{ $json.sections.sectionTitre5 }}",
  3736. "text": "{{sectionTitre5}}"
  3737. },
  3738. {
  3739. "replaceText": "={{ $json.sections.sectionTitre6 }}",
  3740. "text": "{{sectionTitre6}}"
  3741. },
  3742. {
  3743. "replaceText": "={{ $json.sections.sectionTitre7 }}",
  3744. "text": "{{sectionTitre7}}"
  3745. },
  3746. {
  3747. "pageObjectIds": [
  3748. "g1f4ef1b3123_0_0"
  3749. ],
  3750. "replaceText": "={{ $json.firstLinkDescription }}",
  3751. "text": "{{sectionDescription1}}"
  3752. },
  3753. {
  3754. "pageObjectIds": [
  3755. "g1f4ef1b3123_0_0"
  3756. ],
  3757. "replaceText": "={{ $json.secondLinkDescription }}",
  3758. "text": "{{sectionDescription2}}"
  3759. },
  3760. {
  3761. "pageObjectIds": [
  3762. "g1f4ef1b3123_0_0"
  3763. ],
  3764. "replaceText": "={{ $json.thirdLinkDescription }}",
  3765. "text": "{{sectionDescription3}}"
  3766. },
  3767. {
  3768. "pageObjectIds": [
  3769. "g1f4ef1b3123_0_0"
  3770. ],
  3771. "replaceText": "={{ $json.firstLinkDisplayName }} ",
  3772. "text": "{{sectionLien1}}"
  3773. },
  3774. {
  3775. "pageObjectIds": [
  3776. "g1f4ef1b3123_0_0"
  3777. ],
  3778. "replaceText": "={{ $json.secondLinkDisplayName }}",
  3779. "text": "{{sectionLien2}}"
  3780. },
  3781. {
  3782. "pageObjectIds": [
  3783. "g1f4ef1b3123_0_0"
  3784. ],
  3785. "replaceText": "={{ $json.thirdLinkDisplayName }}",
  3786. "text": "{{sectionLien3}}"
  3787. }
  3788. ]
  3789. },
  3790. "options": {
  3791. "revisionId": ""
  3792. }
  3793. },
  3794. "id": "5d7e4432-1f7b-45da-a018-dafc41177cbd",
  3795. "name": "Insert cutTitles",
  3796. "type": "n8n-nodes-base.googleSlides",
  3797. "typeVersion": 2,
  3798. "position": [
  3799. 2400,
  3800. -40
  3801. ],
  3802. "credentials": {
  3803. "googleSlidesOAuth2Api": {
  3804. "id": "yloV13TPeYn5lmdZ",
  3805. "name": "Google Slides account"
  3806. }
  3807. }
  3808. },
  3809. {
  3810. "parameters": {
  3811. "inputDataFieldName": "=data",
  3812. "driveId": {
  3813. "__rl": true,
  3814. "mode": "list",
  3815. "value": "My Drive"
  3816. },
  3817. "folderId": {
  3818. "__rl": true,
  3819. "value": "root",
  3820. "mode": "list",
  3821. "cachedResultName": "/ (Root folder)",
  3822. "cachedResultUrl": "https://drive.google.com/drive"
  3823. },
  3824. "options": {}
  3825. },
  3826. "id": "cdeef1df-0167-4e1a-abcb-394f1cfca547",
  3827. "name": "Google Drive Upload logo1",
  3828. "type": "n8n-nodes-base.googleDrive",
  3829. "typeVersion": 3,
  3830. "position": [
  3831. -140,
  3832. 600
  3833. ],
  3834. "credentials": {
  3835. "googleDriveOAuth2Api": {
  3836. "id": "qipLEwtX0VvgOAKy",
  3837. "name": "Google Drive account 2"
  3838. }
  3839. }
  3840. },
  3841. {
  3842. "parameters": {
  3843. "url": "={{ $json.body.logoData }}",
  3844. "options": {
  3845. "response": {
  3846. "response": {
  3847. "responseFormat": "file"
  3848. }
  3849. }
  3850. }
  3851. },
  3852. "id": "be9adbed-f9c3-4c54-a3ab-74dbe1ae471a",
  3853. "name": "Send logo to Google Drive1",
  3854. "type": "n8n-nodes-base.httpRequest",
  3855. "typeVersion": 4.1,
  3856. "position": [
  3857. -440,
  3858. 600
  3859. ]
  3860. },
  3861. {
  3862. "parameters": {
  3863. "method": "POST",
  3864. "url": "=https://slides.googleapis.com/v1/presentations/{{ $json.presentationId }}:batchUpdate ",
  3865. "authentication": "predefinedCredentialType",
  3866. "nodeCredentialType": "googleSlidesOAuth2Api",
  3867. "sendBody": true,
  3868. "specifyBody": "json",
  3869. "jsonBody": "={\n \"requests\": [\n {\n \"replaceAllShapesWithImage\": {\n \"imageUrl\": \"https://drive.google.com/uc?id={{ $json.image1Id }}\",\n \"imageReplaceMethod\": \"CENTER_INSIDE\",\n \"containsText\": { \"text\": \"placeholder-image-p\" }\n }\n }\n ]\n}\n",
  3870. "options": {}
  3871. },
  3872. "id": "39a9069a-3299-40f8-80a6-67149e03b210",
  3873. "name": "Insert images into placeholders",
  3874. "type": "n8n-nodes-base.httpRequest",
  3875. "typeVersion": 4.1,
  3876. "position": [
  3877. 2400,
  3878. 600
  3879. ],
  3880. "credentials": {
  3881. "googleSlidesOAuth2Api": {
  3882. "id": "yloV13TPeYn5lmdZ",
  3883. "name": "Google Slides account"
  3884. }
  3885. }
  3886. },
  3887. {
  3888. "parameters": {
  3889. "operation": "replaceText",
  3890. "presentationId": "={{ $json.presentationId }}",
  3891. "textUi": {
  3892. "textValues": [
  3893. {
  3894. "replaceText": "= \n",
  3895. "text": "\\n"
  3896. }
  3897. ]
  3898. },
  3899. "options": {
  3900. "revisionId": ""
  3901. }
  3902. },
  3903. "id": "e8162332-aeaf-4ea5-afa0-5806016afaac",
  3904. "name": "remove \\n",
  3905. "type": "n8n-nodes-base.googleSlides",
  3906. "typeVersion": 2,
  3907. "position": [
  3908. 2660,
  3909. 160
  3910. ],
  3911. "credentials": {
  3912. "googleSlidesOAuth2Api": {
  3913. "id": "yloV13TPeYn5lmdZ",
  3914. "name": "Google Slides account"
  3915. }
  3916. }
  3917. },
  3918. {
  3919. "parameters": {
  3920. "operation": "replaceText",
  3921. "presentationId": "={{ $json.presentationId }}",
  3922. "textUi": {
  3923. "textValues": [
  3924. {
  3925. "pageObjectIds": [
  3926. "p"
  3927. ],
  3928. "replaceText": "={{ $json.companyName }}",
  3929. "text": "{{nom_compagnie}}"
  3930. }
  3931. ]
  3932. },
  3933. "options": {
  3934. "revisionId": ""
  3935. }
  3936. },
  3937. "id": "b0ea87d4-f02d-4b78-a243-0081bc6b08c8",
  3938. "name": "Insert companyName",
  3939. "type": "n8n-nodes-base.googleSlides",
  3940. "typeVersion": 2,
  3941. "position": [
  3942. 2400,
  3943. 360
  3944. ],
  3945. "credentials": {
  3946. "googleSlidesOAuth2Api": {
  3947. "id": "yloV13TPeYn5lmdZ",
  3948. "name": "Google Slides account"
  3949. }
  3950. }
  3951. },
  3952. {
  3953. "parameters": {
  3954. "method": "POST",
  3955. "url": "=https://slides.googleapis.com/v1/presentations/{{ $json.presentationId }}:batchUpdate",
  3956. "authentication": "predefinedCredentialType",
  3957. "nodeCredentialType": "googleSlidesOAuth2Api",
  3958. "sendBody": true,
  3959. "specifyBody": "json",
  3960. "jsonBody": "={\n \"requests\": [\n {\n \"replaceAllShapesWithImage\": {\n \"imageUrl\": \"https://drive.google.com/uc?id={{ $json.logoId }}\",\n \"imageReplaceMethod\": \"CENTER_INSIDE\",\n \"containsText\": { \"text\": \"Logo_client\" }\n }\n }\n ]\n} ",
  3961. "options": {}
  3962. },
  3963. "id": "e6067534-1180-4e57-852d-44eaba97f797",
  3964. "name": "Insert logo into PH",
  3965. "type": "n8n-nodes-base.httpRequest",
  3966. "typeVersion": 4.1,
  3967. "position": [
  3968. 2400,
  3969. 1000
  3970. ],
  3971. "credentials": {
  3972. "googleSlidesOAuth2Api": {
  3973. "id": "yloV13TPeYn5lmdZ",
  3974. "name": "Google Slides account"
  3975. }
  3976. }
  3977. },
  3978. {
  3979. "parameters": {
  3980. "method": "POST",
  3981. "url": "=https://slides.googleapis.com/v1/presentations/{{ $json.presentationId }}:batchUpdate ",
  3982. "authentication": "predefinedCredentialType",
  3983. "nodeCredentialType": "googleSlidesOAuth2Api",
  3984. "sendBody": true,
  3985. "specifyBody": "json",
  3986. "jsonBody": "={\n \"requests\": [\n {\n \"replaceAllShapesWithImage\": {\n \"imageUrl\": \"https://drive.google.com/uc?id={{ $json.image2Id }}\",\n \"imageReplaceMethod\": \"CENTER_INSIDE\",\n \"containsText\": { \"text\": \"placeholder-image-x\" }\n }\n }\n ]\n}",
  3987. "options": {}
  3988. },
  3989. "id": "7b1d0228-2cac-43b8-9ad3-10042227ba0b",
  3990. "name": "Insert images 2 into placeholders 1",
  3991. "type": "n8n-nodes-base.httpRequest",
  3992. "typeVersion": 4.1,
  3993. "position": [
  3994. 2400,
  3995. 800
  3996. ],
  3997. "credentials": {
  3998. "googleSlidesOAuth2Api": {
  3999. "id": "yloV13TPeYn5lmdZ",
  4000. "name": "Google Slides account"
  4001. }
  4002. }
  4003. },
  4004. {
  4005. "parameters": {
  4006. "operation": "replaceText",
  4007. "presentationId": "={{ $json.presentationId }}",
  4008. "textUi": {
  4009. "textValues": [
  4010. {
  4011. "pageObjectIds": [
  4012. "g1f1e0df403e_0_20"
  4013. ],
  4014. "replaceText": "={{ $json.sections.sectionContenu1 }}",
  4015. "text": "{{sectionContenu1}}"
  4016. },
  4017. {
  4018. "pageObjectIds": [
  4019. "g2c0a7f6a914_0_21"
  4020. ],
  4021. "replaceText": "={{ $json.sections.sectionContenu2 }}",
  4022. "text": "{{sectionContenu2}}"
  4023. },
  4024. {
  4025. "pageObjectIds": [
  4026. "g2c0a7f6a914_0_129"
  4027. ],
  4028. "replaceText": "={{ $json.sections.sectionContenu3 }}",
  4029. "text": "{{sectionContenu3}}"
  4030. },
  4031. {
  4032. "pageObjectIds": [
  4033. "g2c0a7f6a914_0_148"
  4034. ],
  4035. "replaceText": "={{ $json.sections.sectionContenu4 }}",
  4036. "text": "{{sectionContenu4}}"
  4037. },
  4038. {
  4039. "pageObjectIds": [
  4040. "g2c0a7f6a914_0_164"
  4041. ],
  4042. "replaceText": "={{ $json.sections.sectionContenu5 }}",
  4043. "text": "{{sectionContenu5}}"
  4044. },
  4045. {
  4046. "pageObjectIds": [
  4047. "g2c0a7f6a914_0_193"
  4048. ],
  4049. "replaceText": "={{ $json.sections.sectionContenu6 }}",
  4050. "text": "{{sectionContenu6}}"
  4051. },
  4052. {
  4053. "pageObjectIds": [
  4054. "g2c1a0221ae8_0_0"
  4055. ],
  4056. "replaceText": "={{ $json.sections.sectionContenu7 }}",
  4057. "text": "{{sectionContenu7}}"
  4058. }
  4059. ]
  4060. },
  4061. "options": {
  4062. "revisionId": ""
  4063. }
  4064. },
  4065. "id": "803fd271-20c5-45fb-964e-b97156b297f0",
  4066. "name": "Insert cutText",
  4067. "type": "n8n-nodes-base.googleSlides",
  4068. "typeVersion": 2,
  4069. "position": [
  4070. 2400,
  4071. 160
  4072. ],
  4073. "credentials": {
  4074. "googleSlidesOAuth2Api": {
  4075. "id": "yloV13TPeYn5lmdZ",
  4076. "name": "Google Slides account"
  4077. }
  4078. }
  4079. },
  4080. {
  4081. "parameters": {
  4082. "method": "POST",
  4083. "url": "=https://slides.googleapis.com/v1/presentations/{{ $('Code for color modification').item.json.presentationId }}:batchUpdate",
  4084. "authentication": "predefinedCredentialType",
  4085. "nodeCredentialType": "googleSlidesOAuth2Api",
  4086. "sendBody": true,
  4087. "specifyBody": "json",
  4088. "jsonBody": "={\n \"requests\": [\n {\n \"updateShapeProperties\": {\n \"objectId\": \"{{ $json['foundShape']['objectId'] }}\",\n \"fields\": \"shapeBackgroundFill.solidFill.color\",\n \"shapeProperties\": {\n \"shapeBackgroundFill\": {\n \"solidFill\": {\n \"color\": {\n \"rgbColor\": {\n \"red\": \"{{ $json['foundShape']['shape']['shapeProperties']['shapeBackgroundFill']['solidFill']['color']['rgbColor']['red'] }}\",\n \"green\": \"{{ $json['foundShape']['shape']['shapeProperties']['shapeBackgroundFill']['solidFill']['color']['rgbColor']['green'] }}\",\n \"blue\": \"{{ $json['foundShape']['shape']['shapeProperties']['shapeBackgroundFill']['solidFill']['color']['rgbColor']['blue'] }}\"\n }\n }\n }\n }\n }\n }\n }\n ]\n}\n",
  4089. "options": {}
  4090. },
  4091. "id": "c8ce4383-ed73-4ad5-92a7-061a5645d815",
  4092. "name": "Send new color to slides",
  4093. "type": "n8n-nodes-base.httpRequest",
  4094. "typeVersion": 4.1,
  4095. "position": [
  4096. 2020,
  4097. 360
  4098. ],
  4099. "credentials": {
  4100. "googleSlidesOAuth2Api": {
  4101. "id": "yloV13TPeYn5lmdZ",
  4102. "name": "Google Slides account"
  4103. }
  4104. }
  4105. },
  4106. {
  4107. "parameters": {
  4108. "jsCode": "\n\n\n// Le alt text du triangle qu'on cherche\nconst targetDescription = \"bordure\";\n\n// Correcting the path to access borderColor \nif (!items[0].json.body || !items[0].json.body.selectedColor) {\n throw new Error(\"borderColor is undefined or not passed correctly.\");\n}\n\n// Adjusting to the correct path\nconst inputColor = items[0].json.body.selectedColor;\n\n// Assuming `items[0].json.slides` is the array of slides you received from the Slides API.\nconst slides = items[1].json.slides;\n\n// Placeholder for the found shapes\nlet foundShapes = [];\n\n// Loop over each slide\nfor (const slide of slides) {\n // Check if slide has pageElements and it's an array\n if (Array.isArray(slide.pageElements)) {\n // Find all shapes with the description 'triangle1' within the current slide\n const matchingShapes = slide.pageElements.filter(\n (element) => element.description === targetDescription\n );\n foundShapes = foundShapes.concat(matchingShapes);\n }\n}\n\n// Check if we found any shapes\nif (foundShapes.length > 0) {\n // Apply the new color to all found shapes.\n foundShapes.forEach(foundShape => {\n foundShape.shape.shapeProperties.shapeBackgroundFill.solidFill.color.rgbColor = {\n red: inputColor.red, // Ensure this is a value between 0 and 1\n green: inputColor.green, // Ensure this is a value between 0 and 1\n blue: inputColor.blue, // Ensure this is a value between 0 and 1\n alpha: inputColor.alpha || 1, // Default to 1 if alpha is not provided\n };\n });\n\n // Return the modified shapes and the presentationId\n return foundShapes.map(foundShape => ({\n json: {\n foundShape: foundShape,\n presentationId: items[1].json.presentationId\n }\n }));\n} else {\n // If no shapes with 'triangle1' description were found in any slide\n return [{ json: { error: \"Shape with description 'triangle1' not found\" } }];\n}\n"
  4109. },
  4110. "id": "e8692ba7-8bb0-4d10-97cf-ccc5ecc13e2b",
  4111. "name": "Code for color modification",
  4112. "type": "n8n-nodes-base.code",
  4113. "typeVersion": 2,
  4114. "position": [
  4115. 1740,
  4116. 360
  4117. ]
  4118. },
  4119. {
  4120. "parameters": {},
  4121. "id": "9147a709-1b9a-4f2f-8265-e3ed381e071a",
  4122. "name": "Merge8",
  4123. "type": "n8n-nodes-base.merge",
  4124. "typeVersion": 2.1,
  4125. "position": [
  4126. 1480,
  4127. 360
  4128. ]
  4129. },
  4130. {
  4131. "parameters": {
  4132. "operation": "get",
  4133. "presentationId": "={{ $json.id }}"
  4134. },
  4135. "id": "e3527896-88f3-409e-a65c-82f52b862fd5",
  4136. "name": "Getting the copied Slide",
  4137. "type": "n8n-nodes-base.googleSlides",
  4138. "typeVersion": 2,
  4139. "position": [
  4140. 1220,
  4141. 420
  4142. ],
  4143. "credentials": {
  4144. "googleSlidesOAuth2Api": {
  4145. "id": "yloV13TPeYn5lmdZ",
  4146. "name": "Google Slides account"
  4147. }
  4148. }
  4149. },
  4150. {
  4151. "parameters": {
  4152. "operation": "copy",
  4153. "fileId": {
  4154. "__rl": true,
  4155. "value": "1bRj2003LHoNJWfjQ3N3meVlgpDD8cmMmOWniHfpgFLQ",
  4156. "mode": "id"
  4157. },
  4158. "name": "=\"Pitch\" + {{new Date().getFullYear()}}-{{(\"0\" + (new Date().getMonth() + 1)).slice(-2)}}-{{(\"0\" + new Date().getDate()).slice(-2)}}-{{(\"0\" + new Date().getHours()).slice(-2)}}:{{(\"0\" + new Date().getMinutes()).slice(-2)}}:{{(\"0\" + new Date().getSeconds()).slice(-2)}}",
  4159. "sameFolder": false,
  4160. "driveId": {
  4161. "__rl": true,
  4162. "mode": "list",
  4163. "value": "My Drive"
  4164. },
  4165. "folderId": {
  4166. "__rl": true,
  4167. "value": "={{ $json.id }}",
  4168. "mode": "id"
  4169. },
  4170. "options": {}
  4171. },
  4172. "id": "8344ac07-4994-4e9c-8850-19f6767903e8",
  4173. "name": "Copy temp src and generate unique name file",
  4174. "type": "n8n-nodes-base.googleDrive",
  4175. "typeVersion": 3,
  4176. "position": [
  4177. -140,
  4178. 420
  4179. ],
  4180. "credentials": {
  4181. "googleDriveOAuth2Api": {
  4182. "id": "qipLEwtX0VvgOAKy",
  4183. "name": "Google Drive account 2"
  4184. }
  4185. }
  4186. },
  4187. {
  4188. "parameters": {
  4189. "operation": "get",
  4190. "presentationId": "1bRj2003LHoNJWfjQ3N3meVlgpDD8cmMmOWniHfpgFLQ"
  4191. },
  4192. "id": "dba867c6-f726-4372-83c8-2d75178fe8ef",
  4193. "name": "Get Templace Source",
  4194. "type": "n8n-nodes-base.googleSlides",
  4195. "typeVersion": 2,
  4196. "position": [
  4197. -440,
  4198. 420
  4199. ],
  4200. "credentials": {
  4201. "googleSlidesOAuth2Api": {
  4202. "id": "yloV13TPeYn5lmdZ",
  4203. "name": "Google Slides account"
  4204. }
  4205. }
  4206. },
  4207. {
  4208. "parameters": {},
  4209. "id": "8d52b914-ae02-4858-aa3c-c0f91fefc5ed",
  4210. "name": "Merge7",
  4211. "type": "n8n-nodes-base.merge",
  4212. "typeVersion": 2.1,
  4213. "position": [
  4214. 1220,
  4215. 620
  4216. ]
  4217. },
  4218. {
  4219. "parameters": {},
  4220. "id": "d96427a9-6b6c-4b1a-9945-fbbb9511617c",
  4221. "name": "Merge6",
  4222. "type": "n8n-nodes-base.merge",
  4223. "typeVersion": 2.1,
  4224. "position": [
  4225. 1040,
  4226. 780
  4227. ]
  4228. },
  4229. {
  4230. "parameters": {
  4231. "method": "=POST",
  4232. "url": "=https://www.googleapis.com/drive/v3/files/{{ $json.id }}/permissions",
  4233. "authentication": "predefinedCredentialType",
  4234. "nodeCredentialType": "googleDriveOAuth2Api",
  4235. "sendBody": true,
  4236. "specifyBody": "json",
  4237. "jsonBody": "{\n \"role\": \"reader\",\n \"type\": \"anyone\"\n}",
  4238. "options": {}
  4239. },
  4240. "id": "841ef845-7555-4733-a224-d5062cce75a4",
  4241. "name": "Change permission access1",
  4242. "type": "n8n-nodes-base.httpRequest",
  4243. "typeVersion": 4.1,
  4244. "position": [
  4245. 1480,
  4246. 520
  4247. ],
  4248. "credentials": {
  4249. "googleDriveOAuth2Api": {
  4250. "id": "Ez0VV5Mm43ioqg7r",
  4251. "name": "Google Drive account 2"
  4252. }
  4253. }
  4254. },
  4255. {
  4256. "parameters": {
  4257. "inputDataFieldName": "=data",
  4258. "driveId": {
  4259. "__rl": true,
  4260. "mode": "list",
  4261. "value": "My Drive"
  4262. },
  4263. "folderId": {
  4264. "__rl": true,
  4265. "value": "root",
  4266. "mode": "list",
  4267. "cachedResultName": "/ (Root folder)",
  4268. "cachedResultUrl": "https://drive.google.com/drive"
  4269. },
  4270. "options": {}
  4271. },
  4272. "id": "42a82d7a-e904-4881-bb48-69267fb23963",
  4273. "name": "Google Drive Upload image3",
  4274. "type": "n8n-nodes-base.googleDrive",
  4275. "typeVersion": 3,
  4276. "position": [
  4277. -140,
  4278. 980
  4279. ],
  4280. "credentials": {
  4281. "googleDriveOAuth2Api": {
  4282. "id": "qipLEwtX0VvgOAKy",
  4283. "name": "Google Drive account 2"
  4284. }
  4285. }
  4286. },
  4287. {
  4288. "parameters": {
  4289. "content": "## Generate slides in folder\n\n",
  4290. "width": 332.0380316721941,
  4291. "color": 7
  4292. },
  4293. "id": "d96d42bc-d169-4c1c-982e-5be086dd82a6",
  4294. "name": "Sticky Note14",
  4295. "type": "n8n-nodes-base.stickyNote",
  4296. "typeVersion": 1,
  4297. "position": [
  4298. -1160,
  4299. 360
  4300. ]
  4301. },
  4302. {
  4303. "parameters": {
  4304. "inputDataFieldName": "=data",
  4305. "driveId": {
  4306. "__rl": true,
  4307. "mode": "list",
  4308. "value": "My Drive"
  4309. },
  4310. "folderId": {
  4311. "__rl": true,
  4312. "value": "root",
  4313. "mode": "list",
  4314. "cachedResultName": "/ (Root folder)",
  4315. "cachedResultUrl": "https://drive.google.com/drive"
  4316. },
  4317. "options": {}
  4318. },
  4319. "id": "5f755cfc-70bb-44db-9acc-0a4964cba0d8",
  4320. "name": "Google Drive Upload image",
  4321. "type": "n8n-nodes-base.googleDrive",
  4322. "typeVersion": 3,
  4323. "position": [
  4324. -140,
  4325. 780
  4326. ],
  4327. "credentials": {
  4328. "googleDriveOAuth2Api": {
  4329. "id": "qipLEwtX0VvgOAKy",
  4330. "name": "Google Drive account 2"
  4331. }
  4332. }
  4333. },
  4334. {
  4335. "parameters": {
  4336. "content": "## Step 7: \n## Send G-mail",
  4337. "height": 163.66336633663366,
  4338. "width": 267.4234596525042
  4339. },
  4340. "id": "b102bc24-d740-4acd-ab6c-d4cbfa3fdb61",
  4341. "name": "Sticky Note10",
  4342. "type": "n8n-nodes-base.stickyNote",
  4343. "typeVersion": 1,
  4344. "position": [
  4345. -1180,
  4346. -1260
  4347. ]
  4348. },
  4349. {
  4350. "parameters": {
  4351. "httpMethod": "POST",
  4352. "path": "gmail",
  4353. "options": {}
  4354. },
  4355. "id": "c37a9ab2-d4ff-4d21-b3ba-37ea3a665c2b",
  4356. "name": "Webhook: Send g-mail1",
  4357. "type": "n8n-nodes-base.webhook",
  4358. "typeVersion": 1.1,
  4359. "position": [
  4360. -880,
  4361. -1240
  4362. ],
  4363. "webhookId": "702ffef6-10da-471a-b71f-54a8a57826a1"
  4364. },
  4365. {
  4366. "parameters": {
  4367. "conditions": {
  4368. "options": {
  4369. "caseSensitive": true,
  4370. "leftValue": "",
  4371. "typeValidation": "strict"
  4372. },
  4373. "conditions": [
  4374. {
  4375. "id": "5f8c76d3-600a-4ece-95d7-8e28d4c20e4b",
  4376. "leftValue": "={{ $json.body.sendOption }}",
  4377. "rightValue": "now",
  4378. "operator": {
  4379. "type": "string",
  4380. "operation": "equals",
  4381. "name": "filter.operator.equals"
  4382. }
  4383. }
  4384. ],
  4385. "combinator": "and"
  4386. },
  4387. "options": {}
  4388. },
  4389. "id": "a121b60a-b257-4515-aaa7-13c561d213c6",
  4390. "name": "If1",
  4391. "type": "n8n-nodes-base.if",
  4392. "typeVersion": 2,
  4393. "position": [
  4394. -480,
  4395. -1240
  4396. ]
  4397. },
  4398. {
  4399. "parameters": {
  4400. "amount": 20
  4401. },
  4402. "id": "95a6637e-4900-47f5-9b6a-a6e33b581ae4",
  4403. "name": "Wait",
  4404. "type": "n8n-nodes-base.wait",
  4405. "typeVersion": 1,
  4406. "position": [
  4407. -240,
  4408. -1160
  4409. ],
  4410. "webhookId": "363838d3-03a2-4a82-88ab-4bc939e70e19"
  4411. },
  4412. {
  4413. "parameters": {
  4414. "sendTo": "={{ $json.body.recipient }}",
  4415. "subject": "={{ $json.body.subject }}",
  4416. "message": "={{ $json.body.message }}",
  4417. "options": {
  4418. "attachmentsUi": {
  4419. "attachmentsBinary": [
  4420. {}
  4421. ]
  4422. },
  4423. "bccList": "={{ $json.body.cci }}",
  4424. "ccList": "={{ $json.body.cc }}"
  4425. }
  4426. },
  4427. "id": "f3576136-4fa0-4476-96ea-fddd68af38d9",
  4428. "name": "Gmail3",
  4429. "type": "n8n-nodes-base.gmail",
  4430. "typeVersion": 2.1,
  4431. "position": [
  4432. -20,
  4433. -1260
  4434. ],
  4435. "credentials": {
  4436. "gmailOAuth2": {
  4437. "id": "B3bDOeN9uiZP2cER",
  4438. "name": "Gmail Emanuel"
  4439. }
  4440. }
  4441. },
  4442. {
  4443. "parameters": {
  4444. "operation": "download",
  4445. "fileId": {
  4446. "__rl": true,
  4447. "value": "={{ $json.body.pdfId }}",
  4448. "mode": "id"
  4449. },
  4450. "options": {}
  4451. },
  4452. "id": "97ad900c-cb9c-499f-9e50-c4bab2dd7de0",
  4453. "name": "Google Drive2",
  4454. "type": "n8n-nodes-base.googleDrive",
  4455. "typeVersion": 3,
  4456. "position": [
  4457. -680,
  4458. -1240
  4459. ],
  4460. "credentials": {
  4461. "googleDriveOAuth2Api": {
  4462. "id": "Ez0VV5Mm43ioqg7r",
  4463. "name": "Google Drive account 2"
  4464. }
  4465. }
  4466. },
  4467. {
  4468. "parameters": {
  4469. "httpMethod": "POST",
  4470. "path": "v4-search-folder",
  4471. "responseMode": "responseNode",
  4472. "options": {
  4473. "allowedOrigins": "*"
  4474. }
  4475. },
  4476. "id": "9f8a8da3-af07-4cd2-891b-4f0ef5e60599",
  4477. "name": "SearchFolder to get folderID",
  4478. "type": "n8n-nodes-base.webhook",
  4479. "typeVersion": 1.1,
  4480. "position": [
  4481. -920,
  4482. -7680
  4483. ],
  4484. "webhookId": "d845efd4-3b7b-4447-be4d-3cdfb1cddf2d"
  4485. },
  4486. {
  4487. "parameters": {
  4488. "resource": "fileFolder",
  4489. "queryString": "={{ $json.body.companyName }}",
  4490. "filter": {
  4491. "folderId": {
  4492. "mode": "list",
  4493. "value": "root",
  4494. "cachedResultName": "/ (Root folder)"
  4495. },
  4496. "whatToSearch": "folders"
  4497. },
  4498. "options": {
  4499. "fields": []
  4500. }
  4501. },
  4502. "id": "60fe2385-d438-4b42-9da7-a7be2804f0fd",
  4503. "name": "Search for existing folder",
  4504. "type": "n8n-nodes-base.googleDrive",
  4505. "typeVersion": 3,
  4506. "position": [
  4507. -640,
  4508. -7680
  4509. ],
  4510. "alwaysOutputData": true,
  4511. "credentials": {
  4512. "googleDriveOAuth2Api": {
  4513. "id": "qipLEwtX0VvgOAKy",
  4514. "name": "Google Drive account 2"
  4515. }
  4516. }
  4517. },
  4518. {
  4519. "parameters": {
  4520. "respondWith": "allIncomingItems",
  4521. "options": {}
  4522. },
  4523. "id": "6eb11c82-4c3c-41f7-8bcf-66fe06a195f2",
  4524. "name": "Réponse au Webhook SearchFolder",
  4525. "type": "n8n-nodes-base.respondToWebhook",
  4526. "typeVersion": 1,
  4527. "position": [
  4528. -400,
  4529. -7680
  4530. ]
  4531. },
  4532. {
  4533. "parameters": {
  4534. "content": "## Search for existing folder in Google Drive (Si vous en avez de besoin)\n\n",
  4535. "width": 263.78290591263107,
  4536. "color": 5
  4537. },
  4538. "id": "4047e318-745e-492a-8946-8ab0ea56eeef",
  4539. "name": "Sticky Note17",
  4540. "type": "n8n-nodes-base.stickyNote",
  4541. "typeVersion": 1,
  4542. "position": [
  4543. -1244,
  4544. -7700
  4545. ]
  4546. },
  4547. {
  4548. "parameters": {
  4549. "method": "POST",
  4550. "url": "=https://slides.googleapis.com/v1/presentations/{{ $('OutputTextCut3').item.json.presentationId }}:batchUpdate",
  4551. "authentication": "predefinedCredentialType",
  4552. "nodeCredentialType": "googleSlidesOAuth2Api",
  4553. "sendHeaders": true,
  4554. "headerParameters": {
  4555. "parameters": [
  4556. {
  4557. "name": "Content-Type",
  4558. "value": "application/json"
  4559. }
  4560. ]
  4561. },
  4562. "sendBody": true,
  4563. "specifyBody": "json",
  4564. "jsonBody": "={\n \"requests\": [\n {\n \"updateTextStyle\": {\n \"objectId\": \"g2c0a7f6a914_0_4\",\n \"textRange\": {\n \"type\": \"FIXED_RANGE\",\n \"startIndex\": 0,\n \"endIndex\": 14\n },\n \"style\": {\n \"link\": {\n \"url\": \"{{ $json.urlGenerative }}\"\n },\n \"foregroundColor\": {\n \"opaqueColor\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n }\n }\n },\n \"underline\": false\n },\n \"fields\": \"link,foregroundColor,underline\"\n }\n },\n {\n \"updateImageProperties\": {\n \"objectId\": \"g2c0a7f6a914_0_6\",\n \"fields\": \"link\",\n \"imageProperties\": {\n \"link\": {\n \"url\": \"{{ $json.urlGenerative }}\"\n }\n }\n }\n },\n {\n \"updateTextStyle\": {\n \"objectId\": \"g2c7c4771883_0_0\",\n \"textRange\": {\n \"type\": \"FIXED_RANGE\",\n \"startIndex\": 0,\n \"endIndex\": 14\n },\n \"style\": {\n \"link\": {\n \"url\": \"{{ $json.urlGenerative }}\"\n },\n \"foregroundColor\": {\n \"opaqueColor\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n }\n }\n },\n \"underline\": false\n },\n \"fields\": \"link,foregroundColor,underline\"\n }\n },\n {\n \"updateImageProperties\": {\n \"objectId\": \"g2c0a7f6a914_0_32\",\n \"fields\": \"link\",\n \"imageProperties\": {\n \"link\": {\n \"url\": \"{{ $json.urlGenerative }}\"\n }\n }\n }\n },\n {\n \"updateTextStyle\": {\n \"objectId\": \"g2c7c4771883_0_2\",\n \"textRange\": {\n \"type\": \"FIXED_RANGE\",\n \"startIndex\": 0,\n \"endIndex\": 14\n },\n \"style\": {\n \"link\": {\n \"url\": \"{{ $json.urlGenerative }}\"\n },\n \"foregroundColor\": {\n \"opaqueColor\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n }\n }\n },\n \"underline\": false\n },\n \"fields\": \"link,foregroundColor,underline\"\n }\n },\n {\n \"updateImageProperties\": {\n \"objectId\": \"g2c0a7f6a914_0_138\",\n \"fields\": \"link\",\n \"imageProperties\": {\n \"link\": {\n \"url\": \"{{ $json.urlGenerative }}\"\n }\n }\n }\n },\n {\n \"updateTextStyle\": {\n \"objectId\": \"g2c7c4771883_0_1\",\n \"textRange\": {\n \"type\": \"FIXED_RANGE\",\n \"startIndex\": 0,\n \"endIndex\": 14\n },\n \"style\": {\n \"link\": {\n \"url\": \"{{ $json.urlGenerative }}\"\n },\n \"foregroundColor\": {\n \"opaqueColor\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n }\n }\n },\n \"underline\": false\n },\n \"fields\": \"link,foregroundColor,underline\"\n }\n },\n {\n \"updateImageProperties\": {\n \"objectId\": \"g2c0a7f6a914_0_159\",\n \"fields\": \"link\",\n \"imageProperties\": {\n \"link\": {\n \"url\": \"{{ $json.urlGenerative }}\"\n }\n }\n }\n },\n {\n \"updateTextStyle\": {\n \"objectId\": \"g2c7c4771883_0_3\",\n \"textRange\": {\n \"type\": \"FIXED_RANGE\",\n \"startIndex\": 0,\n \"endIndex\": 14\n },\n \"style\": {\n \"link\": {\n \"url\": \"{{ $json.urlGenerative }}\"\n },\n \"foregroundColor\": {\n \"opaqueColor\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n }\n }\n },\n \"underline\": false\n },\n \"fields\": \"link,foregroundColor,underline\"\n }\n },\n {\n \"updateImageProperties\": {\n \"objectId\": \"g2c0a7f6a914_0_174\",\n \"fields\": \"link\",\n \"imageProperties\": {\n \"link\": {\n \"url\": \"{{ $json.urlGenerative }}\"\n }\n }\n }\n },\n {\n \"updateTextStyle\": {\n \"objectId\": \"g2c7c4771883_0_4\",\n \"textRange\": {\n \"type\": \"FIXED_RANGE\",\n \"startIndex\": 0,\n \"endIndex\": 14\n },\n \"style\": {\n \"link\": {\n \"url\": \"{{ $json.urlGenerative }}\"\n },\n \"foregroundColor\": {\n \"opaqueColor\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n }\n }\n },\n \"underline\": false\n },\n \"fields\": \"link,foregroundColor,underline\"\n }\n },\n {\n \"updateImageProperties\": {\n \"objectId\": \"g2c0a7f6a914_0_204\",\n \"fields\": \"link\",\n \"imageProperties\": {\n \"link\": {\n \"url\": \"{{ $json.urlGenerative }}\"\n }\n }\n }\n },\n {\n \"updateTextStyle\": {\n \"objectId\": \"g2c7c4771883_0_6\",\n \"textRange\": {\n \"type\": \"FIXED_RANGE\",\n \"startIndex\": 0,\n \"endIndex\": 14\n },\n \"style\": {\n \"link\": {\n \"url\": \"{{ $json.urlGenerative }}\"\n },\n \"foregroundColor\": {\n \"opaqueColor\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n }\n }\n },\n \"underline\": false\n },\n \"fields\": \"link,foregroundColor,underline\"\n }\n },\n {\n \"updateImageProperties\": {\n \"objectId\": \"g2c1a0221ae8_0_11\",\n \"fields\": \"link\",\n \"imageProperties\": {\n \"link\": {\n \"url\": \"{{ $json.urlGenerative }}\"\n }\n }\n }\n },\n {\n \"updateTextStyle\": {\n \"objectId\": \"g2c7c4771883_0_7\",\n \"textRange\": {\n \"type\": \"FIXED_RANGE\",\n \"startIndex\": 0,\n \"endIndex\": 14\n },\n \"style\": {\n \"link\": {\n \"url\": \"{{ $json.urlGenerative }}\"\n },\n \"foregroundColor\": {\n \"opaqueColor\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n }\n }\n },\n \"underline\": false\n },\n \"fields\": \"link,foregroundColor,underline\"\n }\n },\n {\n \"updateImageProperties\": {\n \"objectId\": \"g2c0a7f6a914_0_16\",\n \"fields\": \"link\",\n \"imageProperties\": {\n \"link\": {\n \"url\": \"{{ $json.urlGenerative }}\"\n }\n }\n }\n },\n {\n \"updateTextStyle\": {\n \"objectId\": \"g2c7c4771883_0_9\",\n \"textRange\": {\n \"type\": \"FIXED_RANGE\",\n \"startIndex\": 0,\n \"endIndex\": 14\n },\n \"style\": {\n \"link\": {\n \"url\": \"{{ $json.urlGenerative }}\"\n },\n \"foregroundColor\": {\n \"opaqueColor\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n }\n }\n },\n \"underline\": false\n },\n \"fields\": \"link,foregroundColor,underline\"\n }\n },\n {\n \"updateImageProperties\": {\n \"objectId\": \"g1f4e164aa46_0_10\",\n \"fields\": \"link\",\n \"imageProperties\": {\n \"link\": {\n \"url\": \"{{ $json.urlGenerative }}\"\n }\n }\n }\n },\n {\n \"updateTextStyle\": {\n \"objectId\": \"g2c7c4771883_0_10\",\n \"textRange\": {\n \"type\": \"FIXED_RANGE\",\n \"startIndex\": 0,\n \"endIndex\": 14\n },\n \"style\": {\n \"link\": {\n \"url\": \"{{ $json.urlGenerative }}\"\n },\n \"foregroundColor\": {\n \"opaqueColor\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n }\n }\n },\n \"underline\": false\n },\n \"fields\": \"link,foregroundColor,underline\"\n }\n },\n {\n \"updateImageProperties\": {\n \"objectId\": \"g1f4ef1b3123_0_11\",\n \"fields\": \"link\",\n \"imageProperties\": {\n \"link\": {\n \"url\": \"{{ $json.urlGenerative }}\"\n }\n }\n }\n },\n {\n \"updateImageProperties\": {\n \"objectId\": \"g1f4ef1b3123_0_11\",\n \"fields\": \"link\",\n \"imageProperties\": {\n \"link\": {\n \"url\": \"{{ $json.urlGenerative }}\"\n }\n }\n }\n },\n {\n \"updateTextStyle\": {\n \"objectId\": \"g1f4ef1b3123_0_9\",\n \"textRange\": {\n \"type\": \"FIXED_RANGE\",\n \"startIndex\": 24,\n \"endIndex\": 41\n },\n \"style\": {\n \"link\": {\n \"url\": \"{{ $json.firstLinkUrl }}\"\n },\n \"foregroundColor\": {\n \"opaqueColor\": {\n \"rgbColor\": {\n \"red\": {{ $json.red }},\n \"green\": {{ $json.green }},\n \"blue\": {{ $json.blue }}\n }\n }\n },\n \"underline\": false\n },\n \"fields\": \"link,foregroundColor,underline\"\n }\n },\n {\n \"updateTextStyle\": {\n \"objectId\": \"g1f4ef1b3123_0_9\",\n \"textRange\": {\n \"type\": \"FIXED_RANGE\",\n \"startIndex\": 66,\n \"endIndex\": 83\n },\n \"style\": {\n \"link\": {\n \"url\": \"{{ $json.secondLinkUrl }}\"\n },\n \"foregroundColor\": {\n \"opaqueColor\": {\n \"rgbColor\": {\n \"red\": {{ $json.red }},\n \"green\": {{ $json.green }},\n \"blue\": {{ $json.blue }}\n }\n }\n },\n \"underline\": false\n },\n \"fields\": \"link,foregroundColor,underline\"\n }\n },\n {\n \"updateTextStyle\": {\n \"objectId\": \"g1f4ef1b3123_0_9\",\n \"textRange\": {\n \"type\": \"FIXED_RANGE\",\n \"startIndex\": 108,\n \"endIndex\": 125\n },\n \"style\": {\n \"link\": {\n \"url\": \"{{ $json.thirdLinkUrl }}\"\n },\n \"foregroundColor\": {\n \"opaqueColor\": {\n \"rgbColor\": {\n \"red\": {{ $json.red }},\n \"green\": {{ $json.green }},\n \"blue\": {{ $json.blue }}\n }\n }\n },\n \"underline\": false\n },\n \"fields\": \"link,foregroundColor,underline\"\n }\n }\n ]\n}\n",
  4565. "options": {}
  4566. },
  4567. "id": "1db7a147-09fb-4173-891e-4fd37da5a248",
  4568. "name": "Send urlGenerative3",
  4569. "type": "n8n-nodes-base.httpRequest",
  4570. "typeVersion": 4.1,
  4571. "position": [
  4572. 2300,
  4573. -6040
  4574. ],
  4575. "credentials": {
  4576. "googleSlidesOAuth2Api": {
  4577. "id": "yloV13TPeYn5lmdZ",
  4578. "name": "Google Slides account"
  4579. }
  4580. }
  4581. },
  4582. {
  4583. "parameters": {},
  4584. "id": "429e1c02-e223-4c52-8ad3-a618f5a3091a",
  4585. "name": "Merge27",
  4586. "type": "n8n-nodes-base.merge",
  4587. "typeVersion": 2.1,
  4588. "position": [
  4589. 2500,
  4590. -4740
  4591. ]
  4592. },
  4593. {
  4594. "parameters": {
  4595. "operation": "move",
  4596. "fileId": {
  4597. "__rl": true,
  4598. "value": "={{ $json.presentationId }}",
  4599. "mode": "id"
  4600. },
  4601. "driveId": {
  4602. "__rl": true,
  4603. "mode": "list",
  4604. "value": "My Drive"
  4605. },
  4606. "folderId": {
  4607. "__rl": true,
  4608. "value": "=\n{{ $json.folderId }}",
  4609. "mode": "id"
  4610. }
  4611. },
  4612. "id": "72864d1e-386c-4d69-b389-71ed916cb5ce",
  4613. "name": "Google Drive12",
  4614. "type": "n8n-nodes-base.googleDrive",
  4615. "typeVersion": 3,
  4616. "position": [
  4617. 680,
  4618. -4840
  4619. ],
  4620. "credentials": {
  4621. "googleDriveOAuth2Api": {
  4622. "id": "qipLEwtX0VvgOAKy",
  4623. "name": "Google Drive account 2"
  4624. }
  4625. }
  4626. },
  4627. {
  4628. "parameters": {
  4629. "jsCode": "return [\n {\n json: {\n folderId: items[0].json.id,\n presentationId: items[1].json.id\n }\n }\n];"
  4630. },
  4631. "id": "0793c2d0-97a2-4a9c-9656-2a035540fb52",
  4632. "name": "FolderId11",
  4633. "type": "n8n-nodes-base.code",
  4634. "typeVersion": 2,
  4635. "position": [
  4636. 400,
  4637. -4840
  4638. ]
  4639. },
  4640. {
  4641. "parameters": {},
  4642. "id": "c27c7687-d8cb-4cd2-959a-0093d21bd4ba",
  4643. "name": "Merge28",
  4644. "type": "n8n-nodes-base.merge",
  4645. "typeVersion": 2.1,
  4646. "position": [
  4647. 140,
  4648. -4840
  4649. ]
  4650. },
  4651. {
  4652. "parameters": {
  4653. "operation": "move",
  4654. "fileId": {
  4655. "__rl": true,
  4656. "value": "={{ $json.presentationId }}",
  4657. "mode": "id"
  4658. },
  4659. "driveId": {
  4660. "__rl": true,
  4661. "mode": "list",
  4662. "value": "My Drive"
  4663. },
  4664. "folderId": {
  4665. "__rl": true,
  4666. "value": "=\n{{ $json.folderId }}",
  4667. "mode": "id"
  4668. }
  4669. },
  4670. "id": "ed47968c-4e9e-4589-8124-3272f11cf145",
  4671. "name": "Google Drive13",
  4672. "type": "n8n-nodes-base.googleDrive",
  4673. "typeVersion": 3,
  4674. "position": [
  4675. 680,
  4676. -5040
  4677. ],
  4678. "credentials": {
  4679. "googleDriveOAuth2Api": {
  4680. "id": "qipLEwtX0VvgOAKy",
  4681. "name": "Google Drive account 2"
  4682. }
  4683. }
  4684. },
  4685. {
  4686. "parameters": {
  4687. "jsCode": "return [\n {\n json: {\n folderId: items[0].json.id,\n presentationId: items[1].json.id\n }\n }\n];"
  4688. },
  4689. "id": "b611ee2e-7337-40da-9a5b-9053a18b2a2a",
  4690. "name": "FolderId12",
  4691. "type": "n8n-nodes-base.code",
  4692. "typeVersion": 2,
  4693. "position": [
  4694. 400,
  4695. -5040
  4696. ]
  4697. },
  4698. {
  4699. "parameters": {},
  4700. "id": "f541ffed-4bb8-4f45-be29-d5170a4365c3",
  4701. "name": "Merge29",
  4702. "type": "n8n-nodes-base.merge",
  4703. "typeVersion": 2.1,
  4704. "position": [
  4705. 140,
  4706. -5040
  4707. ]
  4708. },
  4709. {
  4710. "parameters": {
  4711. "operation": "move",
  4712. "fileId": {
  4713. "__rl": true,
  4714. "value": "={{ $json.presentationId }}",
  4715. "mode": "id"
  4716. },
  4717. "driveId": {
  4718. "__rl": true,
  4719. "mode": "list",
  4720. "value": "My Drive"
  4721. },
  4722. "folderId": {
  4723. "__rl": true,
  4724. "value": "=\n{{ $json.folderId }}",
  4725. "mode": "id"
  4726. }
  4727. },
  4728. "id": "e29c4211-1ecb-4359-9deb-8a14afa28fa7",
  4729. "name": "Google Drive14",
  4730. "type": "n8n-nodes-base.googleDrive",
  4731. "typeVersion": 3,
  4732. "position": [
  4733. 680,
  4734. -5220
  4735. ],
  4736. "credentials": {
  4737. "googleDriveOAuth2Api": {
  4738. "id": "qipLEwtX0VvgOAKy",
  4739. "name": "Google Drive account 2"
  4740. }
  4741. }
  4742. },
  4743. {
  4744. "parameters": {
  4745. "jsCode": "return [\n {\n json: {\n folderId: items[0].json.id,\n presentationId: items[1].json.id\n }\n }\n];"
  4746. },
  4747. "id": "ab92beba-9ba2-4c16-8e6e-09cbb27a9a77",
  4748. "name": "FolderId13",
  4749. "type": "n8n-nodes-base.code",
  4750. "typeVersion": 2,
  4751. "position": [
  4752. 400,
  4753. -5220
  4754. ]
  4755. },
  4756. {
  4757. "parameters": {},
  4758. "id": "94ea9f07-d676-4855-8699-6eb5439bc1f5",
  4759. "name": "Merge30",
  4760. "type": "n8n-nodes-base.merge",
  4761. "typeVersion": 2.1,
  4762. "position": [
  4763. 140,
  4764. -5220
  4765. ]
  4766. },
  4767. {
  4768. "parameters": {},
  4769. "id": "ca81f59d-0c14-4955-a8e4-4af53bca032f",
  4770. "name": "Merge31",
  4771. "type": "n8n-nodes-base.merge",
  4772. "typeVersion": 2.1,
  4773. "position": [
  4774. 140,
  4775. -5400
  4776. ]
  4777. },
  4778. {
  4779. "parameters": {
  4780. "operation": "move",
  4781. "fileId": {
  4782. "__rl": true,
  4783. "value": "={{ $json.presentationId }}",
  4784. "mode": "id"
  4785. },
  4786. "driveId": {
  4787. "__rl": true,
  4788. "mode": "list",
  4789. "value": "My Drive"
  4790. },
  4791. "folderId": {
  4792. "__rl": true,
  4793. "value": "=\n{{ $json.folderId }}",
  4794. "mode": "id"
  4795. }
  4796. },
  4797. "id": "729148af-2e9d-4c4a-97d1-7538d25885c0",
  4798. "name": "Google Drive15",
  4799. "type": "n8n-nodes-base.googleDrive",
  4800. "typeVersion": 3,
  4801. "position": [
  4802. 680,
  4803. -5400
  4804. ],
  4805. "credentials": {
  4806. "googleDriveOAuth2Api": {
  4807. "id": "qipLEwtX0VvgOAKy",
  4808. "name": "Google Drive account 2"
  4809. }
  4810. }
  4811. },
  4812. {
  4813. "parameters": {
  4814. "jsCode": "return [\n {\n json: {\n folderId: items[0].json.id,\n presentationId: items[1].json.id\n }\n }\n];"
  4815. },
  4816. "id": "4770cd88-de15-4c25-abc2-9fee888524b8",
  4817. "name": "FolderId14",
  4818. "type": "n8n-nodes-base.code",
  4819. "typeVersion": 2,
  4820. "position": [
  4821. 400,
  4822. -5400
  4823. ]
  4824. },
  4825. {
  4826. "parameters": {
  4827. "resource": "folder",
  4828. "name": "={{ $json.folderPath }}_{{new Date().getFullYear()}}-{{(\"0\" + (new Date().getMonth() + 1)).slice(-2)}}-{{(\"0\" + new Date().getDate()).slice(-2)}}_{{(\"0\" + new Date().getHours()).slice(-2)}}:{{(\"0\" + new Date().getMinutes()).slice(-2)}}",
  4829. "driveId": {
  4830. "__rl": true,
  4831. "mode": "list",
  4832. "value": "My Drive"
  4833. },
  4834. "folderId": {
  4835. "__rl": true,
  4836. "mode": "list",
  4837. "value": "root",
  4838. "cachedResultName": "/ (Root folder)"
  4839. },
  4840. "options": {}
  4841. },
  4842. "id": "732b07fc-33e8-44db-89d6-8589736add58",
  4843. "name": "CreateFolder2",
  4844. "type": "n8n-nodes-base.googleDrive",
  4845. "typeVersion": 3,
  4846. "position": [
  4847. -240,
  4848. -5600
  4849. ],
  4850. "credentials": {
  4851. "googleDriveOAuth2Api": {
  4852. "id": "qipLEwtX0VvgOAKy",
  4853. "name": "Google Drive account 2"
  4854. }
  4855. }
  4856. },
  4857. {
  4858. "parameters": {
  4859. "jsCode": "const folderName = items[0].json.body.companyName;\nconst selectedColor = items[0].json.body.selectedColor;\n\nreturn [\n {\n json: {\n folderPath: folderName,\n color: selectedColor,\n }\n }\n];"
  4860. },
  4861. "id": "6b35bd50-9419-4fee-9215-546654f25ee5",
  4862. "name": "FolderName5",
  4863. "type": "n8n-nodes-base.code",
  4864. "typeVersion": 2,
  4865. "position": [
  4866. -540,
  4867. -5600
  4868. ]
  4869. },
  4870. {
  4871. "parameters": {
  4872. "operation": "getSlides",
  4873. "presentationId": "={{ $json.id }}"
  4874. },
  4875. "id": "d4435173-9e33-4c6a-96b8-2a1cec7018aa",
  4876. "name": "Google Slides3",
  4877. "type": "n8n-nodes-base.googleSlides",
  4878. "typeVersion": 2,
  4879. "position": [
  4880. 1120,
  4881. -5580
  4882. ],
  4883. "credentials": {
  4884. "googleSlidesOAuth2Api": {
  4885. "id": "yloV13TPeYn5lmdZ",
  4886. "name": "Google Slides account"
  4887. }
  4888. }
  4889. },
  4890. {
  4891. "parameters": {
  4892. "jsCode": "\nconst presentationId = items[1].json.presentationId;\nconst imageUrls = items[0].json.body.imageUrls;\nconst logoData = items[0].json.body.logoData;\nconst companyName = items[0].json.body.companyName;\nconst urlGenerative = items[0].json.body.urlGenerative;\nconst firstLinkDescription = items[0].json.body.firstLink.description;\nconst firstLinkUrl = items[0].json.body.firstLink.url;\nconst firstLinkDisplayName = items[0].json.body.firstLink.displayName;\nconst secondLinkDescription = items[0].json.body.secondLink.description;\nconst secondLinkUrl = items[0].json.body.secondLink.url;\nconst secondLinkDisplayName = items[0].json.body.secondLink.displayName;\nconst thirdLinkDescription = items[0].json.body.thirdLink.description;\nconst thirdLinkUrl = items[0].json.body.thirdLink.url;\nconst thirdLinkDisplayName = items[0].json.body.thirdLink.displayName;\nconst red = items[0].json.body.selectedColor.red;\nconst green = items[0].json.body.selectedColor.green;\nconst blue = items[0].json.body.selectedColor.blue;\n\nconst text = items[0].json.body.output; // Make sure this is where your text is located\nconst sections = {};\nconst regex = /<h1 className=\"h1title\">(.*?)<\\/h1>\\s*<[^>]+>(.*?)<\\/[^>]+>/gis;\nconst removalRegex = /【\\d†source】/g; // Expression to remove undesired strings\n\nlet match;\nlet contentCounter = 1; // Counter for contents\nlet titleCounter = 1; // Counter for titles\n\nwhile ((match = regex.exec(text)) !== null) {\n let title = match[1].trim().replace(removalRegex, '');\n let content = match[2].trim().replace(removalRegex, '');\n \n const titlePlaceholder = `sectionTitre${titleCounter}`; // Placeholder for the title\n const contentPlaceholder = `sectionContenu${contentCounter}`; // Placeholder for the content\n sections[titlePlaceholder] = title.toUpperCase();\n sections[contentPlaceholder] = content;\n \n titleCounter++;\n contentCounter++;\n}\n\n// Combine sections and presentationId in one object\nconst result = {\n presentationId: presentationId,\n sections: sections,\n imageUrls: imageUrls,\n logoData: logoData,\n urlGenerative: urlGenerative,\n companyName: companyName,\n firstLinkDescription: firstLinkDescription,\n firstLinkUrl: firstLinkUrl,\n firstLinkDisplayName: firstLinkDisplayName,\n secondLinkDescription: secondLinkDescription,\n secondLinkUrl: secondLinkUrl,\n secondLinkDisplayName: secondLinkDisplayName,\n thirdLinkDescription: thirdLinkDescription,\n thirdLinkUrl: thirdLinkUrl,\n thirdLinkDisplayName: thirdLinkDisplayName,\n red: red,\n green: green,\n blue: blue\n};\n\nreturn { json: result };"
  4893. },
  4894. "id": "47114013-1b2f-48a4-9f6b-670575611aff",
  4895. "name": "OutputTextCut3",
  4896. "type": "n8n-nodes-base.code",
  4897. "typeVersion": 2,
  4898. "position": [
  4899. 1640,
  4900. -5760
  4901. ],
  4902. "alwaysOutputData": false
  4903. },
  4904. {
  4905. "parameters": {
  4906. "respondWith": "allIncomingItems",
  4907. "options": {}
  4908. },
  4909. "id": "e808b97a-ddac-4e8d-8f3a-a48819ef0578",
  4910. "name": "Réponse au Webhook TEXT3",
  4911. "type": "n8n-nodes-base.respondToWebhook",
  4912. "typeVersion": 1,
  4913. "position": [
  4914. 2920,
  4915. -4740
  4916. ]
  4917. },
  4918. {
  4919. "parameters": {
  4920. "jsCode": "const presentationId = items[0].json.presentationId;\nconst folderId = items[1].json.folderId;\n\n// presentationId in one object\nconst result = {\n presentationId: presentationId,\n folderId: folderId\n};\n\nreturn { json: result };\n"
  4921. },
  4922. "id": "6a31beaa-666f-4c63-87e4-c6b651342cec",
  4923. "name": "InsertImages6",
  4924. "type": "n8n-nodes-base.code",
  4925. "typeVersion": 2,
  4926. "position": [
  4927. 2720,
  4928. -4740
  4929. ],
  4930. "alwaysOutputData": false
  4931. },
  4932. {
  4933. "parameters": {
  4934. "jsCode": "\nconst presentationId = items[1].json.presentationId;\nconst logoId = items[2].json.id;\nconst image1Id = items[3].json.id;\nconst image2Id = items[4].json.id;\n\n\n\n// Combine sections and presentationId in one object\nconst result = {\n presentationId: presentationId,\n image1Id: image1Id,\n image2Id: image2Id,\n logoId: logoId\n};\n\nreturn { json: result };\n"
  4935. },
  4936. "id": "da6d892a-512d-4e3c-bcde-f689dca044f1",
  4937. "name": "InsertImages7",
  4938. "type": "n8n-nodes-base.code",
  4939. "typeVersion": 2,
  4940. "position": [
  4941. 1920,
  4942. -5220
  4943. ],
  4944. "alwaysOutputData": false
  4945. },
  4946. {
  4947. "parameters": {},
  4948. "id": "401930d3-cffd-4813-a200-b9eef1d904c0",
  4949. "name": "Merge32",
  4950. "type": "n8n-nodes-base.merge",
  4951. "typeVersion": 2.1,
  4952. "position": [
  4953. 1640,
  4954. -5220
  4955. ]
  4956. },
  4957. {
  4958. "parameters": {
  4959. "operation": "replaceText",
  4960. "presentationId": "={{ $json.presentationId }}",
  4961. "textUi": {
  4962. "textValues": [
  4963. {
  4964. "replaceText": "={{ $json.sections.sectionTitre1 }}",
  4965. "text": "{{sectionTitre1}}"
  4966. },
  4967. {
  4968. "replaceText": "={{ $json.sections.sectionTitre2 }}",
  4969. "text": "{{sectionTitre2}}"
  4970. },
  4971. {
  4972. "replaceText": "={{ $json.sections.sectionTitre3 }}",
  4973. "text": "{{sectionTitre3}}"
  4974. },
  4975. {
  4976. "replaceText": "={{ $json.sections.sectionTitre4 }}",
  4977. "text": "{{sectionTitre4}}"
  4978. },
  4979. {
  4980. "replaceText": "={{ $json.sections.sectionTitre5 }}",
  4981. "text": "{{sectionTitre5}}"
  4982. },
  4983. {
  4984. "replaceText": "={{ $json.sections.sectionTitre6 }}",
  4985. "text": "{{sectionTitre6}}"
  4986. },
  4987. {
  4988. "replaceText": "={{ $json.sections.sectionTitre7 }}",
  4989. "text": "{{sectionTitre7}}"
  4990. },
  4991. {
  4992. "pageObjectIds": [
  4993. "g1f4ef1b3123_0_0"
  4994. ],
  4995. "replaceText": "={{ $json.firstLinkDescription }}",
  4996. "text": "{{sectionDescription1}}"
  4997. },
  4998. {
  4999. "pageObjectIds": [
  5000. "g1f4ef1b3123_0_0"
  5001. ],
  5002. "replaceText": "={{ $json.secondLinkDescription }}",
  5003. "text": "{{sectionDescription2}}"
  5004. },
  5005. {
  5006. "pageObjectIds": [
  5007. "g1f4ef1b3123_0_0"
  5008. ],
  5009. "replaceText": "={{ $json.thirdLinkDescription }}",
  5010. "text": "{{sectionDescription3}}"
  5011. },
  5012. {
  5013. "pageObjectIds": [
  5014. "g1f4ef1b3123_0_0"
  5015. ],
  5016. "replaceText": "={{ $json.firstLinkDisplayName }} ",
  5017. "text": "{{sectionLien1}}"
  5018. },
  5019. {
  5020. "pageObjectIds": [
  5021. "g1f4ef1b3123_0_0"
  5022. ],
  5023. "replaceText": "={{ $json.secondLinkDisplayName }}",
  5024. "text": "{{sectionLien2}}"
  5025. },
  5026. {
  5027. "pageObjectIds": [
  5028. "g1f4ef1b3123_0_0"
  5029. ],
  5030. "replaceText": "={{ $json.thirdLinkDisplayName }}",
  5031. "text": "{{sectionLien3}}"
  5032. }
  5033. ]
  5034. },
  5035. "options": {
  5036. "revisionId": ""
  5037. }
  5038. },
  5039. "id": "6be8e8d5-6c6a-4b30-b588-f3f8365ca23e",
  5040. "name": "Insert cutTitles3",
  5041. "type": "n8n-nodes-base.googleSlides",
  5042. "typeVersion": 2,
  5043. "position": [
  5044. 2300,
  5045. -5860
  5046. ],
  5047. "credentials": {
  5048. "googleSlidesOAuth2Api": {
  5049. "id": "yloV13TPeYn5lmdZ",
  5050. "name": "Google Slides account"
  5051. }
  5052. }
  5053. },
  5054. {
  5055. "parameters": {
  5056. "inputDataFieldName": "=data",
  5057. "driveId": {
  5058. "__rl": true,
  5059. "mode": "list",
  5060. "value": "My Drive"
  5061. },
  5062. "folderId": {
  5063. "__rl": true,
  5064. "value": "root",
  5065. "mode": "list",
  5066. "cachedResultName": "/ (Root folder)",
  5067. "cachedResultUrl": "https://drive.google.com/drive"
  5068. },
  5069. "options": {}
  5070. },
  5071. "id": "15f3cb3d-fa52-4cc6-a9b2-4fe426fdd739",
  5072. "name": "Google Drive Upload logo3",
  5073. "type": "n8n-nodes-base.googleDrive",
  5074. "typeVersion": 3,
  5075. "position": [
  5076. -240,
  5077. -5220
  5078. ],
  5079. "credentials": {
  5080. "googleDriveOAuth2Api": {
  5081. "id": "qipLEwtX0VvgOAKy",
  5082. "name": "Google Drive account 2"
  5083. }
  5084. }
  5085. },
  5086. {
  5087. "parameters": {
  5088. "method": "POST",
  5089. "url": "=https://slides.googleapis.com/v1/presentations/{{ $json.presentationId }}:batchUpdate ",
  5090. "authentication": "predefinedCredentialType",
  5091. "nodeCredentialType": "googleSlidesOAuth2Api",
  5092. "sendBody": true,
  5093. "specifyBody": "json",
  5094. "jsonBody": "={\n \"requests\": [\n {\n \"replaceAllShapesWithImage\": {\n \"imageUrl\": \"https://drive.google.com/uc?id={{ $json.image1Id }}\",\n \"imageReplaceMethod\": \"CENTER_INSIDE\",\n \"containsText\": { \"text\": \"placeholder-image-p\" }\n }\n }\n ]\n}\n",
  5095. "options": {}
  5096. },
  5097. "id": "e4812ae7-49d6-4a2d-97a8-adc8205a7c32",
  5098. "name": "Insert images into placeholders3",
  5099. "type": "n8n-nodes-base.httpRequest",
  5100. "typeVersion": 4.1,
  5101. "position": [
  5102. 2300,
  5103. -5220
  5104. ],
  5105. "credentials": {
  5106. "googleSlidesOAuth2Api": {
  5107. "id": "yloV13TPeYn5lmdZ",
  5108. "name": "Google Slides account"
  5109. }
  5110. }
  5111. },
  5112. {
  5113. "parameters": {
  5114. "operation": "replaceText",
  5115. "presentationId": "={{ $json.presentationId }}",
  5116. "textUi": {
  5117. "textValues": [
  5118. {
  5119. "replaceText": "= \n",
  5120. "text": "\\n"
  5121. }
  5122. ]
  5123. },
  5124. "options": {
  5125. "revisionId": ""
  5126. }
  5127. },
  5128. "id": "e4883a3b-98af-4080-9c90-5bca3197243e",
  5129. "name": "remove \\n3",
  5130. "type": "n8n-nodes-base.googleSlides",
  5131. "typeVersion": 2,
  5132. "position": [
  5133. 2560,
  5134. -5660
  5135. ],
  5136. "credentials": {
  5137. "googleSlidesOAuth2Api": {
  5138. "id": "yloV13TPeYn5lmdZ",
  5139. "name": "Google Slides account"
  5140. }
  5141. }
  5142. },
  5143. {
  5144. "parameters": {
  5145. "operation": "replaceText",
  5146. "presentationId": "={{ $json.presentationId }}",
  5147. "textUi": {
  5148. "textValues": [
  5149. {
  5150. "pageObjectIds": [
  5151. "p"
  5152. ],
  5153. "replaceText": "={{ $json.companyName }}",
  5154. "text": "{{nom_compagnie}}"
  5155. }
  5156. ]
  5157. },
  5158. "options": {
  5159. "revisionId": ""
  5160. }
  5161. },
  5162. "id": "a7462fa2-1263-4fa3-877d-234c8db8e806",
  5163. "name": "Insert companyName3",
  5164. "type": "n8n-nodes-base.googleSlides",
  5165. "typeVersion": 2,
  5166. "position": [
  5167. 2300,
  5168. -5460
  5169. ],
  5170. "credentials": {
  5171. "googleSlidesOAuth2Api": {
  5172. "id": "yloV13TPeYn5lmdZ",
  5173. "name": "Google Slides account"
  5174. }
  5175. }
  5176. },
  5177. {
  5178. "parameters": {
  5179. "method": "POST",
  5180. "url": "=https://slides.googleapis.com/v1/presentations/{{ $json.presentationId }}:batchUpdate",
  5181. "authentication": "predefinedCredentialType",
  5182. "nodeCredentialType": "googleSlidesOAuth2Api",
  5183. "sendBody": true,
  5184. "specifyBody": "json",
  5185. "jsonBody": "={\n \"requests\": [\n {\n \"replaceAllShapesWithImage\": {\n \"imageUrl\": \"https://drive.google.com/uc?id={{ $json.logoId }}\",\n \"imageReplaceMethod\": \"CENTER_INSIDE\",\n \"containsText\": { \"text\": \"Logo_client\" }\n }\n }\n ]\n} ",
  5186. "options": {}
  5187. },
  5188. "id": "11311526-a742-441d-9d44-e531cf0b2848",
  5189. "name": "Insert logo into PH3",
  5190. "type": "n8n-nodes-base.httpRequest",
  5191. "typeVersion": 4.1,
  5192. "position": [
  5193. 2300,
  5194. -4820
  5195. ],
  5196. "credentials": {
  5197. "googleSlidesOAuth2Api": {
  5198. "id": "yloV13TPeYn5lmdZ",
  5199. "name": "Google Slides account"
  5200. }
  5201. }
  5202. },
  5203. {
  5204. "parameters": {
  5205. "method": "POST",
  5206. "url": "=https://slides.googleapis.com/v1/presentations/{{ $json.presentationId }}:batchUpdate ",
  5207. "authentication": "predefinedCredentialType",
  5208. "nodeCredentialType": "googleSlidesOAuth2Api",
  5209. "sendBody": true,
  5210. "specifyBody": "json",
  5211. "jsonBody": "={\n \"requests\": [\n {\n \"replaceAllShapesWithImage\": {\n \"imageUrl\": \"https://drive.google.com/uc?id={{ $json.image2Id }}\",\n \"imageReplaceMethod\": \"CENTER_INSIDE\",\n \"containsText\": { \"text\": \"placeholder-image-x\" }\n }\n }\n ]\n}",
  5212. "options": {}
  5213. },
  5214. "id": "2cd82159-989d-4d20-8242-04bc120e6703",
  5215. "name": "Insert images 2 into placeholders 3",
  5216. "type": "n8n-nodes-base.httpRequest",
  5217. "typeVersion": 4.1,
  5218. "position": [
  5219. 2300,
  5220. -5020
  5221. ],
  5222. "credentials": {
  5223. "googleSlidesOAuth2Api": {
  5224. "id": "yloV13TPeYn5lmdZ",
  5225. "name": "Google Slides account"
  5226. }
  5227. }
  5228. },
  5229. {
  5230. "parameters": {
  5231. "operation": "replaceText",
  5232. "presentationId": "={{ $json.presentationId }}",
  5233. "textUi": {
  5234. "textValues": [
  5235. {
  5236. "pageObjectIds": [
  5237. "g1f1e0df403e_0_20"
  5238. ],
  5239. "replaceText": "={{ $json.sections.sectionContenu1 }}",
  5240. "text": "{{sectionContenu1}}"
  5241. },
  5242. {
  5243. "pageObjectIds": [
  5244. "g2c0a7f6a914_0_21"
  5245. ],
  5246. "replaceText": "={{ $json.sections.sectionContenu2 }}",
  5247. "text": "{{sectionContenu2}}"
  5248. },
  5249. {
  5250. "pageObjectIds": [
  5251. "g2c0a7f6a914_0_129"
  5252. ],
  5253. "replaceText": "={{ $json.sections.sectionContenu3 }}",
  5254. "text": "{{sectionContenu3}}"
  5255. },
  5256. {
  5257. "pageObjectIds": [
  5258. "g2c0a7f6a914_0_148"
  5259. ],
  5260. "replaceText": "={{ $json.sections.sectionContenu4 }}",
  5261. "text": "{{sectionContenu4}}"
  5262. },
  5263. {
  5264. "pageObjectIds": [
  5265. "g2c0a7f6a914_0_164"
  5266. ],
  5267. "replaceText": "={{ $json.sections.sectionContenu5 }}",
  5268. "text": "{{sectionContenu5}}"
  5269. },
  5270. {
  5271. "pageObjectIds": [
  5272. "g2c0a7f6a914_0_193"
  5273. ],
  5274. "replaceText": "={{ $json.sections.sectionContenu6 }}",
  5275. "text": "{{sectionContenu6}}"
  5276. },
  5277. {
  5278. "pageObjectIds": [
  5279. "g2c1a0221ae8_0_0"
  5280. ],
  5281. "replaceText": "={{ $json.sections.sectionContenu7 }}",
  5282. "text": "{{sectionContenu7}}"
  5283. }
  5284. ]
  5285. },
  5286. "options": {
  5287. "revisionId": ""
  5288. }
  5289. },
  5290. "id": "b8d1f302-085c-4514-b9c4-bb9cb4377ad4",
  5291. "name": "Insert cutText3",
  5292. "type": "n8n-nodes-base.googleSlides",
  5293. "typeVersion": 2,
  5294. "position": [
  5295. 2300,
  5296. -5660
  5297. ],
  5298. "credentials": {
  5299. "googleSlidesOAuth2Api": {
  5300. "id": "yloV13TPeYn5lmdZ",
  5301. "name": "Google Slides account"
  5302. }
  5303. }
  5304. },
  5305. {
  5306. "parameters": {
  5307. "method": "POST",
  5308. "url": "=https://slides.googleapis.com/v1/presentations/{{ $('Code for color modification3').item.json.presentationId }}:batchUpdate",
  5309. "authentication": "predefinedCredentialType",
  5310. "nodeCredentialType": "googleSlidesOAuth2Api",
  5311. "sendBody": true,
  5312. "specifyBody": "json",
  5313. "jsonBody": "={\n \"requests\": [\n {\n \"updateShapeProperties\": {\n \"objectId\": \"{{ $json['foundShape']['objectId'] }}\",\n \"fields\": \"shapeBackgroundFill.solidFill.color\",\n \"shapeProperties\": {\n \"shapeBackgroundFill\": {\n \"solidFill\": {\n \"color\": {\n \"rgbColor\": {\n \"red\": \"{{ $json['foundShape']['shape']['shapeProperties']['shapeBackgroundFill']['solidFill']['color']['rgbColor']['red'] }}\",\n \"green\": \"{{ $json['foundShape']['shape']['shapeProperties']['shapeBackgroundFill']['solidFill']['color']['rgbColor']['green'] }}\",\n \"blue\": \"{{ $json['foundShape']['shape']['shapeProperties']['shapeBackgroundFill']['solidFill']['color']['rgbColor']['blue'] }}\"\n }\n }\n }\n }\n }\n }\n }\n ]\n}\n",
  5314. "options": {}
  5315. },
  5316. "id": "5f270b17-b11b-422a-a5c8-de3c9c9e463b",
  5317. "name": "Send new color to slides3",
  5318. "type": "n8n-nodes-base.httpRequest",
  5319. "typeVersion": 4.1,
  5320. "position": [
  5321. 1920,
  5322. -5460
  5323. ],
  5324. "credentials": {
  5325. "googleSlidesOAuth2Api": {
  5326. "id": "yloV13TPeYn5lmdZ",
  5327. "name": "Google Slides account"
  5328. }
  5329. }
  5330. },
  5331. {
  5332. "parameters": {
  5333. "jsCode": "\n\n\n// Le alt text du triangle qu'on cherche\nconst targetDescription = \"bordure\";\n\n// Correcting the path to access borderColor \nif (!items[0].json.body || !items[0].json.body.selectedColor) {\n throw new Error(\"borderColor is undefined or not passed correctly.\");\n}\n\n// Adjusting to the correct path\nconst inputColor = items[0].json.body.selectedColor;\n\n// Assuming `items[0].json.slides` is the array of slides you received from the Slides API.\nconst slides = items[1].json.slides;\n\n// Placeholder for the found shapes\nlet foundShapes = [];\n\n// Loop over each slide\nfor (const slide of slides) {\n // Check if slide has pageElements and it's an array\n if (Array.isArray(slide.pageElements)) {\n // Find all shapes with the description 'triangle1' within the current slide\n const matchingShapes = slide.pageElements.filter(\n (element) => element.description === targetDescription\n );\n foundShapes = foundShapes.concat(matchingShapes);\n }\n}\n\n// Check if we found any shapes\nif (foundShapes.length > 0) {\n // Apply the new color to all found shapes.\n foundShapes.forEach(foundShape => {\n foundShape.shape.shapeProperties.shapeBackgroundFill.solidFill.color.rgbColor = {\n red: inputColor.red, // Ensure this is a value between 0 and 1\n green: inputColor.green, // Ensure this is a value between 0 and 1\n blue: inputColor.blue, // Ensure this is a value between 0 and 1\n alpha: inputColor.alpha || 1, // Default to 1 if alpha is not provided\n };\n });\n\n // Return the modified shapes and the presentationId\n return foundShapes.map(foundShape => ({\n json: {\n foundShape: foundShape,\n presentationId: items[1].json.presentationId\n }\n }));\n} else {\n // If no shapes with 'triangle1' description were found in any slide\n return [{ json: { error: \"Shape with description 'triangle1' not found\" } }];\n}\n"
  5334. },
  5335. "id": "40f16d17-c5ca-45b2-a801-fba6ff161f87",
  5336. "name": "Code for color modification3",
  5337. "type": "n8n-nodes-base.code",
  5338. "typeVersion": 2,
  5339. "position": [
  5340. 1640,
  5341. -5460
  5342. ]
  5343. },
  5344. {
  5345. "parameters": {},
  5346. "id": "91b1319f-3194-43c9-b523-edb5be5d257d",
  5347. "name": "Merge33",
  5348. "type": "n8n-nodes-base.merge",
  5349. "typeVersion": 2.1,
  5350. "position": [
  5351. 1380,
  5352. -5460
  5353. ]
  5354. },
  5355. {
  5356. "parameters": {
  5357. "operation": "get",
  5358. "presentationId": "={{ $json.id }}"
  5359. },
  5360. "id": "1b5d981d-246a-48c1-8e93-5e0f89048643",
  5361. "name": "Getting the copied Slide3",
  5362. "type": "n8n-nodes-base.googleSlides",
  5363. "typeVersion": 2,
  5364. "position": [
  5365. 1120,
  5366. -5400
  5367. ],
  5368. "credentials": {
  5369. "googleSlidesOAuth2Api": {
  5370. "id": "yloV13TPeYn5lmdZ",
  5371. "name": "Google Slides account"
  5372. }
  5373. }
  5374. },
  5375. {
  5376. "parameters": {
  5377. "operation": "copy",
  5378. "fileId": {
  5379. "__rl": true,
  5380. "value": "1bRj2003LHoNJWfjQ3N3meVlgpDD8cmMmOWniHfpgFLQ",
  5381. "mode": "id"
  5382. },
  5383. "name": "=\"Pitch\" + {{new Date().getFullYear()}}-{{(\"0\" + (new Date().getMonth() + 1)).slice(-2)}}-{{(\"0\" + new Date().getDate()).slice(-2)}}-{{(\"0\" + new Date().getHours()).slice(-2)}}:{{(\"0\" + new Date().getMinutes()).slice(-2)}}:{{(\"0\" + new Date().getSeconds()).slice(-2)}}",
  5384. "sameFolder": false,
  5385. "driveId": {
  5386. "__rl": true,
  5387. "mode": "list",
  5388. "value": "My Drive"
  5389. },
  5390. "folderId": {
  5391. "__rl": true,
  5392. "value": "={{ $json.id }}",
  5393. "mode": "id"
  5394. },
  5395. "options": {}
  5396. },
  5397. "id": "78c39ac6-bbce-4103-a5b5-8c9455f3c612",
  5398. "name": "Copy temp src and generate unique name file3",
  5399. "type": "n8n-nodes-base.googleDrive",
  5400. "typeVersion": 3,
  5401. "position": [
  5402. -240,
  5403. -5400
  5404. ],
  5405. "credentials": {
  5406. "googleDriveOAuth2Api": {
  5407. "id": "qipLEwtX0VvgOAKy",
  5408. "name": "Google Drive account 2"
  5409. }
  5410. }
  5411. },
  5412. {
  5413. "parameters": {
  5414. "operation": "get",
  5415. "presentationId": "1bRj2003LHoNJWfjQ3N3meVlgpDD8cmMmOWniHfpgFLQ"
  5416. },
  5417. "id": "ada78e6f-c007-4ad9-a8d9-b0480bd00d69",
  5418. "name": "Get Templace Source3",
  5419. "type": "n8n-nodes-base.googleSlides",
  5420. "typeVersion": 2,
  5421. "position": [
  5422. -540,
  5423. -5400
  5424. ],
  5425. "credentials": {
  5426. "googleSlidesOAuth2Api": {
  5427. "id": "yloV13TPeYn5lmdZ",
  5428. "name": "Google Slides account"
  5429. }
  5430. }
  5431. },
  5432. {
  5433. "parameters": {},
  5434. "id": "4426846b-a91b-4c05-8bb7-ff585d97d72d",
  5435. "name": "Merge34",
  5436. "type": "n8n-nodes-base.merge",
  5437. "typeVersion": 2.1,
  5438. "position": [
  5439. 1120,
  5440. -5200
  5441. ]
  5442. },
  5443. {
  5444. "parameters": {},
  5445. "id": "db8a0c1b-0ace-4172-8986-a31a8e6e1c2c",
  5446. "name": "Merge35",
  5447. "type": "n8n-nodes-base.merge",
  5448. "typeVersion": 2.1,
  5449. "position": [
  5450. 940,
  5451. -5040
  5452. ]
  5453. },
  5454. {
  5455. "parameters": {
  5456. "method": "=POST",
  5457. "url": "=https://www.googleapis.com/drive/v3/files/{{ $json.id }}/permissions",
  5458. "authentication": "predefinedCredentialType",
  5459. "nodeCredentialType": "googleDriveOAuth2Api",
  5460. "sendBody": true,
  5461. "specifyBody": "json",
  5462. "jsonBody": "{\n \"role\": \"reader\",\n \"type\": \"anyone\"\n}",
  5463. "options": {}
  5464. },
  5465. "id": "ab596cc4-e20b-4212-acfa-5d4cf1914912",
  5466. "name": "Change permission access3",
  5467. "type": "n8n-nodes-base.httpRequest",
  5468. "typeVersion": 4.1,
  5469. "position": [
  5470. 1380,
  5471. -5300
  5472. ],
  5473. "credentials": {
  5474. "googleDriveOAuth2Api": {
  5475. "id": "Ez0VV5Mm43ioqg7r",
  5476. "name": "Google Drive account 2"
  5477. }
  5478. }
  5479. },
  5480. {
  5481. "parameters": {
  5482. "inputDataFieldName": "=data",
  5483. "driveId": {
  5484. "__rl": true,
  5485. "mode": "list",
  5486. "value": "My Drive"
  5487. },
  5488. "folderId": {
  5489. "__rl": true,
  5490. "value": "root",
  5491. "mode": "list",
  5492. "cachedResultName": "/ (Root folder)",
  5493. "cachedResultUrl": "https://drive.google.com/drive"
  5494. },
  5495. "options": {}
  5496. },
  5497. "id": "60ceda22-1a55-4b1f-8eb1-136b2f3e6ce1",
  5498. "name": "Google Drive Upload image6",
  5499. "type": "n8n-nodes-base.googleDrive",
  5500. "typeVersion": 3,
  5501. "position": [
  5502. -240,
  5503. -4840
  5504. ],
  5505. "credentials": {
  5506. "googleDriveOAuth2Api": {
  5507. "id": "qipLEwtX0VvgOAKy",
  5508. "name": "Google Drive account 2"
  5509. }
  5510. }
  5511. },
  5512. {
  5513. "parameters": {
  5514. "content": "## Generate slides in folder with name and creation date \n",
  5515. "width": 332.0380316721941
  5516. },
  5517. "id": "970bc900-c1ea-4e99-8288-894f9870e6a4",
  5518. "name": "Sticky Note18",
  5519. "type": "n8n-nodes-base.stickyNote",
  5520. "typeVersion": 1,
  5521. "position": [
  5522. -1260,
  5523. -5500
  5524. ]
  5525. },
  5526. {
  5527. "parameters": {
  5528. "inputDataFieldName": "=data",
  5529. "driveId": {
  5530. "__rl": true,
  5531. "mode": "list",
  5532. "value": "My Drive"
  5533. },
  5534. "folderId": {
  5535. "__rl": true,
  5536. "value": "root",
  5537. "mode": "list",
  5538. "cachedResultName": "/ (Root folder)",
  5539. "cachedResultUrl": "https://drive.google.com/drive"
  5540. },
  5541. "options": {}
  5542. },
  5543. "id": "ee69c88e-5c61-43f2-a40f-19503e5dfff1",
  5544. "name": "Google Drive Upload image7",
  5545. "type": "n8n-nodes-base.googleDrive",
  5546. "typeVersion": 3,
  5547. "position": [
  5548. -240,
  5549. -5040
  5550. ],
  5551. "credentials": {
  5552. "googleDriveOAuth2Api": {
  5553. "id": "qipLEwtX0VvgOAKy",
  5554. "name": "Google Drive account 2"
  5555. }
  5556. }
  5557. },
  5558. {
  5559. "parameters": {
  5560. "httpMethod": "POST",
  5561. "path": "v4-generate-slides-folder-create-date",
  5562. "responseMode": "responseNode",
  5563. "options": {
  5564. "allowedOrigins": "*"
  5565. }
  5566. },
  5567. "id": "9b27005d-947b-4beb-bb21-fb64a669b5af",
  5568. "name": "GenerateSlides_Create2",
  5569. "type": "n8n-nodes-base.webhook",
  5570. "typeVersion": 1.1,
  5571. "position": [
  5572. -840,
  5573. -5480
  5574. ],
  5575. "webhookId": "d845efd4-3b7b-4447-be4d-3cdfb1cddf2d"
  5576. },
  5577. {
  5578. "parameters": {
  5579. "url": "={{ $json.body.logoData }}",
  5580. "options": {
  5581. "response": {
  5582. "response": {
  5583. "responseFormat": "file"
  5584. }
  5585. }
  5586. }
  5587. },
  5588. "id": "d05dfc70-71c3-42a7-b20b-0be80d427305",
  5589. "name": "Send logo to Google Drive3",
  5590. "type": "n8n-nodes-base.httpRequest",
  5591. "typeVersion": 4.1,
  5592. "position": [
  5593. -540,
  5594. -5220
  5595. ]
  5596. },
  5597. {
  5598. "parameters": {
  5599. "url": "={{ $json.body.imageUrls[0]}}",
  5600. "sendHeaders": true,
  5601. "headerParameters": {
  5602. "parameters": [
  5603. {
  5604. "name": "Host",
  5605. "value": "oaidalleapiprodscus.blob.core.windows.net"
  5606. },
  5607. {
  5608. "name": "User-Agent",
  5609. "value": "Mozilla/5.0"
  5610. },
  5611. {
  5612. "name": "Connection",
  5613. "value": "keep-alive"
  5614. }
  5615. ]
  5616. },
  5617. "options": {
  5618. "response": {
  5619. "response": {
  5620. "fullResponse": true,
  5621. "responseFormat": "file"
  5622. }
  5623. },
  5624. "timeout": 90000
  5625. }
  5626. },
  5627. "id": "d6f40c9f-0cfd-44c5-97b0-5070dc096134",
  5628. "name": "Send image 1 to Google Drive3",
  5629. "type": "n8n-nodes-base.httpRequest",
  5630. "typeVersion": 4.1,
  5631. "position": [
  5632. -540,
  5633. -5040
  5634. ],
  5635. "retryOnFail": false,
  5636. "waitBetweenTries": 3000,
  5637. "alwaysOutputData": false
  5638. },
  5639. {
  5640. "parameters": {
  5641. "url": "={{ $json.body.imageUrls[1] }}",
  5642. "sendHeaders": true,
  5643. "headerParameters": {
  5644. "parameters": [
  5645. {
  5646. "name": "Host",
  5647. "value": "oaidalleapiprodscus.blob.core.windows.net"
  5648. },
  5649. {
  5650. "name": "User-Agent",
  5651. "value": "Mozilla/5.0"
  5652. },
  5653. {
  5654. "name": "Connection",
  5655. "value": "keep-alive"
  5656. }
  5657. ]
  5658. },
  5659. "options": {
  5660. "response": {
  5661. "response": {
  5662. "fullResponse": true,
  5663. "responseFormat": "file"
  5664. }
  5665. },
  5666. "timeout": 90000
  5667. }
  5668. },
  5669. "id": "d54626b7-8e03-4b87-ac98-1a43e49e975d",
  5670. "name": "Send image 2 to Google Drive3",
  5671. "type": "n8n-nodes-base.httpRequest",
  5672. "typeVersion": 4.1,
  5673. "position": [
  5674. -540,
  5675. -4840
  5676. ],
  5677. "retryOnFail": false,
  5678. "waitBetweenTries": 3000,
  5679. "alwaysOutputData": false
  5680. }
  5681. ],
  5682. "pinData": {},
  5683. "connections": {
  5684. "Drive API Export PDF1": {
  5685. "main": [
  5686. [
  5687. {
  5688. "node": "Save PDF in Drive1",
  5689. "type": "main",
  5690. "index": 0
  5691. }
  5692. ]
  5693. ]
  5694. },
  5695. "Save PDF in Drive1": {
  5696. "main": [
  5697. [
  5698. {
  5699. "node": "Merge15",
  5700. "type": "main",
  5701. "index": 1
  5702. },
  5703. {
  5704. "node": "Change permission access PDF1",
  5705. "type": "main",
  5706. "index": 0
  5707. },
  5708. {
  5709. "node": "Réponse au Webhook PDF1",
  5710. "type": "main",
  5711. "index": 0
  5712. }
  5713. ]
  5714. ]
  5715. },
  5716. "Webhook : Generate PDF1": {
  5717. "main": [
  5718. [
  5719. {
  5720. "node": "Drive API Export PDF1",
  5721. "type": "main",
  5722. "index": 0
  5723. },
  5724. {
  5725. "node": "Merge15",
  5726. "type": "main",
  5727. "index": 0
  5728. }
  5729. ]
  5730. ]
  5731. },
  5732. "FolderId4": {
  5733. "main": [
  5734. [
  5735. {
  5736. "node": "Google Drive5",
  5737. "type": "main",
  5738. "index": 0
  5739. }
  5740. ]
  5741. ]
  5742. },
  5743. "Merge15": {
  5744. "main": [
  5745. [
  5746. {
  5747. "node": "FolderId4",
  5748. "type": "main",
  5749. "index": 0
  5750. }
  5751. ]
  5752. ]
  5753. },
  5754. "OpenAI Assistant1": {
  5755. "main": [
  5756. [
  5757. {
  5758. "node": "Réponse au Webhook TEXTE1",
  5759. "type": "main",
  5760. "index": 0
  5761. }
  5762. ]
  5763. ]
  5764. },
  5765. "Webhook : générer texte1": {
  5766. "main": [
  5767. [
  5768. {
  5769. "node": "OpenAI Assistant1",
  5770. "type": "main",
  5771. "index": 0
  5772. }
  5773. ]
  5774. ]
  5775. },
  5776. "Webhook : Merge PDFs": {
  5777. "main": [
  5778. [
  5779. {
  5780. "node": "Google Drive Upload chosen PDF2",
  5781. "type": "main",
  5782. "index": 0
  5783. },
  5784. {
  5785. "node": "Merge16",
  5786. "type": "main",
  5787. "index": 0
  5788. }
  5789. ]
  5790. ]
  5791. },
  5792. "Google Drive Upload chosen PDF2": {
  5793. "main": [
  5794. [
  5795. {
  5796. "node": "Change permission access pdf1",
  5797. "type": "main",
  5798. "index": 0
  5799. },
  5800. {
  5801. "node": "Réponse au Webhook upload PDF2",
  5802. "type": "main",
  5803. "index": 0
  5804. },
  5805. {
  5806. "node": "Merge16",
  5807. "type": "main",
  5808. "index": 1
  5809. }
  5810. ]
  5811. ]
  5812. },
  5813. "FolderId5": {
  5814. "main": [
  5815. [
  5816. {
  5817. "node": "Google Drive6",
  5818. "type": "main",
  5819. "index": 0
  5820. }
  5821. ]
  5822. ]
  5823. },
  5824. "Merge16": {
  5825. "main": [
  5826. [
  5827. {
  5828. "node": "FolderId5",
  5829. "type": "main",
  5830. "index": 0
  5831. }
  5832. ]
  5833. ]
  5834. },
  5835. "Webhook: Upload chosen PDF1": {
  5836. "main": [
  5837. [
  5838. {
  5839. "node": "Google Drive Upload chosen PDF3",
  5840. "type": "main",
  5841. "index": 0
  5842. },
  5843. {
  5844. "node": "Merge17",
  5845. "type": "main",
  5846. "index": 0
  5847. }
  5848. ]
  5849. ]
  5850. },
  5851. "Google Drive Upload chosen PDF3": {
  5852. "main": [
  5853. [
  5854. {
  5855. "node": "Change permission access pdf3",
  5856. "type": "main",
  5857. "index": 0
  5858. },
  5859. {
  5860. "node": "Réponse au Webhook upload PDF3",
  5861. "type": "main",
  5862. "index": 0
  5863. },
  5864. {
  5865. "node": "Merge17",
  5866. "type": "main",
  5867. "index": 1
  5868. }
  5869. ]
  5870. ]
  5871. },
  5872. "Drive API Export PDF": {
  5873. "main": [
  5874. [
  5875. {
  5876. "node": "Save PDF in Drive",
  5877. "type": "main",
  5878. "index": 0
  5879. }
  5880. ]
  5881. ]
  5882. },
  5883. "Save PDF in Drive": {
  5884. "main": [
  5885. [
  5886. {
  5887. "node": "Change permission access PDF",
  5888. "type": "main",
  5889. "index": 0
  5890. },
  5891. {
  5892. "node": "Réponse au Webhook PDF",
  5893. "type": "main",
  5894. "index": 0
  5895. }
  5896. ]
  5897. ]
  5898. },
  5899. "Webhook: Upload chosen PDF": {
  5900. "main": [
  5901. [
  5902. {
  5903. "node": "Google Drive Upload chosen PDF",
  5904. "type": "main",
  5905. "index": 0
  5906. }
  5907. ]
  5908. ]
  5909. },
  5910. "Google Drive Upload chosen PDF": {
  5911. "main": [
  5912. [
  5913. {
  5914. "node": "Change permission access pdf2",
  5915. "type": "main",
  5916. "index": 0
  5917. },
  5918. {
  5919. "node": "Réponse au Webhook upload PDF",
  5920. "type": "main",
  5921. "index": 0
  5922. }
  5923. ]
  5924. ]
  5925. },
  5926. "Google Drive Upload image1": {
  5927. "main": [
  5928. [
  5929. {
  5930. "node": "Merge1",
  5931. "type": "main",
  5932. "index": 0
  5933. }
  5934. ]
  5935. ]
  5936. },
  5937. "Webhook : générer slides": {
  5938. "main": [
  5939. [
  5940. {
  5941. "node": "Send image 1 to Google Drive",
  5942. "type": "main",
  5943. "index": 0
  5944. },
  5945. {
  5946. "node": "Send image 2 to Google Drive",
  5947. "type": "main",
  5948. "index": 0
  5949. },
  5950. {
  5951. "node": "Get Templace Source1",
  5952. "type": "main",
  5953. "index": 0
  5954. },
  5955. {
  5956. "node": "Merge5",
  5957. "type": "main",
  5958. "index": 0
  5959. },
  5960. {
  5961. "node": "Send logo to Google Drive",
  5962. "type": "main",
  5963. "index": 0
  5964. }
  5965. ]
  5966. ]
  5967. },
  5968. "OpenAI Assistant": {
  5969. "main": [
  5970. [
  5971. {
  5972. "node": "Réponse au Webhook TEXTE",
  5973. "type": "main",
  5974. "index": 0
  5975. }
  5976. ]
  5977. ]
  5978. },
  5979. "Generate image (DE-3, 1792x1024)": {
  5980. "main": [
  5981. [
  5982. {
  5983. "node": "Merge",
  5984. "type": "main",
  5985. "index": 1
  5986. }
  5987. ]
  5988. ]
  5989. },
  5990. "Google Drive Upload image2": {
  5991. "main": [
  5992. [
  5993. {
  5994. "node": "Merge1",
  5995. "type": "main",
  5996. "index": 1
  5997. }
  5998. ]
  5999. ]
  6000. },
  6001. "Merge1": {
  6002. "main": [
  6003. [
  6004. {
  6005. "node": "Merge2",
  6006. "type": "main",
  6007. "index": 1
  6008. }
  6009. ]
  6010. ]
  6011. },
  6012. "Merge2": {
  6013. "main": [
  6014. [
  6015. {
  6016. "node": "Change permission access",
  6017. "type": "main",
  6018. "index": 0
  6019. },
  6020. {
  6021. "node": "Merge3",
  6022. "type": "main",
  6023. "index": 1
  6024. }
  6025. ]
  6026. ]
  6027. },
  6028. "Get Templace Source1": {
  6029. "main": [
  6030. [
  6031. {
  6032. "node": "Copy temp src and generate unique name file1",
  6033. "type": "main",
  6034. "index": 0
  6035. }
  6036. ]
  6037. ]
  6038. },
  6039. "Copy temp src and generate unique name file1": {
  6040. "main": [
  6041. [
  6042. {
  6043. "node": "Getting the copied Slide1",
  6044. "type": "main",
  6045. "index": 0
  6046. },
  6047. {
  6048. "node": "Google Slides",
  6049. "type": "main",
  6050. "index": 0
  6051. }
  6052. ]
  6053. ]
  6054. },
  6055. "Getting the copied Slide1": {
  6056. "main": [
  6057. [
  6058. {
  6059. "node": "Merge5",
  6060. "type": "main",
  6061. "index": 1
  6062. }
  6063. ]
  6064. ]
  6065. },
  6066. "Merge5": {
  6067. "main": [
  6068. [
  6069. {
  6070. "node": "Code for color modification1",
  6071. "type": "main",
  6072. "index": 0
  6073. },
  6074. {
  6075. "node": "Merge3",
  6076. "type": "main",
  6077. "index": 0
  6078. },
  6079. {
  6080. "node": "OutputTextCut",
  6081. "type": "main",
  6082. "index": 0
  6083. }
  6084. ]
  6085. ]
  6086. },
  6087. "Code for color modification1": {
  6088. "main": [
  6089. [
  6090. {
  6091. "node": "Send new color to slides1",
  6092. "type": "main",
  6093. "index": 0
  6094. }
  6095. ]
  6096. ]
  6097. },
  6098. "Insert cutText1": {
  6099. "main": [
  6100. [
  6101. {
  6102. "node": "remove \\n1",
  6103. "type": "main",
  6104. "index": 0
  6105. }
  6106. ]
  6107. ]
  6108. },
  6109. "Insert logo into PH1": {
  6110. "main": [
  6111. [
  6112. {
  6113. "node": "InsertImages2",
  6114. "type": "main",
  6115. "index": 0
  6116. }
  6117. ]
  6118. ]
  6119. },
  6120. "Send logo to Google Drive": {
  6121. "main": [
  6122. [
  6123. {
  6124. "node": "Google Drive Upload logo",
  6125. "type": "main",
  6126. "index": 0
  6127. }
  6128. ]
  6129. ]
  6130. },
  6131. "Google Drive Upload logo": {
  6132. "main": [
  6133. [
  6134. {
  6135. "node": "Merge2",
  6136. "type": "main",
  6137. "index": 0
  6138. }
  6139. ]
  6140. ]
  6141. },
  6142. "Merge3": {
  6143. "main": [
  6144. [
  6145. {
  6146. "node": "InsertImages",
  6147. "type": "main",
  6148. "index": 0
  6149. }
  6150. ]
  6151. ]
  6152. },
  6153. "InsertImages": {
  6154. "main": [
  6155. [
  6156. {
  6157. "node": "Insert images into placeholders1",
  6158. "type": "main",
  6159. "index": 0
  6160. },
  6161. {
  6162. "node": "Insert images 2 into placeholders ",
  6163. "type": "main",
  6164. "index": 0
  6165. },
  6166. {
  6167. "node": "Insert logo into PH1",
  6168. "type": "main",
  6169. "index": 0
  6170. }
  6171. ]
  6172. ]
  6173. },
  6174. "InsertImages2": {
  6175. "main": [
  6176. [
  6177. {
  6178. "node": "Réponse au Webhook TEXT2",
  6179. "type": "main",
  6180. "index": 0
  6181. }
  6182. ]
  6183. ]
  6184. },
  6185. "Webhook : générer texte": {
  6186. "main": [
  6187. [
  6188. {
  6189. "node": "OpenAI Assistant",
  6190. "type": "main",
  6191. "index": 0
  6192. }
  6193. ]
  6194. ]
  6195. },
  6196. "Webhook : générer image": {
  6197. "main": [
  6198. [
  6199. {
  6200. "node": "Generate image (DE-3, 1792x1024)",
  6201. "type": "main",
  6202. "index": 0
  6203. },
  6204. {
  6205. "node": "Generate image (DE-3, 1792x1024)1",
  6206. "type": "main",
  6207. "index": 0
  6208. },
  6209. {
  6210. "node": "Generate image (DE-3, 1792x1024)2",
  6211. "type": "main",
  6212. "index": 0
  6213. }
  6214. ]
  6215. ]
  6216. },
  6217. "Send image 1 to Google Drive": {
  6218. "main": [
  6219. [
  6220. {
  6221. "node": "Google Drive Upload image1",
  6222. "type": "main",
  6223. "index": 0
  6224. }
  6225. ]
  6226. ]
  6227. },
  6228. "Send image 2 to Google Drive": {
  6229. "main": [
  6230. [
  6231. {
  6232. "node": "Google Drive Upload image2",
  6233. "type": "main",
  6234. "index": 0
  6235. }
  6236. ]
  6237. ]
  6238. },
  6239. "Webhook : Merge PDFs1": {
  6240. "main": [
  6241. [
  6242. {
  6243. "node": "Google Drive Upload chosen PDF1",
  6244. "type": "main",
  6245. "index": 0
  6246. }
  6247. ]
  6248. ]
  6249. },
  6250. "Google Drive Upload chosen PDF1": {
  6251. "main": [
  6252. [
  6253. {
  6254. "node": "Change permission access pdf",
  6255. "type": "main",
  6256. "index": 0
  6257. },
  6258. {
  6259. "node": "Réponse au Webhook upload PDF1",
  6260. "type": "main",
  6261. "index": 0
  6262. }
  6263. ]
  6264. ]
  6265. },
  6266. "Webhook : Generate PDF": {
  6267. "main": [
  6268. [
  6269. {
  6270. "node": "Drive API Export PDF",
  6271. "type": "main",
  6272. "index": 0
  6273. }
  6274. ]
  6275. ]
  6276. },
  6277. "Generate image (DE-3, 1792x1024)1": {
  6278. "main": [
  6279. [
  6280. {
  6281. "node": "Merge",
  6282. "type": "main",
  6283. "index": 0
  6284. }
  6285. ]
  6286. ]
  6287. },
  6288. "Generate image (DE-3, 1792x1024)2": {
  6289. "main": [
  6290. [
  6291. {
  6292. "node": "Merge4",
  6293. "type": "main",
  6294. "index": 1
  6295. }
  6296. ]
  6297. ]
  6298. },
  6299. "Merge": {
  6300. "main": [
  6301. [
  6302. {
  6303. "node": "Merge4",
  6304. "type": "main",
  6305. "index": 0
  6306. }
  6307. ]
  6308. ]
  6309. },
  6310. "Merge4": {
  6311. "main": [
  6312. [
  6313. {
  6314. "node": "Réponse au Webhook IMAGE",
  6315. "type": "main",
  6316. "index": 0
  6317. }
  6318. ]
  6319. ]
  6320. },
  6321. "OutputTextCut": {
  6322. "main": [
  6323. [
  6324. {
  6325. "node": "Insert cutTitles1",
  6326. "type": "main",
  6327. "index": 0
  6328. },
  6329. {
  6330. "node": "Insert cutText1",
  6331. "type": "main",
  6332. "index": 0
  6333. },
  6334. {
  6335. "node": "Insert companyName1",
  6336. "type": "main",
  6337. "index": 0
  6338. },
  6339. {
  6340. "node": "Send urlGenerative",
  6341. "type": "main",
  6342. "index": 0
  6343. }
  6344. ]
  6345. ]
  6346. },
  6347. "FolderId6": {
  6348. "main": [
  6349. [
  6350. {
  6351. "node": "Google Drive7",
  6352. "type": "main",
  6353. "index": 0
  6354. }
  6355. ]
  6356. ]
  6357. },
  6358. "Merge17": {
  6359. "main": [
  6360. [
  6361. {
  6362. "node": "FolderId6",
  6363. "type": "main",
  6364. "index": 0
  6365. }
  6366. ]
  6367. ]
  6368. },
  6369. "Google Drive Upload image4": {
  6370. "main": [
  6371. [
  6372. {
  6373. "node": "Merge24",
  6374. "type": "main",
  6375. "index": 1
  6376. }
  6377. ]
  6378. ]
  6379. },
  6380. "Google Drive Upload image5": {
  6381. "main": [
  6382. [
  6383. {
  6384. "node": "Merge25",
  6385. "type": "main",
  6386. "index": 1
  6387. }
  6388. ]
  6389. ]
  6390. },
  6391. "Merge18": {
  6392. "main": [
  6393. [
  6394. {
  6395. "node": "Merge19",
  6396. "type": "main",
  6397. "index": 1
  6398. }
  6399. ]
  6400. ]
  6401. },
  6402. "Merge19": {
  6403. "main": [
  6404. [
  6405. {
  6406. "node": "Change permission access2",
  6407. "type": "main",
  6408. "index": 0
  6409. },
  6410. {
  6411. "node": "Merge21",
  6412. "type": "main",
  6413. "index": 1
  6414. }
  6415. ]
  6416. ]
  6417. },
  6418. "Get Templace Source2": {
  6419. "main": [
  6420. [
  6421. {
  6422. "node": "Copy temp src and generate unique name file2",
  6423. "type": "main",
  6424. "index": 0
  6425. }
  6426. ]
  6427. ]
  6428. },
  6429. "Copy temp src and generate unique name file2": {
  6430. "main": [
  6431. [
  6432. {
  6433. "node": "Merge22",
  6434. "type": "main",
  6435. "index": 1
  6436. }
  6437. ]
  6438. ]
  6439. },
  6440. "Getting the copied Slide2": {
  6441. "main": [
  6442. [
  6443. {
  6444. "node": "Merge20",
  6445. "type": "main",
  6446. "index": 1
  6447. }
  6448. ]
  6449. ]
  6450. },
  6451. "Merge20": {
  6452. "main": [
  6453. [
  6454. {
  6455. "node": "Code for color modification2",
  6456. "type": "main",
  6457. "index": 0
  6458. },
  6459. {
  6460. "node": "Merge21",
  6461. "type": "main",
  6462. "index": 0
  6463. },
  6464. {
  6465. "node": "OutputTextCut2",
  6466. "type": "main",
  6467. "index": 0
  6468. }
  6469. ]
  6470. ]
  6471. },
  6472. "Code for color modification2": {
  6473. "main": [
  6474. [
  6475. {
  6476. "node": "Send new color to slides2",
  6477. "type": "main",
  6478. "index": 0
  6479. }
  6480. ]
  6481. ]
  6482. },
  6483. "Insert cutText2": {
  6484. "main": [
  6485. [
  6486. {
  6487. "node": "remove \\n2",
  6488. "type": "main",
  6489. "index": 0
  6490. }
  6491. ]
  6492. ]
  6493. },
  6494. "Insert logo into PH2": {
  6495. "main": [
  6496. [
  6497. {
  6498. "node": "Merge26",
  6499. "type": "main",
  6500. "index": 0
  6501. }
  6502. ]
  6503. ]
  6504. },
  6505. "Send logo to Google Drive2": {
  6506. "main": [
  6507. [
  6508. {
  6509. "node": "Google Drive Upload logo2",
  6510. "type": "main",
  6511. "index": 0
  6512. }
  6513. ]
  6514. ]
  6515. },
  6516. "Google Drive Upload logo2": {
  6517. "main": [
  6518. [
  6519. {
  6520. "node": "Merge23",
  6521. "type": "main",
  6522. "index": 1
  6523. }
  6524. ]
  6525. ]
  6526. },
  6527. "Merge21": {
  6528. "main": [
  6529. [
  6530. {
  6531. "node": "InsertImages4",
  6532. "type": "main",
  6533. "index": 0
  6534. }
  6535. ]
  6536. ]
  6537. },
  6538. "InsertImages4": {
  6539. "main": [
  6540. [
  6541. {
  6542. "node": "Insert images into placeholders2",
  6543. "type": "main",
  6544. "index": 0
  6545. },
  6546. {
  6547. "node": "Insert images 2 into placeholders 2",
  6548. "type": "main",
  6549. "index": 0
  6550. },
  6551. {
  6552. "node": "Insert logo into PH2",
  6553. "type": "main",
  6554. "index": 0
  6555. }
  6556. ]
  6557. ]
  6558. },
  6559. "InsertImages5": {
  6560. "main": [
  6561. [
  6562. {
  6563. "node": "Réponse au Webhook TEXT1",
  6564. "type": "main",
  6565. "index": 0
  6566. }
  6567. ]
  6568. ]
  6569. },
  6570. "Send image 1 to Google Drive2": {
  6571. "main": [
  6572. [
  6573. {
  6574. "node": "Google Drive Upload image4",
  6575. "type": "main",
  6576. "index": 0
  6577. }
  6578. ]
  6579. ]
  6580. },
  6581. "Send image 2 to Google Drive2": {
  6582. "main": [
  6583. [
  6584. {
  6585. "node": "Google Drive Upload image5",
  6586. "type": "main",
  6587. "index": 0
  6588. }
  6589. ]
  6590. ]
  6591. },
  6592. "OutputTextCut2": {
  6593. "main": [
  6594. [
  6595. {
  6596. "node": "Insert cutTitles2",
  6597. "type": "main",
  6598. "index": 0
  6599. },
  6600. {
  6601. "node": "Insert cutText2",
  6602. "type": "main",
  6603. "index": 0
  6604. },
  6605. {
  6606. "node": "Insert companyName2",
  6607. "type": "main",
  6608. "index": 0
  6609. },
  6610. {
  6611. "node": "Send urlGenerative2",
  6612. "type": "main",
  6613. "index": 0
  6614. }
  6615. ]
  6616. ]
  6617. },
  6618. "FolderName1": {
  6619. "main": [
  6620. [
  6621. {
  6622. "node": "CreateFolder1",
  6623. "type": "main",
  6624. "index": 0
  6625. }
  6626. ]
  6627. ]
  6628. },
  6629. "CreateFolder1": {
  6630. "main": [
  6631. [
  6632. {
  6633. "node": "CreateSubFolder",
  6634. "type": "main",
  6635. "index": 0
  6636. }
  6637. ]
  6638. ]
  6639. },
  6640. "FolderId7": {
  6641. "main": [
  6642. [
  6643. {
  6644. "node": "Google Drive8",
  6645. "type": "main",
  6646. "index": 0
  6647. }
  6648. ]
  6649. ]
  6650. },
  6651. "Google Drive8": {
  6652. "main": [
  6653. [
  6654. {
  6655. "node": "Google Slides2",
  6656. "type": "main",
  6657. "index": 0
  6658. },
  6659. {
  6660. "node": "Getting the copied Slide2",
  6661. "type": "main",
  6662. "index": 0
  6663. }
  6664. ]
  6665. ]
  6666. },
  6667. "Merge22": {
  6668. "main": [
  6669. [
  6670. {
  6671. "node": "FolderId7",
  6672. "type": "main",
  6673. "index": 0
  6674. }
  6675. ]
  6676. ]
  6677. },
  6678. "Merge23": {
  6679. "main": [
  6680. [
  6681. {
  6682. "node": "FolderId8",
  6683. "type": "main",
  6684. "index": 0
  6685. }
  6686. ]
  6687. ]
  6688. },
  6689. "FolderId8": {
  6690. "main": [
  6691. [
  6692. {
  6693. "node": "Google Drive9",
  6694. "type": "main",
  6695. "index": 0
  6696. }
  6697. ]
  6698. ]
  6699. },
  6700. "Google Drive9": {
  6701. "main": [
  6702. [
  6703. {
  6704. "node": "Merge19",
  6705. "type": "main",
  6706. "index": 0
  6707. }
  6708. ]
  6709. ]
  6710. },
  6711. "Merge24": {
  6712. "main": [
  6713. [
  6714. {
  6715. "node": "FolderId9",
  6716. "type": "main",
  6717. "index": 0
  6718. }
  6719. ]
  6720. ]
  6721. },
  6722. "FolderId9": {
  6723. "main": [
  6724. [
  6725. {
  6726. "node": "Google Drive10",
  6727. "type": "main",
  6728. "index": 0
  6729. }
  6730. ]
  6731. ]
  6732. },
  6733. "Google Drive10": {
  6734. "main": [
  6735. [
  6736. {
  6737. "node": "Merge18",
  6738. "type": "main",
  6739. "index": 0
  6740. }
  6741. ]
  6742. ]
  6743. },
  6744. "Merge25": {
  6745. "main": [
  6746. [
  6747. {
  6748. "node": "FolderId10",
  6749. "type": "main",
  6750. "index": 0
  6751. }
  6752. ]
  6753. ]
  6754. },
  6755. "FolderId10": {
  6756. "main": [
  6757. [
  6758. {
  6759. "node": "Google Drive11",
  6760. "type": "main",
  6761. "index": 0
  6762. },
  6763. {
  6764. "node": "Merge26",
  6765. "type": "main",
  6766. "index": 1
  6767. }
  6768. ]
  6769. ]
  6770. },
  6771. "Google Drive11": {
  6772. "main": [
  6773. [
  6774. {
  6775. "node": "Merge18",
  6776. "type": "main",
  6777. "index": 1
  6778. }
  6779. ]
  6780. ]
  6781. },
  6782. "Merge26": {
  6783. "main": [
  6784. [
  6785. {
  6786. "node": "InsertImages5",
  6787. "type": "main",
  6788. "index": 0
  6789. }
  6790. ]
  6791. ]
  6792. },
  6793. "FolderName3": {
  6794. "main": [
  6795. [
  6796. {
  6797. "node": "SearchFolder1",
  6798. "type": "main",
  6799. "index": 0
  6800. }
  6801. ]
  6802. ]
  6803. },
  6804. "SearchFolder1": {
  6805. "main": [
  6806. [
  6807. {
  6808. "node": "CreateSubFolder",
  6809. "type": "main",
  6810. "index": 0
  6811. }
  6812. ]
  6813. ]
  6814. },
  6815. "GenerateSlides_Create1": {
  6816. "main": [
  6817. [
  6818. {
  6819. "node": "Send image 1 to Google Drive2",
  6820. "type": "main",
  6821. "index": 0
  6822. },
  6823. {
  6824. "node": "Send image 2 to Google Drive2",
  6825. "type": "main",
  6826. "index": 0
  6827. },
  6828. {
  6829. "node": "Get Templace Source2",
  6830. "type": "main",
  6831. "index": 0
  6832. },
  6833. {
  6834. "node": "Merge20",
  6835. "type": "main",
  6836. "index": 0
  6837. },
  6838. {
  6839. "node": "FolderName1",
  6840. "type": "main",
  6841. "index": 0
  6842. },
  6843. {
  6844. "node": "Send logo to Google Drive2",
  6845. "type": "main",
  6846. "index": 0
  6847. }
  6848. ]
  6849. ]
  6850. },
  6851. "GenerateSlides_Search1": {
  6852. "main": [
  6853. [
  6854. {
  6855. "node": "Get Templace Source2",
  6856. "type": "main",
  6857. "index": 0
  6858. },
  6859. {
  6860. "node": "Send logo to Google Drive2",
  6861. "type": "main",
  6862. "index": 0
  6863. },
  6864. {
  6865. "node": "Send image 1 to Google Drive2",
  6866. "type": "main",
  6867. "index": 0
  6868. },
  6869. {
  6870. "node": "Send image 2 to Google Drive2",
  6871. "type": "main",
  6872. "index": 0
  6873. },
  6874. {
  6875. "node": "Merge20",
  6876. "type": "main",
  6877. "index": 0
  6878. },
  6879. {
  6880. "node": "FolderName3",
  6881. "type": "main",
  6882. "index": 0
  6883. }
  6884. ]
  6885. ]
  6886. },
  6887. "CreateSubFolder": {
  6888. "main": [
  6889. [
  6890. {
  6891. "node": "Merge22",
  6892. "type": "main",
  6893. "index": 0
  6894. },
  6895. {
  6896. "node": "Merge23",
  6897. "type": "main",
  6898. "index": 0
  6899. },
  6900. {
  6901. "node": "Merge24",
  6902. "type": "main",
  6903. "index": 0
  6904. },
  6905. {
  6906. "node": "Merge25",
  6907. "type": "main",
  6908. "index": 0
  6909. }
  6910. ]
  6911. ]
  6912. },
  6913. "GenerateSlides_Search": {
  6914. "main": [
  6915. [
  6916. {
  6917. "node": "FolderName2",
  6918. "type": "main",
  6919. "index": 0
  6920. },
  6921. {
  6922. "node": "Send image 2 to Google Drive1",
  6923. "type": "main",
  6924. "index": 0
  6925. },
  6926. {
  6927. "node": "Send image 1 to Google Drive1",
  6928. "type": "main",
  6929. "index": 0
  6930. },
  6931. {
  6932. "node": "Send logo to Google Drive1",
  6933. "type": "main",
  6934. "index": 0
  6935. },
  6936. {
  6937. "node": "Merge8",
  6938. "type": "main",
  6939. "index": 0
  6940. },
  6941. {
  6942. "node": "Get Templace Source",
  6943. "type": "main",
  6944. "index": 0
  6945. }
  6946. ]
  6947. ]
  6948. },
  6949. "GenerateSlides_Create": {
  6950. "main": [
  6951. [
  6952. {
  6953. "node": "FolderName",
  6954. "type": "main",
  6955. "index": 0
  6956. },
  6957. {
  6958. "node": "Send image 2 to Google Drive1",
  6959. "type": "main",
  6960. "index": 0
  6961. },
  6962. {
  6963. "node": "Send image 1 to Google Drive1",
  6964. "type": "main",
  6965. "index": 0
  6966. },
  6967. {
  6968. "node": "Send logo to Google Drive1",
  6969. "type": "main",
  6970. "index": 0
  6971. },
  6972. {
  6973. "node": "Merge8",
  6974. "type": "main",
  6975. "index": 0
  6976. },
  6977. {
  6978. "node": "Get Templace Source",
  6979. "type": "main",
  6980. "index": 0
  6981. }
  6982. ]
  6983. ]
  6984. },
  6985. "SearchFolder": {
  6986. "main": [
  6987. [
  6988. {
  6989. "node": "Merge13",
  6990. "type": "main",
  6991. "index": 0
  6992. },
  6993. {
  6994. "node": "Merge12",
  6995. "type": "main",
  6996. "index": 0
  6997. },
  6998. {
  6999. "node": "Merge10",
  7000. "type": "main",
  7001. "index": 0
  7002. },
  7003. {
  7004. "node": "Merge11",
  7005. "type": "main",
  7006. "index": 0
  7007. }
  7008. ]
  7009. ]
  7010. },
  7011. "FolderName2": {
  7012. "main": [
  7013. [
  7014. {
  7015. "node": "SearchFolder",
  7016. "type": "main",
  7017. "index": 0
  7018. }
  7019. ]
  7020. ]
  7021. },
  7022. "Merge14": {
  7023. "main": [
  7024. [
  7025. {
  7026. "node": "InsertImages3",
  7027. "type": "main",
  7028. "index": 0
  7029. }
  7030. ]
  7031. ]
  7032. },
  7033. "Google Drive4": {
  7034. "main": [
  7035. [
  7036. {
  7037. "node": "Merge6",
  7038. "type": "main",
  7039. "index": 1
  7040. }
  7041. ]
  7042. ]
  7043. },
  7044. "FolderId3": {
  7045. "main": [
  7046. [
  7047. {
  7048. "node": "Merge14",
  7049. "type": "main",
  7050. "index": 1
  7051. },
  7052. {
  7053. "node": "Google Drive4",
  7054. "type": "main",
  7055. "index": 0
  7056. }
  7057. ]
  7058. ]
  7059. },
  7060. "Merge13": {
  7061. "main": [
  7062. [
  7063. {
  7064. "node": "FolderId3",
  7065. "type": "main",
  7066. "index": 0
  7067. }
  7068. ]
  7069. ]
  7070. },
  7071. "Google Drive3": {
  7072. "main": [
  7073. [
  7074. {
  7075. "node": "Merge6",
  7076. "type": "main",
  7077. "index": 0
  7078. }
  7079. ]
  7080. ]
  7081. },
  7082. "FolderId2": {
  7083. "main": [
  7084. [
  7085. {
  7086. "node": "Google Drive3",
  7087. "type": "main",
  7088. "index": 0
  7089. }
  7090. ]
  7091. ]
  7092. },
  7093. "Merge12": {
  7094. "main": [
  7095. [
  7096. {
  7097. "node": "FolderId2",
  7098. "type": "main",
  7099. "index": 0
  7100. }
  7101. ]
  7102. ]
  7103. },
  7104. "Google Drive": {
  7105. "main": [
  7106. [
  7107. {
  7108. "node": "Merge7",
  7109. "type": "main",
  7110. "index": 0
  7111. }
  7112. ]
  7113. ]
  7114. },
  7115. "FolderId1": {
  7116. "main": [
  7117. [
  7118. {
  7119. "node": "Google Drive",
  7120. "type": "main",
  7121. "index": 0
  7122. }
  7123. ]
  7124. ]
  7125. },
  7126. "Merge10": {
  7127. "main": [
  7128. [
  7129. {
  7130. "node": "FolderId1",
  7131. "type": "main",
  7132. "index": 0
  7133. }
  7134. ]
  7135. ]
  7136. },
  7137. "Merge11": {
  7138. "main": [
  7139. [
  7140. {
  7141. "node": "FolderId",
  7142. "type": "main",
  7143. "index": 0
  7144. }
  7145. ]
  7146. ]
  7147. },
  7148. "Google Drive1": {
  7149. "main": [
  7150. [
  7151. {
  7152. "node": "Google Slides1",
  7153. "type": "main",
  7154. "index": 0
  7155. },
  7156. {
  7157. "node": "Getting the copied Slide",
  7158. "type": "main",
  7159. "index": 0
  7160. }
  7161. ]
  7162. ]
  7163. },
  7164. "FolderId": {
  7165. "main": [
  7166. [
  7167. {
  7168. "node": "Google Drive1",
  7169. "type": "main",
  7170. "index": 0
  7171. }
  7172. ]
  7173. ]
  7174. },
  7175. "CreateFolder": {
  7176. "main": [
  7177. [
  7178. {
  7179. "node": "Merge13",
  7180. "type": "main",
  7181. "index": 0
  7182. },
  7183. {
  7184. "node": "Merge12",
  7185. "type": "main",
  7186. "index": 0
  7187. },
  7188. {
  7189. "node": "Merge10",
  7190. "type": "main",
  7191. "index": 0
  7192. },
  7193. {
  7194. "node": "Merge11",
  7195. "type": "main",
  7196. "index": 0
  7197. }
  7198. ]
  7199. ]
  7200. },
  7201. "FolderName": {
  7202. "main": [
  7203. [
  7204. {
  7205. "node": "CreateFolder",
  7206. "type": "main",
  7207. "index": 0
  7208. }
  7209. ]
  7210. ]
  7211. },
  7212. "OutputTextCut1": {
  7213. "main": [
  7214. [
  7215. {
  7216. "node": "Send urlGenerative1",
  7217. "type": "main",
  7218. "index": 0
  7219. },
  7220. {
  7221. "node": "Insert cutTitles",
  7222. "type": "main",
  7223. "index": 0
  7224. },
  7225. {
  7226. "node": "Insert companyName",
  7227. "type": "main",
  7228. "index": 0
  7229. },
  7230. {
  7231. "node": "Insert cutText",
  7232. "type": "main",
  7233. "index": 0
  7234. }
  7235. ]
  7236. ]
  7237. },
  7238. "Send image 2 to Google Drive1": {
  7239. "main": [
  7240. [
  7241. {
  7242. "node": "Google Drive Upload image3",
  7243. "type": "main",
  7244. "index": 0
  7245. }
  7246. ]
  7247. ]
  7248. },
  7249. "Send image 1 to Google Drive1": {
  7250. "main": [
  7251. [
  7252. {
  7253. "node": "Google Drive Upload image",
  7254. "type": "main",
  7255. "index": 0
  7256. }
  7257. ]
  7258. ]
  7259. },
  7260. "InsertImages3": {
  7261. "main": [
  7262. [
  7263. {
  7264. "node": "Réponse au Webhook TEXT",
  7265. "type": "main",
  7266. "index": 0
  7267. }
  7268. ]
  7269. ]
  7270. },
  7271. "InsertImages1": {
  7272. "main": [
  7273. [
  7274. {
  7275. "node": "Insert images into placeholders",
  7276. "type": "main",
  7277. "index": 0
  7278. },
  7279. {
  7280. "node": "Insert logo into PH",
  7281. "type": "main",
  7282. "index": 0
  7283. },
  7284. {
  7285. "node": "Insert images 2 into placeholders 1",
  7286. "type": "main",
  7287. "index": 0
  7288. }
  7289. ]
  7290. ]
  7291. },
  7292. "Merge9": {
  7293. "main": [
  7294. [
  7295. {
  7296. "node": "InsertImages1",
  7297. "type": "main",
  7298. "index": 0
  7299. }
  7300. ]
  7301. ]
  7302. },
  7303. "Google Drive Upload logo1": {
  7304. "main": [
  7305. [
  7306. {
  7307. "node": "Merge10",
  7308. "type": "main",
  7309. "index": 1
  7310. }
  7311. ]
  7312. ]
  7313. },
  7314. "Send logo to Google Drive1": {
  7315. "main": [
  7316. [
  7317. {
  7318. "node": "Google Drive Upload logo1",
  7319. "type": "main",
  7320. "index": 0
  7321. }
  7322. ]
  7323. ]
  7324. },
  7325. "Insert logo into PH": {
  7326. "main": [
  7327. [
  7328. {
  7329. "node": "Merge14",
  7330. "type": "main",
  7331. "index": 0
  7332. }
  7333. ]
  7334. ]
  7335. },
  7336. "Insert cutText": {
  7337. "main": [
  7338. [
  7339. {
  7340. "node": "remove \\n",
  7341. "type": "main",
  7342. "index": 0
  7343. }
  7344. ]
  7345. ]
  7346. },
  7347. "Code for color modification": {
  7348. "main": [
  7349. [
  7350. {
  7351. "node": "Send new color to slides",
  7352. "type": "main",
  7353. "index": 0
  7354. }
  7355. ]
  7356. ]
  7357. },
  7358. "Merge8": {
  7359. "main": [
  7360. [
  7361. {
  7362. "node": "OutputTextCut1",
  7363. "type": "main",
  7364. "index": 0
  7365. },
  7366. {
  7367. "node": "Merge9",
  7368. "type": "main",
  7369. "index": 0
  7370. },
  7371. {
  7372. "node": "Code for color modification",
  7373. "type": "main",
  7374. "index": 0
  7375. }
  7376. ]
  7377. ]
  7378. },
  7379. "Getting the copied Slide": {
  7380. "main": [
  7381. [
  7382. {
  7383. "node": "Merge8",
  7384. "type": "main",
  7385. "index": 1
  7386. }
  7387. ]
  7388. ]
  7389. },
  7390. "Copy temp src and generate unique name file": {
  7391. "main": [
  7392. [
  7393. {
  7394. "node": "Merge11",
  7395. "type": "main",
  7396. "index": 1
  7397. }
  7398. ]
  7399. ]
  7400. },
  7401. "Get Templace Source": {
  7402. "main": [
  7403. [
  7404. {
  7405. "node": "Copy temp src and generate unique name file",
  7406. "type": "main",
  7407. "index": 0
  7408. }
  7409. ]
  7410. ]
  7411. },
  7412. "Merge7": {
  7413. "main": [
  7414. [
  7415. {
  7416. "node": "Merge9",
  7417. "type": "main",
  7418. "index": 1
  7419. },
  7420. {
  7421. "node": "Change permission access1",
  7422. "type": "main",
  7423. "index": 0
  7424. }
  7425. ]
  7426. ]
  7427. },
  7428. "Merge6": {
  7429. "main": [
  7430. [
  7431. {
  7432. "node": "Merge7",
  7433. "type": "main",
  7434. "index": 1
  7435. }
  7436. ]
  7437. ]
  7438. },
  7439. "Google Drive Upload image3": {
  7440. "main": [
  7441. [
  7442. {
  7443. "node": "Merge13",
  7444. "type": "main",
  7445. "index": 1
  7446. }
  7447. ]
  7448. ]
  7449. },
  7450. "Google Drive Upload image": {
  7451. "main": [
  7452. [
  7453. {
  7454. "node": "Merge12",
  7455. "type": "main",
  7456. "index": 1
  7457. }
  7458. ]
  7459. ]
  7460. },
  7461. "Webhook: Send g-mail1": {
  7462. "main": [
  7463. [
  7464. {
  7465. "node": "Google Drive2",
  7466. "type": "main",
  7467. "index": 0
  7468. }
  7469. ]
  7470. ]
  7471. },
  7472. "If1": {
  7473. "main": [
  7474. [
  7475. {
  7476. "node": "Gmail3",
  7477. "type": "main",
  7478. "index": 0
  7479. }
  7480. ],
  7481. [
  7482. {
  7483. "node": "Wait",
  7484. "type": "main",
  7485. "index": 0
  7486. }
  7487. ]
  7488. ]
  7489. },
  7490. "Wait": {
  7491. "main": [
  7492. [
  7493. {
  7494. "node": "Gmail3",
  7495. "type": "main",
  7496. "index": 0
  7497. }
  7498. ]
  7499. ]
  7500. },
  7501. "Google Drive2": {
  7502. "main": [
  7503. [
  7504. {
  7505. "node": "If1",
  7506. "type": "main",
  7507. "index": 0
  7508. }
  7509. ]
  7510. ]
  7511. },
  7512. "SearchFolder to get folderID": {
  7513. "main": [
  7514. [
  7515. {
  7516. "node": "Search for existing folder",
  7517. "type": "main",
  7518. "index": 0
  7519. }
  7520. ]
  7521. ]
  7522. },
  7523. "Search for existing folder": {
  7524. "main": [
  7525. [
  7526. {
  7527. "node": "Réponse au Webhook SearchFolder",
  7528. "type": "main",
  7529. "index": 0
  7530. }
  7531. ]
  7532. ]
  7533. },
  7534. "Merge27": {
  7535. "main": [
  7536. [
  7537. {
  7538. "node": "InsertImages6",
  7539. "type": "main",
  7540. "index": 0
  7541. }
  7542. ]
  7543. ]
  7544. },
  7545. "Google Drive12": {
  7546. "main": [
  7547. [
  7548. {
  7549. "node": "Merge35",
  7550. "type": "main",
  7551. "index": 1
  7552. }
  7553. ]
  7554. ]
  7555. },
  7556. "FolderId11": {
  7557. "main": [
  7558. [
  7559. {
  7560. "node": "Merge27",
  7561. "type": "main",
  7562. "index": 1
  7563. },
  7564. {
  7565. "node": "Google Drive12",
  7566. "type": "main",
  7567. "index": 0
  7568. }
  7569. ]
  7570. ]
  7571. },
  7572. "Merge28": {
  7573. "main": [
  7574. [
  7575. {
  7576. "node": "FolderId11",
  7577. "type": "main",
  7578. "index": 0
  7579. }
  7580. ]
  7581. ]
  7582. },
  7583. "Google Drive13": {
  7584. "main": [
  7585. [
  7586. {
  7587. "node": "Merge35",
  7588. "type": "main",
  7589. "index": 0
  7590. }
  7591. ]
  7592. ]
  7593. },
  7594. "FolderId12": {
  7595. "main": [
  7596. [
  7597. {
  7598. "node": "Google Drive13",
  7599. "type": "main",
  7600. "index": 0
  7601. }
  7602. ]
  7603. ]
  7604. },
  7605. "Merge29": {
  7606. "main": [
  7607. [
  7608. {
  7609. "node": "FolderId12",
  7610. "type": "main",
  7611. "index": 0
  7612. }
  7613. ]
  7614. ]
  7615. },
  7616. "Google Drive14": {
  7617. "main": [
  7618. [
  7619. {
  7620. "node": "Merge34",
  7621. "type": "main",
  7622. "index": 0
  7623. }
  7624. ]
  7625. ]
  7626. },
  7627. "FolderId13": {
  7628. "main": [
  7629. [
  7630. {
  7631. "node": "Google Drive14",
  7632. "type": "main",
  7633. "index": 0
  7634. }
  7635. ]
  7636. ]
  7637. },
  7638. "Merge30": {
  7639. "main": [
  7640. [
  7641. {
  7642. "node": "FolderId13",
  7643. "type": "main",
  7644. "index": 0
  7645. }
  7646. ]
  7647. ]
  7648. },
  7649. "Merge31": {
  7650. "main": [
  7651. [
  7652. {
  7653. "node": "FolderId14",
  7654. "type": "main",
  7655. "index": 0
  7656. }
  7657. ]
  7658. ]
  7659. },
  7660. "Google Drive15": {
  7661. "main": [
  7662. [
  7663. {
  7664. "node": "Google Slides3",
  7665. "type": "main",
  7666. "index": 0
  7667. },
  7668. {
  7669. "node": "Getting the copied Slide3",
  7670. "type": "main",
  7671. "index": 0
  7672. }
  7673. ]
  7674. ]
  7675. },
  7676. "FolderId14": {
  7677. "main": [
  7678. [
  7679. {
  7680. "node": "Google Drive15",
  7681. "type": "main",
  7682. "index": 0
  7683. }
  7684. ]
  7685. ]
  7686. },
  7687. "CreateFolder2": {
  7688. "main": [
  7689. [
  7690. {
  7691. "node": "Merge28",
  7692. "type": "main",
  7693. "index": 0
  7694. },
  7695. {
  7696. "node": "Merge29",
  7697. "type": "main",
  7698. "index": 0
  7699. },
  7700. {
  7701. "node": "Merge30",
  7702. "type": "main",
  7703. "index": 0
  7704. },
  7705. {
  7706. "node": "Merge31",
  7707. "type": "main",
  7708. "index": 0
  7709. }
  7710. ]
  7711. ]
  7712. },
  7713. "FolderName5": {
  7714. "main": [
  7715. [
  7716. {
  7717. "node": "CreateFolder2",
  7718. "type": "main",
  7719. "index": 0
  7720. }
  7721. ]
  7722. ]
  7723. },
  7724. "OutputTextCut3": {
  7725. "main": [
  7726. [
  7727. {
  7728. "node": "Send urlGenerative3",
  7729. "type": "main",
  7730. "index": 0
  7731. },
  7732. {
  7733. "node": "Insert cutTitles3",
  7734. "type": "main",
  7735. "index": 0
  7736. },
  7737. {
  7738. "node": "Insert companyName3",
  7739. "type": "main",
  7740. "index": 0
  7741. },
  7742. {
  7743. "node": "Insert cutText3",
  7744. "type": "main",
  7745. "index": 0
  7746. }
  7747. ]
  7748. ]
  7749. },
  7750. "InsertImages6": {
  7751. "main": [
  7752. [
  7753. {
  7754. "node": "Réponse au Webhook TEXT3",
  7755. "type": "main",
  7756. "index": 0
  7757. }
  7758. ]
  7759. ]
  7760. },
  7761. "InsertImages7": {
  7762. "main": [
  7763. [
  7764. {
  7765. "node": "Insert images into placeholders3",
  7766. "type": "main",
  7767. "index": 0
  7768. },
  7769. {
  7770. "node": "Insert logo into PH3",
  7771. "type": "main",
  7772. "index": 0
  7773. },
  7774. {
  7775. "node": "Insert images 2 into placeholders 3",
  7776. "type": "main",
  7777. "index": 0
  7778. }
  7779. ]
  7780. ]
  7781. },
  7782. "Merge32": {
  7783. "main": [
  7784. [
  7785. {
  7786. "node": "InsertImages7",
  7787. "type": "main",
  7788. "index": 0
  7789. }
  7790. ]
  7791. ]
  7792. },
  7793. "Google Drive Upload logo3": {
  7794. "main": [
  7795. [
  7796. {
  7797. "node": "Merge30",
  7798. "type": "main",
  7799. "index": 1
  7800. }
  7801. ]
  7802. ]
  7803. },
  7804. "Insert logo into PH3": {
  7805. "main": [
  7806. [
  7807. {
  7808. "node": "Merge27",
  7809. "type": "main",
  7810. "index": 0
  7811. }
  7812. ]
  7813. ]
  7814. },
  7815. "Insert cutText3": {
  7816. "main": [
  7817. [
  7818. {
  7819. "node": "remove \\n3",
  7820. "type": "main",
  7821. "index": 0
  7822. }
  7823. ]
  7824. ]
  7825. },
  7826. "Code for color modification3": {
  7827. "main": [
  7828. [
  7829. {
  7830. "node": "Send new color to slides3",
  7831. "type": "main",
  7832. "index": 0
  7833. }
  7834. ]
  7835. ]
  7836. },
  7837. "Merge33": {
  7838. "main": [
  7839. [
  7840. {
  7841. "node": "OutputTextCut3",
  7842. "type": "main",
  7843. "index": 0
  7844. },
  7845. {
  7846. "node": "Merge32",
  7847. "type": "main",
  7848. "index": 0
  7849. },
  7850. {
  7851. "node": "Code for color modification3",
  7852. "type": "main",
  7853. "index": 0
  7854. }
  7855. ]
  7856. ]
  7857. },
  7858. "Getting the copied Slide3": {
  7859. "main": [
  7860. [
  7861. {
  7862. "node": "Merge33",
  7863. "type": "main",
  7864. "index": 1
  7865. }
  7866. ]
  7867. ]
  7868. },
  7869. "Copy temp src and generate unique name file3": {
  7870. "main": [
  7871. [
  7872. {
  7873. "node": "Merge31",
  7874. "type": "main",
  7875. "index": 1
  7876. }
  7877. ]
  7878. ]
  7879. },
  7880. "Get Templace Source3": {
  7881. "main": [
  7882. [
  7883. {
  7884. "node": "Copy temp src and generate unique name file3",
  7885. "type": "main",
  7886. "index": 0
  7887. }
  7888. ]
  7889. ]
  7890. },
  7891. "Merge34": {
  7892. "main": [
  7893. [
  7894. {
  7895. "node": "Merge32",
  7896. "type": "main",
  7897. "index": 1
  7898. },
  7899. {
  7900. "node": "Change permission access3",
  7901. "type": "main",
  7902. "index": 0
  7903. }
  7904. ]
  7905. ]
  7906. },
  7907. "Merge35": {
  7908. "main": [
  7909. [
  7910. {
  7911. "node": "Merge34",
  7912. "type": "main",
  7913. "index": 1
  7914. }
  7915. ]
  7916. ]
  7917. },
  7918. "Google Drive Upload image6": {
  7919. "main": [
  7920. [
  7921. {
  7922. "node": "Merge28",
  7923. "type": "main",
  7924. "index": 1
  7925. }
  7926. ]
  7927. ]
  7928. },
  7929. "Google Drive Upload image7": {
  7930. "main": [
  7931. [
  7932. {
  7933. "node": "Merge29",
  7934. "type": "main",
  7935. "index": 1
  7936. }
  7937. ]
  7938. ]
  7939. },
  7940. "GenerateSlides_Create2": {
  7941. "main": [
  7942. [
  7943. {
  7944. "node": "FolderName5",
  7945. "type": "main",
  7946. "index": 0
  7947. },
  7948. {
  7949. "node": "Send image 2 to Google Drive3",
  7950. "type": "main",
  7951. "index": 0
  7952. },
  7953. {
  7954. "node": "Send image 1 to Google Drive3",
  7955. "type": "main",
  7956. "index": 0
  7957. },
  7958. {
  7959. "node": "Merge33",
  7960. "type": "main",
  7961. "index": 0
  7962. },
  7963. {
  7964. "node": "Get Templace Source3",
  7965. "type": "main",
  7966. "index": 0
  7967. },
  7968. {
  7969. "node": "Send logo to Google Drive3",
  7970. "type": "main",
  7971. "index": 0
  7972. }
  7973. ]
  7974. ]
  7975. },
  7976. "Send logo to Google Drive3": {
  7977. "main": [
  7978. [
  7979. {
  7980. "node": "Google Drive Upload logo3",
  7981. "type": "main",
  7982. "index": 0
  7983. }
  7984. ]
  7985. ]
  7986. },
  7987. "Send image 1 to Google Drive3": {
  7988. "main": [
  7989. [
  7990. {
  7991. "node": "Google Drive Upload image7",
  7992. "type": "main",
  7993. "index": 0
  7994. }
  7995. ]
  7996. ]
  7997. },
  7998. "Send image 2 to Google Drive3": {
  7999. "main": [
  8000. [
  8001. {
  8002. "node": "Google Drive Upload image6",
  8003. "type": "main",
  8004. "index": 0
  8005. }
  8006. ]
  8007. ]
  8008. }
  8009. },
  8010. "active": true,
  8011. "settings": {
  8012. "executionOrder": "v1",
  8013. "saveManualExecutions": true,
  8014. "callerPolicy": "workflowsFromSameOwner"
  8015. },
  8016. "versionId": "27c4a7f8-172f-4e5d-a179-104af3042690",
  8017. "meta": {
  8018. "templateCredsSetupCompleted": true,
  8019. "instanceId": "36abe9b3ac99fd4c745db3c9a045f0513ab3f13db58e2ecb7d39728c27629c76"
  8020. },
  8021. "id": "sRVFLh9N8T3XKFWP",
  8022. "tags": []
  8023. }
Add Comment
Please, Sign In to add comment