Wallpaper
Dies ist ein Content Creation, Multimodal AI-Bereich Automatisierungsworkflow mit 12 Nodes. Hauptsächlich werden If, Code, Limit, GoogleDrive, GoogleSheets und andere Nodes verwendet. Mit Gemini 2.0, Google Sheets und Drive aus Textprompts KI-Bilder erstellen
- •Google Drive API-Anmeldedaten
- •Google Sheets API-Anmeldedaten
- •Google Gemini API Key
Verwendete Nodes (12)
Kategorie
{
"id": "5suJRi1g4vivDYic",
"meta": {
"instanceId": "aa8f1cf0c4d8087e25a2eea962da249799481d2fb992314793977a97a5e71d77",
"templateCredsSetupCompleted": true
},
"name": "wallpaper",
"tags": [],
"nodes": [
{
"id": "28c657d9-88cf-4d96-9e23-d19fe2b49df0",
"name": "If",
"type": "n8n-nodes-base.if",
"position": [
-496,
64
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "bc74b0c2-aa46-4bcd-91f3-1eb6b0720167",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.status }}",
"rightValue": "pending"
}
]
}
},
"typeVersion": 2.2
},
{
"id": "3d105ba1-85a2-49ea-8311-e15f8133b9be",
"name": "Begrenzen",
"type": "n8n-nodes-base.limit",
"position": [
-256,
48
],
"parameters": {},
"typeVersion": 1
},
{
"id": "fa68f0d5-f010-44d6-86e8-f2854ab1b303",
"name": "KI-Agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
-864,
240
],
"parameters": {
"text": "=You are an expert AI prompt writer specializing in creating vivid, photorealistic image generation prompts. You will be given a simple title and your task is to create a detailed, artistic prompt for an image of nail polish on a woman's hand based on that title.\n\nYour generated prompt should:\n1. Describe a specific nail color, shape, and finish (e.g., glossy, matte, chrome).\n2. Include details about a natural, realistic hand pose and its interaction with an object or environment.\n3. Specify the lighting conditions (e.g., golden hour, studio light, moody).\n4. Set a clear mood or atmosphere.\n5. Conclude with 'Aspect Ratio: 9:16'.\n\n\nImportant formatting requirements for your final output:\n- The entire response must be a single JSON object.\n- The JSON object must have a 'title' key (which should be the original input title you were given) and a 'post' key (which contains your detailed generated prompt).\n- Ensure the text in the JSON values is properly escaped.\n- Do not use double quotes ('') inside the JSON string values; use single quotes (') instead if needed.\n- Do not use asterisks.\n\n\nNow, create a detailed prompt based on the following title:\n{{ $json['Input Title'] }}\n\n\nRespond only with a JSON object in exactly this format:\n{\n \"title\": \"{{ $json.prompt }}\",\n \"post\": \"<your detailed and artistic nail polish prompt here>\"\n}",
"options": {},
"promptType": "define",
"hasOutputParser": true
},
"typeVersion": 1.8
},
{
"id": "3a4edc62-a971-4126-b8fe-c3b805a64d97",
"name": "Code",
"type": "n8n-nodes-base.code",
"position": [
-528,
240
],
"parameters": {
"jsCode": "const items = $input.all();\nconst updatedItems = items.map((item) => {\n if (\n item.json &&\n item.json.output &&\n typeof item.json.output.post === \"string\"\n ) {\n item.json.output.post = item.json.output.post.replace(/\\n/g, \"\\\\n\");\n }\n return item;\n});\nreturn updatedItems;"
},
"typeVersion": 2
},
{
"id": "ca640967-06a4-4c32-ba92-eeaddbea2d67",
"name": "Structured Output Parser",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
-736,
416
],
"parameters": {
"schemaType": "manual",
"inputSchema": "{\n \"type\": \"object\",\n \"properties\": {\n \"title\": { \"type\": \"string\" },\n \"post\": { \"type\": \"string\" }\n },\n \"required\": [\"title\",\"post\"],\n \"additionalProperties\": false\n}\n"
},
"typeVersion": 1.3
},
{
"id": "45ed5193-a16d-41f4-a9ed-82a5abc23d59",
"name": "Google Gemini-Chat-Modell",
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
"position": [
-880,
416
],
"parameters": {
"options": {}
},
"credentials": {
"googlePalmApi": {
"id": "gfe4ixwgGvXB6ixs",
"name": "Google Gemini(PaLM) Api account"
}
},
"typeVersion": 1
},
{
"id": "40c4b1e5-751e-4925-a1d2-2d2a7b419b4c",
"name": "Bild generieren mit Gemini",
"type": "@n8n/n8n-nodes-langchain.googleGemini",
"position": [
-336,
240
],
"parameters": {
"prompt": "=Create a high-quality, visually engaging image for a social media post based on the following text:\n\n\"{{ $json.output.post }}\"\n",
"modelId": {
"__rl": true,
"mode": "list",
"value": "models/gemini-2.0-flash-exp-image-generation",
"cachedResultName": "models/gemini-2.0-flash-exp-image-generation"
},
"options": {},
"resource": "image"
},
"credentials": {
"googlePalmApi": {
"id": "gfe4ixwgGvXB6ixs",
"name": "Google Gemini(PaLM) Api account"
}
},
"typeVersion": 1
},
{
"id": "85c18e43-16fb-4025-94ad-6dd103876944",
"name": "Datei hochladen",
"type": "n8n-nodes-base.googleDrive",
"position": [
-560,
480
],
"parameters": {
"name": "=w_{{ $('Get row(s) in sheet').item.json.ID }}.{{$binary.data.fileExtension || 'png'}}\n",
"driveId": {
"__rl": true,
"mode": "list",
"value": "My Drive",
"cachedResultUrl": "https://drive.google.com/drive/my-drive",
"cachedResultName": "My Drive"
},
"options": {},
"folderId": {
"__rl": true,
"mode": "list",
"value": "16w6uMS_eMimiMCP1L2tQniPxhGwSeTcO",
"cachedResultUrl": "https://drive.google.com/drive/folders/16w6uMS_eMimiMCP1L2tQniPxhGwSeTcO",
"cachedResultName": "wallpaper images"
}
},
"credentials": {
"googleDriveOAuth2Api": {
"id": "1Bnhm02w1dxE4FO6",
"name": "Farooq Google Drive account"
}
},
"typeVersion": 3
},
{
"id": "d5302b59-ccb0-41bf-9fde-bfe82ff2d487",
"name": "Datei teilen",
"type": "n8n-nodes-base.googleDrive",
"position": [
-416,
480
],
"parameters": {
"fileId": {
"__rl": true,
"mode": "id",
"value": "={{ $json.id }}"
},
"options": {},
"operation": "share",
"permissionsUi": {
"permissionsValues": {
"role": "reader",
"type": "anyone"
}
}
},
"credentials": {
"googleDriveOAuth2Api": {
"id": "1Bnhm02w1dxE4FO6",
"name": "Farooq Google Drive account"
}
},
"typeVersion": 3
},
{
"id": "6fdedb20-c1b0-45d0-ac05-5c80ec58f3ad",
"name": "imageUrl aktualisieren",
"type": "n8n-nodes-base.googleSheets",
"position": [
-272,
480
],
"parameters": {
"columns": {
"value": {
"ID": "={{ $('If').item.json.ID }}",
"status": "posted",
"imageUrl": "={{$node[\"Upload file\"].json.webViewLink}}"
},
"schema": [
{
"id": "ID",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "ID",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "prompt",
"type": "string",
"display": true,
"removed": true,
"required": false,
"displayName": "prompt",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "status",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "status",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "imageUrl",
"type": "string",
"display": true,
"required": false,
"displayName": "imageUrl",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "row_number",
"type": "number",
"display": true,
"removed": true,
"readOnly": true,
"required": false,
"displayName": "row_number",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"ID"
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "update",
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1UK0t4Fi55oSpdR3DzeGT_YHI1PFFghFj9R4kBfJNh9g/edit#gid=0",
"cachedResultName": "Sheet1"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1UK0t4Fi55oSpdR3DzeGT_YHI1PFFghFj9R4kBfJNh9g",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1UK0t4Fi55oSpdR3DzeGT_YHI1PFFghFj9R4kBfJNh9g/edit?usp=drivesdk",
"cachedResultName": "n8n wallpaper"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "bAnK8T185A3Wr7Kj",
"name": "Google Sheets account"
}
},
"typeVersion": 4.7
},
{
"id": "5fdd565d-6d08-4b20-9834-dd0f53f11839",
"name": "Zeitplan-Trigger",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
-896,
64
],
"parameters": {
"rule": {
"interval": [
{
"field": "minutes",
"minutesInterval": 1
}
]
}
},
"typeVersion": 1.2
},
{
"id": "fd709bf4-02ce-4423-9222-81d0eaff3dba",
"name": "Zeile(n) in Sheet abrufen",
"type": "n8n-nodes-base.googleSheets",
"position": [
-704,
64
],
"parameters": {
"options": {},
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1UK0t4Fi55oSpdR3DzeGT_YHI1PFFghFj9R4kBfJNh9g/edit#gid=0",
"cachedResultName": "Sheet1"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1UK0t4Fi55oSpdR3DzeGT_YHI1PFFghFj9R4kBfJNh9g",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1UK0t4Fi55oSpdR3DzeGT_YHI1PFFghFj9R4kBfJNh9g/edit?usp=drivesdk",
"cachedResultName": "n8n wallpaper"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "bAnK8T185A3Wr7Kj",
"name": "Google Sheets account"
}
},
"typeVersion": 4.7
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "e5d68149-7913-426e-83c4-23b7c32a2d22",
"connections": {
"28c657d9-88cf-4d96-9e23-d19fe2b49df0": {
"main": [
[
{
"node": "Limit",
"type": "main",
"index": 0
}
]
]
},
"3a4edc62-a971-4126-b8fe-c3b805a64d97": {
"main": [
[
{
"node": "40c4b1e5-751e-4925-a1d2-2d2a7b419b4c",
"type": "main",
"index": 0
}
]
]
},
"Limit": {
"main": [
[
{
"node": "fa68f0d5-f010-44d6-86e8-f2854ab1b303",
"type": "main",
"index": 0
}
]
]
},
"fa68f0d5-f010-44d6-86e8-f2854ab1b303": {
"main": [
[
{
"node": "3a4edc62-a971-4126-b8fe-c3b805a64d97",
"type": "main",
"index": 0
}
]
]
},
"d5302b59-ccb0-41bf-9fde-bfe82ff2d487": {
"main": [
[
{
"node": "6fdedb20-c1b0-45d0-ac05-5c80ec58f3ad",
"type": "main",
"index": 0
}
]
]
},
"85c18e43-16fb-4025-94ad-6dd103876944": {
"main": [
[
{
"node": "d5302b59-ccb0-41bf-9fde-bfe82ff2d487",
"type": "main",
"index": 0
}
]
]
},
"6fdedb20-c1b0-45d0-ac05-5c80ec58f3ad": {
"main": [
[]
]
},
"5fdd565d-6d08-4b20-9834-dd0f53f11839": {
"main": [
[
{
"node": "fd709bf4-02ce-4423-9222-81d0eaff3dba",
"type": "main",
"index": 0
}
]
]
},
"fd709bf4-02ce-4423-9222-81d0eaff3dba": {
"main": [
[
{
"node": "28c657d9-88cf-4d96-9e23-d19fe2b49df0",
"type": "main",
"index": 0
}
]
]
},
"Google Gemini Chat Model": {
"ai_languageModel": [
[
{
"node": "fa68f0d5-f010-44d6-86e8-f2854ab1b303",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"ca640967-06a4-4c32-ba92-eeaddbea2d67": {
"ai_outputParser": [
[
{
"node": "fa68f0d5-f010-44d6-86e8-f2854ab1b303",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"40c4b1e5-751e-4925-a1d2-2d2a7b419b4c": {
"main": [
[
{
"node": "85c18e43-16fb-4025-94ad-6dd103876944",
"type": "main",
"index": 0
}
]
]
}
}
}Wie verwende ich diesen Workflow?
Kopieren Sie den obigen JSON-Code, erstellen Sie einen neuen Workflow in Ihrer n8n-Instanz und wählen Sie "Aus JSON importieren". Fügen Sie die Konfiguration ein und passen Sie die Anmeldedaten nach Bedarf an.
Für welche Szenarien ist dieser Workflow geeignet?
Fortgeschritten - Content-Erstellung, Multimodales KI
Ist es kostenpflichtig?
Dieser Workflow ist völlig kostenlos. Beachten Sie jedoch, dass Drittanbieterdienste (wie OpenAI API), die im Workflow verwendet werden, möglicherweise kostenpflichtig sind.
Verwandte Workflows
Muhammad Farooq Iqbal
@mfarooqoneDiesen Workflow teilen