Episode 12
David89eef78f4a37
diff --git a/README.md b/README.mdindex d7a8fa3..cdb2e7a 100644--- a/README.md+++ b/README.md@@ -19,6 +19,7 @@ In this repo, you can find the n8n templates we created for the episodes of [AI- [Episode 9: Create revenge story videos for YouTube](episode_9)- [Episode 10: n8n best practices](episode_10)- [Episode 11: Create short (motivational) stories for YouTube and TikTok](episode_11)+- [Episode 12: Scheduling social media posts with Postiz and n8n](episode_12)## serversdiff --git a/episode_12/README.md b/episode_12/README.mdnew file mode 100644index 0000000..dd8f919--- /dev/null+++ b/episode_12/README.md@@ -0,0 +1,19 @@+# Episode 12: Scheduling social media posts with Postiz and n8n++In this video, we show you how to use Postiz, a free and open-source social media scheduling tool, with n8n. Postiz has a public API and an MCP server available for n8n integrations. With self-hosted installation, it is completely free.++## [📚 Join our Skool community for support, premium content and more!](https://www.skool.com/ai-agents-az/about?gw11)++### Be part of a growing community and help us create more content like this++## Free n8n JSON workflow++- [Scheduling social media posts with Postiz n8n workflow](workflow_postiz.json)++## Additional resources++- [Join n8n](https://n8n.partnerlinks.io/fenoo5ekqs1g)++## Watch the video++[](https://www.youtube.com/watch?v=Q5a9q-PzNz4)diff --git a/episode_12/workflow_postiz.json b/episode_12/workflow_postiz.jsonnew file mode 100644index 0000000..730ce7b--- /dev/null+++ b/episode_12/workflow_postiz.json@@ -0,0 +1,506 @@+{+ "name": "Episode 12: Postiz",+ "nodes": [+ {+ "parameters": {},+ "type": "n8n-nodes-base.manualTrigger",+ "typeVersion": 1,+ "position": [+ -660,+ 0+ ],+ "id": "78dd86e6-c5e6-4d44-bd04-8813c14637de",+ "name": "When clicking ‘Execute workflow’"+ },+ {+ "parameters": {+ "rules": {+ "values": [+ {+ "conditions": {+ "options": {+ "caseSensitive": true,+ "leftValue": "",+ "typeValidation": "strict",+ "version": 2+ },+ "conditions": [+ {+ "leftValue": "={{ $json.identifier }}",+ "rightValue": "tiktok",+ "operator": {+ "type": "string",+ "operation": "equals"+ },+ "id": "3ff74ffe-3f82-437d-9218-bce4f7551211"+ }+ ],+ "combinator": "and"+ },+ "renameOutput": true,+ "outputKey": "tiktok"+ },+ {+ "conditions": {+ "options": {+ "caseSensitive": true,+ "leftValue": "",+ "typeValidation": "strict",+ "version": 2+ },+ "conditions": [+ {+ "id": "2edc7f5f-18cf-45e2-9a10-03c6ee2a062f",+ "leftValue": "={{ $json.identifier }}",+ "rightValue": "youtube",+ "operator": {+ "type": "string",+ "operation": "equals",+ "name": "filter.operator.equals"+ }+ }+ ],+ "combinator": "and"+ },+ "renameOutput": true,+ "outputKey": "youtube"+ },+ {+ "conditions": {+ "options": {+ "caseSensitive": true,+ "leftValue": "",+ "typeValidation": "strict",+ "version": 2+ },+ "conditions": [+ {+ "id": "f461c331-7506-486b-ab4a-de03823f82f9",+ "leftValue": "={{ $json.identifier }}",+ "rightValue": "instagram",+ "operator": {+ "type": "string",+ "operation": "contains"+ }+ }+ ],+ "combinator": "and"+ },+ "renameOutput": true,+ "outputKey": "instagram"+ }+ ]+ },+ "options": {}+ },+ "type": "n8n-nodes-base.switch",+ "typeVersion": 3.2,+ "position": [+ 440,+ 0+ ],+ "id": "7deee34b-70d3-4f33-98e0-e715ff1ce2bf",+ "name": "Switch"+ },+ {+ "parameters": {+ "assignments": {+ "assignments": [+ {+ "id": "0f5772c0-1f84-45e9-b131-8be1c8dd6d85",+ "name": "postiz_api",+ "value": "YOUR_POSTIZ_URL/api/public/v1",+ "type": "string"+ },+ {+ "id": "781d5f1b-1724-4cd4-9e0d-916de65b43e5",+ "name": "share_video_url",+ "value": "https://cdn.pixabay.com/video/2023/08/31/178472-859955927_small.mp4?download",+ "type": "string"+ },+ {+ "id": "f3d9536a-3dc9-4673-b774-0434ca64575f",+ "name": "share_title",+ "value": "Summer is coming",+ "type": "string"+ }+ ]+ },+ "options": {}+ },+ "type": "n8n-nodes-base.set",+ "typeVersion": 3.4,+ "position": [+ -400,+ 0+ ],+ "id": "e610724a-f113-4238-a83b-1c2b0a2a6f9c",+ "name": "Configure me"+ },+ {+ "parameters": {+ "content": "# ❗ Config",+ "height": 380,+ "width": 220,+ "color": 3+ },+ "type": "n8n-nodes-base.stickyNote",+ "typeVersion": 1,+ "position": [+ -460,+ -160+ ],+ "id": "33143617-4eda-4d49-9d1a-684922a9de0b",+ "name": "Sticky Note"+ },+ {+ "parameters": {+ "url": "={{ $json.share_video_url }}",+ "options": {}+ },+ "type": "n8n-nodes-base.httpRequest",+ "typeVersion": 4.2,+ "position": [+ -180,+ 0+ ],+ "id": "212f1b54-8e8b-4b39-b114-dfdc0f430d85",+ "name": "Download video"+ },+ {+ "parameters": {+ "method": "POST",+ "url": "={{ $('Configure me').item.json.postiz_api }}/upload",+ "authentication": "genericCredentialType",+ "genericAuthType": "httpHeaderAuth",+ "sendBody": true,+ "contentType": "multipart-form-data",+ "bodyParameters": {+ "parameters": [+ {+ "parameterType": "formBinaryData",+ "name": "file",+ "inputDataFieldName": "data"+ }+ ]+ },+ "options": {}+ },+ "type": "n8n-nodes-base.httpRequest",+ "typeVersion": 4.2,+ "position": [+ 40,+ 0+ ],+ "id": "f63f1714-0c2f-49ba-947c-eb5401c081f1",+ "name": "Upload video to Postiz",+ "credentials": {+ "httpBearerAuth": {+ "id": "qaxoCSbcbmatcO44",+ "name": "Local postiz"+ },+ "httpCustomAuth": {+ "id": "X84DBVwdxIyjeWnM",+ "name": "Custom Auth account"+ },+ "httpHeaderAuth": {+ "id": "vLZnCmQuaqpFY5LK",+ "name": "Postiz auth"+ }+ }+ },+ {+ "parameters": {+ "url": "={{ $('Configure me').item.json.postiz_api }}/integrations",+ "authentication": "genericCredentialType",+ "genericAuthType": "httpHeaderAuth",+ "options": {}+ },+ "type": "n8n-nodes-base.httpRequest",+ "typeVersion": 4.2,+ "position": [+ 240,+ 0+ ],+ "id": "e8b6b201-0295-4134-827a-212fb2213174",+ "name": "Get Postiz integrations",+ "credentials": {+ "httpBearerAuth": {+ "id": "qaxoCSbcbmatcO44",+ "name": "Local postiz"+ },+ "httpCustomAuth": {+ "id": "X84DBVwdxIyjeWnM",+ "name": "Custom Auth account"+ },+ "httpHeaderAuth": {+ "id": "vLZnCmQuaqpFY5LK",+ "name": "Postiz auth"+ }+ }+ },+ {+ "parameters": {+ "method": "POST",+ "url": "={{ $('Configure me').item.json.postiz_api }}/posts",+ "authentication": "genericCredentialType",+ "genericAuthType": "httpHeaderAuth",+ "sendBody": true,+ "specifyBody": "json",+ "jsonBody": "={\n \"type\": \"schedule\",\n \"date\": \"{{ $now.plus(1, 'days').toISO() }}\",\n \"tags\": [],\n \"shortLink\": false,\n \"posts\": [\n {\n \"integration\": {\n \"id\": \"{{ $('Switch').item.json.id }}\"\n },\n \"value\": [\n {\n \"content\": \"{{ $('Configure me').item.json.share_title }}\",\n \"image\": [\n {\n \"id\": \"{{ $('Upload video to Postiz').item.json.id }}\",\n \"path\": \"{{ $('Upload video to Postiz').item.json.path }}\"\n }\n ]\n }\n ],\n \"settings\": {\n \"title\": \"{{ $('Configure me').item.json.share_title }}\"\n }\n }\n ]\n}",+ "options": {}+ },+ "type": "n8n-nodes-base.httpRequest",+ "typeVersion": 4.2,+ "position": [+ 1080,+ -20+ ],+ "id": "4012aa85-d3c0-4f79-82cf-de9153e875fd",+ "name": "HTTP Request",+ "credentials": {+ "httpHeaderAuth": {+ "id": "vLZnCmQuaqpFY5LK",+ "name": "Postiz auth"+ }+ }+ },+ {+ "parameters": {+ "conditions": {+ "options": {+ "caseSensitive": true,+ "leftValue": "",+ "typeValidation": "strict",+ "version": 2+ },+ "conditions": [+ {+ "id": "6edb3f17-3d22-408b-a935-5e9f59fa6cc5",+ "leftValue": "",+ "rightValue": "",+ "operator": {+ "type": "string",+ "operation": "equals",+ "name": "filter.operator.equals"+ }+ }+ ],+ "combinator": "and"+ },+ "options": {}+ },+ "type": "n8n-nodes-base.if",+ "typeVersion": 2.2,+ "position": [+ 680,+ 0+ ],+ "id": "e89f81f7-9ba2-4e81-94c2-5a620f2ecd85",+ "name": "YouTube check"+ },+ {+ "parameters": {+ "conditions": {+ "options": {+ "caseSensitive": true,+ "leftValue": "",+ "typeValidation": "strict",+ "version": 2+ },+ "conditions": [+ {+ "id": "6edb3f17-3d22-408b-a935-5e9f59fa6cc5",+ "leftValue": "",+ "rightValue": "",+ "operator": {+ "type": "string",+ "operation": "equals",+ "name": "filter.operator.equals"+ }+ }+ ],+ "combinator": "and"+ },+ "options": {}+ },+ "type": "n8n-nodes-base.if",+ "typeVersion": 2.2,+ "position": [+ 680,+ -260+ ],+ "id": "8901e4c4-bc30-40fb-8d49-a8118ff45346",+ "name": "TikTok check"+ },+ {+ "parameters": {+ "conditions": {+ "options": {+ "caseSensitive": true,+ "leftValue": "",+ "typeValidation": "strict",+ "version": 2+ },+ "conditions": [+ {+ "id": "6edb3f17-3d22-408b-a935-5e9f59fa6cc5",+ "leftValue": "",+ "rightValue": "",+ "operator": {+ "type": "string",+ "operation": "equals",+ "name": "filter.operator.equals"+ }+ }+ ],+ "combinator": "and"+ },+ "options": {}+ },+ "type": "n8n-nodes-base.if",+ "typeVersion": 2.2,+ "position": [+ 680,+ 240+ ],+ "id": "60733cb5-bce9-446f-b060-c81a15316bc4",+ "name": "Instagram check"+ },+ {+ "parameters": {+ "content": "## Implement your logic here\n\nShare on the social media integrations you select",+ "height": 800,+ "width": 320+ },+ "type": "n8n-nodes-base.stickyNote",+ "typeVersion": 1,+ "position": [+ 600,+ -400+ ],+ "id": "9a63682d-8c3a-4bbe-bef8-841a71869768",+ "name": "Sticky Note1"+ },+ {+ "parameters": {+ "content": "# Schedule the post",+ "height": 280,+ "width": 360,+ "color": 4+ },+ "type": "n8n-nodes-base.stickyNote",+ "typeVersion": 1,+ "position": [+ 980,+ -140+ ],+ "id": "8c3f1f18-3890-4158-9cc0-ea5f1d387082",+ "name": "Sticky Note2"+ }+ ],+ "pinData": {},+ "connections": {+ "When clicking ‘Execute workflow’": {+ "main": [+ [+ {+ "node": "Configure me",+ "type": "main",+ "index": 0+ }+ ]+ ]+ },+ "Switch": {+ "main": [+ [+ {+ "node": "TikTok check",+ "type": "main",+ "index": 0+ }+ ],+ [+ {+ "node": "YouTube check",+ "type": "main",+ "index": 0+ }+ ],+ [+ {+ "node": "Instagram check",+ "type": "main",+ "index": 0+ }+ ]+ ]+ },+ "Configure me": {+ "main": [+ [+ {+ "node": "Download video",+ "type": "main",+ "index": 0+ }+ ]+ ]+ },+ "Download video": {+ "main": [+ [+ {+ "node": "Upload video to Postiz",+ "type": "main",+ "index": 0+ }+ ]+ ]+ },+ "Upload video to Postiz": {+ "main": [+ [+ {+ "node": "Get Postiz integrations",+ "type": "main",+ "index": 0+ }+ ]+ ]+ },+ "Get Postiz integrations": {+ "main": [+ [+ {+ "node": "Switch",+ "type": "main",+ "index": 0+ }+ ]+ ]+ },+ "YouTube check": {+ "main": [+ [+ {+ "node": "HTTP Request",+ "type": "main",+ "index": 0+ }+ ]+ ]+ }+ },+ "active": false,+ "settings": {+ "executionOrder": "v1"+ },+ "versionId": "2a01f863-ddea-40c9-a732-99170d4ab203",+ "meta": {+ "instanceId": "636db6b6ab21a21c6458e2137f340e33dc3e49f5a1c560c8d1e2372c227cf40e"+ },+ "id": "ABdn0f2r46qrgkkP",+ "tags": []+}\ No newline at end of file