使用GPT-4.1、Templated.io和Google
高级
这是一个自动化工作流,包含 21 个节点。主要使用 Code, FormTrigger, GoogleDrive, HttpRequest, GoogleSheets 等节点。 使用GPT-4.1、Templated.io和Google Drive生成教育类社交媒体轮播
前置要求
- •Google Drive API 凭证
- •可能需要目标 API 的认证凭证
- •Google Sheets API 凭证
- •OpenAI API Key
分类
-
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"id": "Mk7Qzi3TM7iLveSn",
"meta": {
"instanceId": "558d88703fb65b2d0e44613bc35916258b0f0bf983c5d4730c00c424b77ca36a",
"templateCredsSetupCompleted": true
},
"name": "Carousel Template",
"tags": [],
"nodes": [
{
"id": "2c977dd4-39c0-446a-847e-66b9a5345fb1",
"name": "Create folder",
"type": "n8n-nodes-base.googleDrive",
"position": [
768,
0
],
"parameters": {
"name": "={{ $json['title-1'] }}",
"driveId": {
"__rl": true,
"mode": "list",
"value": "My Drive"
},
"options": {
"simplifyOutput": false
},
"folderId": {
"__rl": true,
"mode": "list",
"value": "1hYztVnv9GthpxTFGBwc-oQTs_M9DhhE7",
"cachedResultUrl": "https://drive.google.com/drive/folders/1hYztVnv9GthpxTFGBwc-oQTs_M9DhhE7",
"cachedResultName": "RRSS"
},
"resource": "folder"
},
"credentials": {
"googleDriveOAuth2Api": {
"id": "9DKimoKa4GnA6KwM",
"name": "Google Drive account"
}
},
"typeVersion": 3
},
{
"id": "8b2d5d2f-4600-44c1-bc4b-31b5c2f15993",
"name": "Form",
"type": "n8n-nodes-base.formTrigger",
"position": [
0,
0
],
"webhookId": "acb66942-21ea-4241-9277-36a003900ee4",
"parameters": {
"options": {},
"formTitle": "Templated Form",
"formFields": {
"values": [
{
"fieldType": "textarea",
"fieldLabel": "Prompt",
"requiredField": true
}
]
},
"authentication": "basicAuth"
},
"credentials": {
"httpBasicAuth": {
"id": "6ZyvrN4UFmnkKQe0",
"name": "kpirs"
}
},
"typeVersion": 2.3
},
{
"id": "385ca355-299a-40b5-920f-c97f4a8a1df0",
"name": "Generate Content",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
208,
0
],
"parameters": {
"modelId": {
"__rl": true,
"mode": "list",
"value": "gpt-4.1",
"cachedResultName": "GPT-4.1"
},
"options": {},
"messages": {
"values": [
{
"role": "system",
"content": "You are an expert [ROLE], specialized in [TOPIC/AREA/INDUSTRY]. \nYour role is to generate highly reliable, accessible, and engaging content for Instagram carousel posts. \n\n### Objectives:\n- Provide accurate, evidence-based educational information about the industry.\n- Break down complex concepts into simple, digestible explanations.\n- Empower and support the audience with clear takeaways.\n\n### Audience:\n[DESCRIBE YOUR AUDIENCE]\n\n### Style & Tone:\n- Clear, concise, empathetic, and encouraging.\n- Use friendly, inclusive language.\n- Avoid jargon; when using a technical terms, briefly define it in simple words.\n- Prioritize positive framing and practical advice (do’s instead of don’ts).\n\n### Structure for Instagram Carousel:\n- Slide 1: **Hook/Title** → Short, impactful, eye-catching statement or question. Subtitle for this one must be 1 liner.\n- Slide 2–5: **Educational content** → Each slide focuses on ONE key idea. Use bullet points, emojis, or simple metaphors for clarity.\n- Slide 6: **Practical takeaway** → A summary, tip, or call to action (e.g., “Share this with someone who needs it”).\n\n### Content rules:\n- Always factually correct, aligned with reputable organizations.\n- Use short paragraphs (max 3 lines per slide).\n- End each carousel with a motivational or supportive closing message.\n\n### Additional instruction:\n- In the response, include the key \"visual_suggestion\", with one set of keywords that summarizes the carousel. Optimize the response for keyword search, since it's going to be used on Pixabay API.\n- In the response, include the key \"topic\". Each carousel must match one of this topics:\n - [LIST OF 5 TOPICS OR CATEGORIES]\n- In the response, include the key \"description\". This field should contain an optimized description for social media posts, with hashtags included.\n\n### Output format:\nRespond with a JSON object with this format:\n\n```\n{\n \"response\": {\n \"visual_suggestion\": <VISUAL_SUGGESTION>,\n \"topic\": <TOPIC>,\n \"description\": <DESCRIPTION>\n \"title-1\": <TITLE-1>,\n \"subtitle-1\": <SUBTITLE-1>,\n \"title-2\": <TITLE-2>,\n \"subtitle-2\": <SUBTITLE-2>,\n ...\n }\n}\n```\n"
},
{
"content": "={{ $json.Prompt }}"
}
]
}
},
"credentials": {
"openAiApi": {
"id": "7x7rIKtPGbczBVma",
"name": "OpenAi account"
}
},
"typeVersion": 1.8
},
{
"id": "f5f97dfc-0b86-4928-abc1-06773b3ca033",
"name": "Format content",
"type": "n8n-nodes-base.code",
"position": [
560,
0
],
"parameters": {
"jsCode": "const json = JSON.parse($input.first().json.message.content).response;\nreturn json;"
},
"typeVersion": 2
},
{
"id": "3c412606-72f9-46b5-bdfb-a5f2275f4db8",
"name": "Get cover image",
"type": "n8n-nodes-base.httpRequest",
"position": [
976,
0
],
"parameters": {
"url": "https://pixabay.com/api/",
"options": {},
"sendQuery": true,
"queryParameters": {
"parameters": [
{
"name": "key",
"value": "10350858-ddea6aa3e58f17b75a8d6c29d"
},
{
"name": "q",
"value": "={{ $('Format content').item.json.visual_suggestion }}"
},
{
"name": "image_type",
"value": "photo"
},
{
"name": "orientation",
"value": "horizontal"
},
{
"name": "per_page",
"value": "3"
}
]
}
},
"typeVersion": 4.2
},
{
"id": "e82e9d3b-46cf-4211-9116-6157783f3624",
"name": "Get first result",
"type": "n8n-nodes-base.code",
"position": [
1184,
0
],
"parameters": {
"jsCode": "const first = $input.first().json.hits[0];\nreturn first;"
},
"typeVersion": 2
},
{
"id": "eaf33708-4828-4da5-9012-7f8166aac8af",
"name": "Create Renders",
"type": "n8n-nodes-templated.templated",
"position": [
1392,
0
],
"parameters": {
"format": "png",
"layers": {
"layer": [
{
"text": "={{ $('Format content').item.json['title-1'] }}",
"layerName": "=title-1"
},
{
"text": "={{ $('Format content').item.json['subtitle-1'] }}",
"layerName": "=subtitle-1"
},
{
"text": "={{ $('Format content').item.json['title-2'] }}",
"layerName": "title-2"
},
{
"text": "={{ $('Format content').item.json['subtitle-2'] }}",
"layerName": "subtitle-2"
},
{
"text": "={{ $('Format content').item.json['title-3'] }}",
"layerName": "title-3"
},
{
"text": "={{ $('Format content').item.json['subtitle-3'] }}",
"layerName": "subtitle-3"
},
{
"text": "={{ $('Format content').item.json['title-4'] }}",
"layerName": "title-4"
},
{
"text": "={{ $('Format content').item.json['subtitle-4'] }}",
"layerName": "subtitle-4"
},
{
"text": "={{ $('Format content').item.json['title-5'] }}",
"layerName": "title-5"
},
{
"text": "={{ $('Format content').item.json['subtitle-5'] }}",
"layerName": "subtitle-5"
},
{
"text": "={{ $('Format content').item.json['title-6'] }}",
"layerName": "title-6"
},
{
"text": "={{ $('Format content').item.json['subtitle-6'] }}",
"layerName": "subtitle-6"
},
{
"text": "={{ $('Format content').item.json['topic'] }}",
"layerName": "topic"
},
{
"text": "=",
"image_url": "={{ $json.largeImageURL }}",
"layerName": "img-1"
}
]
},
"template": {
"__rl": true,
"mode": "list",
"value": "58756536-fd45-4e15-82aa-9189f0e042e9",
"cachedResultName": "Carousel"
},
"requestOptions": {}
},
"credentials": {
"templatedApi": {
"id": "hofiA8QNWplbhk2f",
"name": "Templated account"
}
},
"typeVersion": 1
},
{
"id": "bd135694-6bc2-4680-ad14-6549f6ff5479",
"name": "Download renders",
"type": "n8n-nodes-base.httpRequest",
"position": [
1600,
0
],
"parameters": {
"url": "={{ $json.url }}",
"options": {}
},
"typeVersion": 4.2
},
{
"id": "ccadfa31-4092-40d6-b78b-87fc21430f59",
"name": "Upload renders to Google Drive",
"type": "n8n-nodes-base.googleDrive",
"position": [
1808,
0
],
"parameters": {
"name": "={{ $json.page }}.png",
"driveId": {
"__rl": true,
"mode": "list",
"value": "My Drive"
},
"options": {},
"folderId": {
"__rl": true,
"mode": "id",
"value": "={{ $('Create folder').item.json.id }}"
},
"inputDataFieldName": "=data"
},
"credentials": {
"googleDriveOAuth2Api": {
"id": "9DKimoKa4GnA6KwM",
"name": "Google Drive account"
}
},
"typeVersion": 3
},
{
"id": "436d9625-1780-4305-8c1d-9ff4192c52aa",
"name": "Save in DB",
"type": "n8n-nodes-base.googleSheets",
"position": [
2016,
0
],
"parameters": {
"columns": {
"value": {
"Title": "={{ $('Create folder').item.json.name }}",
"Topic": "={{ $('Format content').item.json.topic }}",
"Status": "Created",
"Created At": "={{ new Date($json.createdTime).toLocaleString() }}",
"Folder URL": "={{ $('Create folder').item.json.webViewLink }}",
"Description": "={{ $('Format content').item.json.description }}"
},
"schema": [
{
"id": "Created At",
"type": "string",
"display": true,
"required": false,
"displayName": "Created At",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Title",
"type": "string",
"display": true,
"required": false,
"displayName": "Title",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Topic",
"type": "string",
"display": true,
"required": false,
"displayName": "Topic",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Folder URL",
"type": "string",
"display": true,
"required": false,
"displayName": "Folder URL",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Description",
"type": "string",
"display": true,
"required": false,
"displayName": "Description",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Publish On",
"type": "string",
"display": true,
"required": false,
"displayName": "Publish On",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Status",
"type": "string",
"display": true,
"required": false,
"displayName": "Status",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "append",
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/19YOuaADOGwR1WFzo3exxUp0h-dQeSJOhORDgoze7Z68/edit#gid=0",
"cachedResultName": "Hoja 1"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "19YOuaADOGwR1WFzo3exxUp0h-dQeSJOhORDgoze7Z68",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/19YOuaADOGwR1WFzo3exxUp0h-dQeSJOhORDgoze7Z68/edit?usp=drivesdk",
"cachedResultName": "DB"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "b4uvUzVLAHQbJbWg",
"name": "Google Sheets account"
}
},
"executeOnce": true,
"typeVersion": 4.7
},
{
"id": "6c0f9f50-4576-445b-9bd9-9776ec455261",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-560,
-112
],
"parameters": {
"width": 336,
"height": 368,
"content": "## Generate and save Carousels for social media\n\nUsing:\n- Form\n- OpenAI\n- Pixabay\n- Templated.io\n- Google Drive\n- Google Sheets"
},
"typeVersion": 1
},
{
"id": "a3b16e07-7a3f-479e-bb72-06878a6871e4",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-96,
-192
],
"parameters": {
"content": "## Form Node\nThe Form node collects a single “Prompt” (with basic auth) to kick off a new carousel request."
},
"typeVersion": 1
},
{
"id": "ca6a020f-ca7c-4272-b6d6-f032be45b67f",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
208,
192
],
"parameters": {
"height": 176,
"content": "## OpenAI\n(OpenAI GPT-4.1) uses your system prompt + the form’s Prompt to produce JSON with titles/subtitles, topic, description, and visual_suggestion."
},
"typeVersion": 1
},
{
"id": "f3c4ed17-db3e-48f8-bc57-871bae8c272f",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
480,
-224
],
"parameters": {
"height": 176,
"content": "## Format Content\nFormat content parses the OpenAI raw message JSON and returns a clean object under the expected keys (e.g., title-1, subtitle-1, topic, visual_suggestion, description)."
},
"typeVersion": 1
},
{
"id": "7bc4072c-4463-44bb-98ca-cacd84f3f7e6",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
688,
208
],
"parameters": {
"content": "## Create Folder\nCreate folder (Google Drive) creates a subfolder inside RRSS named with title-1 to store this carousel’s assets."
},
"typeVersion": 1
},
{
"id": "59daa80a-62a7-4239-8259-b0a1addbd565",
"name": "Sticky Note5",
"type": "n8n-nodes-base.stickyNote",
"position": [
1120,
208
],
"parameters": {
"content": "## Get first result\nGet first result extracts the first Pixabay hit and exposes its fields (e.g., largeImageURL) for downstream use."
},
"typeVersion": 1
},
{
"id": "08ccabf0-d1cf-49d5-8a1c-997e23bf0180",
"name": "Sticky Note6",
"type": "n8n-nodes-base.stickyNote",
"position": [
912,
-224
],
"parameters": {
"content": "## Get Cover Image\nGet cover image (HTTP Request → Pixabay) searches for a photo using the parsed visual_suggestion as the keyword query."
},
"typeVersion": 1
},
{
"id": "1e111dbc-1673-4fa6-a145-2970c964dbc3",
"name": "Sticky Note7",
"type": "n8n-nodes-base.stickyNote",
"position": [
1312,
-224
],
"parameters": {
"content": "## Create Renders\nCreate Renders (Templated.io) renders the design by injecting all slide titles/subtitles/topic and sets the image layer (img-1) to the Pixabay largeImageURL."
},
"typeVersion": 1
},
{
"id": "639c4818-2334-489b-9a23-cb7c550f9619",
"name": "Sticky Note8",
"type": "n8n-nodes-base.stickyNote",
"position": [
1552,
208
],
"parameters": {
"content": "## Download Renders\nDownload renders (HTTP Request) downloads the rendered image(s) from the URL returned by Templated.io."
},
"typeVersion": 1
},
{
"id": "d0c6d4c8-ff53-49ed-8b19-2bd018931030",
"name": "Sticky Note9",
"type": "n8n-nodes-base.stickyNote",
"position": [
1728,
-240
],
"parameters": {
"height": 192,
"content": "## Upload renders to GD\nUpload renders to Google Drive uploads the downloaded binary file to the newly created Drive folder with the name {{page}}.png."
},
"typeVersion": 1
},
{
"id": "de7f3716-81df-4c97-89f8-ad79204847c1",
"name": "Sticky Note10",
"type": "n8n-nodes-base.stickyNote",
"position": [
1968,
208
],
"parameters": {
"content": "## Save in DB\nSave in DB (Google Sheets) appends a new row logging timestamp, title, topic, Drive folder link, description, and a default Status = Created."
},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"settings": {
"callerPolicy": "workflowsFromSameOwner",
"errorWorkflow": "QvIe2o5DZs8B2a91",
"availableInMCP": false,
"executionOrder": "v1",
"timeSavedPerExecution": 180
},
"versionId": "9fba35ee-3cdb-4392-9e59-b9bf58d3926e",
"connections": {
"8b2d5d2f-4600-44c1-bc4b-31b5c2f15993": {
"main": [
[
{
"node": "385ca355-299a-40b5-920f-c97f4a8a1df0",
"type": "main",
"index": 0
}
]
]
},
"2c977dd4-39c0-446a-847e-66b9a5345fb1": {
"main": [
[
{
"node": "3c412606-72f9-46b5-bdfb-a5f2275f4db8",
"type": "main",
"index": 0
}
]
]
},
"eaf33708-4828-4da5-9012-7f8166aac8af": {
"main": [
[
{
"node": "bd135694-6bc2-4680-ad14-6549f6ff5479",
"type": "main",
"index": 0
}
]
]
},
"f5f97dfc-0b86-4928-abc1-06773b3ca033": {
"main": [
[
{
"node": "2c977dd4-39c0-446a-847e-66b9a5345fb1",
"type": "main",
"index": 0
}
]
]
},
"3c412606-72f9-46b5-bdfb-a5f2275f4db8": {
"main": [
[
{
"node": "e82e9d3b-46cf-4211-9116-6157783f3624",
"type": "main",
"index": 0
}
]
]
},
"bd135694-6bc2-4680-ad14-6549f6ff5479": {
"main": [
[
{
"node": "ccadfa31-4092-40d6-b78b-87fc21430f59",
"type": "main",
"index": 0
}
]
]
},
"385ca355-299a-40b5-920f-c97f4a8a1df0": {
"main": [
[
{
"node": "f5f97dfc-0b86-4928-abc1-06773b3ca033",
"type": "main",
"index": 0
}
]
]
},
"e82e9d3b-46cf-4211-9116-6157783f3624": {
"main": [
[
{
"node": "eaf33708-4828-4da5-9012-7f8166aac8af",
"type": "main",
"index": 0
}
]
]
},
"ccadfa31-4092-40d6-b78b-87fc21430f59": {
"main": [
[
{
"node": "436d9625-1780-4305-8c1d-9ff4192c52aa",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
高级
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
使用 OpenAI、ElevenLabs 和 Fal.ai 自动化病毒式内容创作
使用 OpenAI、ElevenLabs 和 Fal.ai 自动化病毒式内容创作,适用于视频、播客和 ASMR
Set
Code
Wait
+
Set
Code
Wait
97 节点Adam Crafts
内容创作
💥 从视频链接自动化创建YouTube缩略图
使用Templated.io和Blotato自动化创建YouTube缩略图及社交媒体发布
Set
Code
Wait
+
Set
Code
Wait
25 节点Dr. Firas
内容创作
使用 Dumpling AI 从表单自动生成电影级动物视频和声音
使用GPT-4、Dumpling AI和ElevenLabs音频将表单输入转换为电影级视频
Set
Code
Wait
+
Set
Code
Wait
23 节点Yang
内容创作
为电商店铺从2D图像生成3D产品视频
为电商店铺从2D图像生成3D产品视频
If
Code
Wait
+
If
Code
Wait
21 节点InfyOm Technologies
设计
AI驱动视频创作与上传至Instagram、TikTok和YouTube
从云端硬盘进行AI驱动视频创作并上传至Instagram、TikTok和YouTube
If
Set
Code
+
If
Set
Code
53 节点DevCode Journey
内容创作
基于AI的潜在客户生成(Apollo、LinkedIn研究和4步个性化邮件)
基于AI的潜在客户生成:使用Apollo、LinkedIn研究和4步个性化邮件
If
Set
Code
+
If
Set
Code
30 节点Gain FLow AI
潜在客户开发
工作流信息
难度等级
高级
节点数量21
分类-
节点类型8
作者
Bastian Diaz
@bastidiaazSenior Frontend Engineer with 7+ years of experience delivering accessible, high-performance, scalable interfaces. I also maintain a Diabetes Type 1 community in Discord, which is the reason why I'm learning n8n automations to enhance the experience in the server.
外部链接
在 n8n.io 查看 →
分享此工作流