This workflow corresponds to n8n.io template #4391 — we link there as the canonical source.
This workflow follows the Form Trigger → Google Drive recipe pattern — see all workflows that pair these two integrations.
The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"meta": {
"templateCredsSetupCompleted": true
},
"nodes": [
{
"id": "0b66ad6f-d216-41f3-a6dc-61cf15a2044a",
"name": "Set Access Permissions",
"type": "n8n-nodes-base.googleDrive",
"position": [
-2220,
-1000
],
"parameters": {
"fileId": {
"__rl": true,
"mode": "id",
"value": "={{ $json.id }}"
},
"options": {},
"operation": "share",
"permissionsUi": {
"permissionsValues": {
"role": "reader",
"type": "anyone"
}
},
"authentication": "serviceAccount"
},
"credentials": {
"googleApi": {
"name": "<your credential>"
}
},
"typeVersion": 3
},
{
"id": "724b14c0-6763-47f5-87a1-ed0dde7e8a9e",
"name": "Edit Image (OpenAI)",
"type": "n8n-nodes-base.httpRequest",
"position": [
-3060,
-1000
],
"parameters": {
"url": "https://api.openai.com/v1/images/edits",
"method": "POST",
"options": {},
"sendBody": true,
"contentType": "multipart-form-data",
"authentication": "predefinedCredentialType",
"bodyParameters": {
"parameters": [
{
"name": "image",
"parameterType": "formBinaryData",
"inputDataFieldName": "={{ $json[\"input image url\"].isEmpty()?\"input_image\":\"data\"}}"
},
{
"name": "prompt",
"value": "={{ $json.Promt }}"
},
{
"name": "model",
"value": "gpt-image-1"
},
{
"name": "n",
"value": "1"
},
{
"name": "size",
"value": "1024x1024"
},
{
"name": "quality",
"value": "={{ $json.quality }}"
}
]
},
"nodeCredentialType": "openAiApi"
},
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
},
"typeVersion": 4.2
},
{
"id": "071f9711-3b73-411d-9962-b540f0b418c7",
"name": "Convert json binary to File",
"type": "n8n-nodes-base.convertToFile",
"position": [
-2740,
-620
],
"parameters": {
"options": {
"fileName": "={{ $now.format('yyyy-MM-dd_HHmmss')+\".png\" }}",
"mimeType": "image/png"
},
"operation": "toBinary",
"sourceProperty": "data[0].b64_json"
},
"typeVersion": 1.1
},
{
"id": "e22377ef-1bbf-4288-a625-d07a97d5667d",
"name": "Convert json binary to File final",
"type": "n8n-nodes-base.convertToFile",
"position": [
-2740,
-1000
],
"parameters": {
"options": {
"fileName": "={{ $now.format('yyyy-MM-dd_HHmmss')+\".png\" }}",
"mimeType": "image/png"
},
"operation": "toBinary",
"sourceProperty": "data[0].b64_json"
},
"typeVersion": 1.1
},
{
"id": "5aabd61e-5407-4be7-b6c9-ab77c7cadad7",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-3140,
-780
],
"parameters": {
"color": 3,
"width": 280,
"height": 340,
"content": "### \ud83c\udfa8 Image Generation (OpenAI)\nSends a POST request to the OpenAI `/v1/images/generations` endpoint.\n\n- Uses `gpt-image-1` model"
},
"typeVersion": 1
},
{
"id": "93be8801-7fb4-42d7-af2d-1047b8c60d6e",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2840,
-1200
],
"parameters": {
"color": 5,
"width": 300,
"height": 760,
"content": "### \ud83e\uddfe Convert base64 to File\nConverts the `b64_json` field into a binary PNG file to use in the next step.\n\n\ud83d\udce4 Output: Final binary image\n"
},
"typeVersion": 1
},
{
"id": "aeafd971-28ad-4c5c-8d26-0d81f82fac01",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
-3140,
-1200
],
"parameters": {
"color": 3,
"width": 280,
"height": 360,
"content": "### \u270f\ufe0f Image to image generation (OpenAI)\nSends the binary image to OpenAI\u2019s `/v1/images/edits` endpoint with a descriptive prompt.\n\n- Model: `gpt-image-1`"
},
"typeVersion": 1
},
{
"id": "930bba79-34c4-40da-b22f-4f42b9894705",
"name": "On form submission",
"type": "n8n-nodes-base.formTrigger",
"position": [
-3860,
-840
],
"parameters": {
"options": {},
"formTitle": "GPT image to image",
"formFields": {
"values": [
{
"fieldLabel": "Promt",
"requiredField": true
},
{
"fieldType": "dropdown",
"fieldLabel": "quality",
"fieldOptions": {
"values": [
{
"option": "low"
},
{
"option": "medium"
},
{
"option": "high"
}
]
},
"requiredField": true
},
{
"fieldType": "file",
"fieldLabel": "input image",
"multipleFiles": false,
"acceptFileTypes": ".png,.jpg,.jpeg"
},
{
"fieldLabel": "input image url"
}
]
},
"responseMode": "lastNode",
"authentication": "basicAuth"
},
"credentials": {
"httpBasicAuth": {
"name": "<your credential>"
}
},
"typeVersion": 2.2
},
{
"id": "abb8a008-0dcb-427c-a00a-7c850790cf4f",
"name": "Upload Result Image to imgbb",
"type": "n8n-nodes-base.httpRequest",
"position": [
-2220,
-640
],
"parameters": {
"url": "https://api.imgbb.com/1/upload",
"method": "POST",
"options": {
"redirect": {
"redirect": {}
}
},
"sendBody": true,
"contentType": "multipart-form-data",
"bodyParameters": {
"parameters": [
{
"name": "image",
"parameterType": "formBinaryData",
"inputDataFieldName": "data"
},
{
"name": "key",
"value": "={{ $json.IMGBB_API_KEY }}"
}
]
}
},
"typeVersion": 4.2
},
{
"id": "ec0fc073-15f9-4cdf-a2f4-19de2c2b3261",
"name": "Upload Result Image to Google Drive",
"type": "n8n-nodes-base.googleDrive",
"position": [
-2440,
-1000
],
"parameters": {
"name": "={{ $input.item.binary.data.fileName }}",
"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": "root",
"cachedResultUrl": "https://drive.google.com/drive",
"cachedResultName": "/ (Root folder)"
},
"authentication": "serviceAccount"
},
"credentials": {
"googleApi": {
"name": "<your credential>"
}
},
"typeVersion": 3
},
{
"id": "7487229b-5e94-48d4-b84c-a5725e529e23",
"name": "File Link",
"type": "n8n-nodes-base.set",
"position": [
-2020,
-1000
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "df673a7d-7ff2-4c7e-835f-7c65e58c5ad4",
"name": "ViewLink",
"type": "string",
"value": "={{ $('Upload Result Image to Google Drive').item.json.webViewLink }}"
},
{
"id": "c3447718-d652-45d7-9c6f-6a1d4f29a68d",
"name": "ContentLink",
"type": "string",
"value": "={{ $('Upload Result Image to Google Drive').item.json.webContentLink }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "f4f2a07d-4a5e-45d9-96d6-0f5eb1359d6f",
"name": "Get Input Image by URL",
"type": "n8n-nodes-base.httpRequest",
"position": [
-3360,
-840
],
"parameters": {
"url": "={{ $json['input image url'] }}",
"options": {}
},
"typeVersion": 4.2
},
{
"id": "613aa7b5-8f63-490f-9026-de4971619e41",
"name": "SETUP API KEY",
"type": "n8n-nodes-base.set",
"position": [
-2440,
-640
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "f0df22ed-6c69-4204-8cfb-8dae51ea8fd4",
"name": "IMGBB_API_KEY",
"type": "string",
"value": "IMGBB_API_KEY"
}
]
},
"includeOtherFields": true
},
"typeVersion": 3.4
},
{
"id": "5e276d4c-05c0-4aa2-9f3c-88669c2d259a",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2500,
-1200
],
"parameters": {
"color": 6,
"width": 640,
"height": 760,
"content": "## Upload result file to Google Drive OR to [imgbb](https://api.imgbb.com/)"
},
"typeVersion": 1
},
{
"id": "38760191-c39a-4a62-a222-324e5cd83590",
"name": "Image Generation",
"type": "n8n-nodes-base.httpRequest",
"position": [
-3060,
-620
],
"parameters": {
"url": "https://api.openai.com/v1/images/generations",
"method": "POST",
"options": {},
"sendBody": true,
"authentication": "predefinedCredentialType",
"bodyParameters": {
"parameters": [
{
"name": "model",
"value": "gpt-image-1"
},
{
"name": "prompt",
"value": "={{ $json.Promt }}"
},
{
"name": "n",
"value": "={{Number(1)}}"
},
{
"name": "size",
"value": "1024x1024"
},
{
"name": "moderation",
"value": "low"
},
{
"name": "background",
"value": "auto"
},
{
"name": "quality",
"value": "={{ $json.quality }}"
}
]
},
"nodeCredentialType": "openAiApi"
},
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
},
"typeVersion": 4.2
},
{
"id": "6abaccab-b49b-41ab-86cd-8bf562472f9d",
"name": "File Link1",
"type": "n8n-nodes-base.set",
"position": [
-2000,
-640
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "df673a7d-7ff2-4c7e-835f-7c65e58c5ad4",
"name": "ViewLink",
"type": "string",
"value": "={{ $json.data.url }}"
},
{
"id": "c3447718-d652-45d7-9c6f-6a1d4f29a68d",
"name": "ContentLink",
"type": "string",
"value": "={{ $json.data.image.url }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "7443a6f2-3d0c-4fef-9dbe-56948ea8c17c",
"name": "Send to Telegram",
"type": "n8n-nodes-base.telegram",
"position": [
-1740,
-840
],
"parameters": {
"file": "={{ $json.ContentLink }}",
"chatId": "YOUR_CHAT_ID",
"operation": "sendPhoto",
"additionalFields": {
"caption": "={{ $('On form submission').item.json.Promt }}\n{{ $('On form submission').item.json.quality }}\n\n[Result]({{ $json.ViewLink }})",
"parse_mode": "MarkdownV2"
}
},
"credentials": {
"telegramApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.2
},
{
"id": "efe008a1-1dea-41f8-8778-1556cf0bbbea",
"name": "Switch Mode",
"type": "n8n-nodes-base.switch",
"position": [
-3640,
-840
],
"parameters": {
"rules": {
"values": [
{
"outputKey": "file",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "6c2e2793-96f4-4d15-af76-926d1fdcee71",
"operator": {
"type": "boolean",
"operation": "true",
"singleValue": true
},
"leftValue": "={{ $json['input image'] !== null && $json['input image url'].isNotEmpty() }}",
"rightValue": ""
}
]
},
"renameOutput": true
},
{
"outputKey": "file_url",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "9d464a07-f5fe-48af-b524-6ca60479fda6",
"operator": {
"type": "boolean",
"operation": "true",
"singleValue": true
},
"leftValue": "={{ $json['input image url'] !== null && $json['input image url'].isNotEmpty() }}",
"rightValue": ""
}
]
},
"renameOutput": true
}
]
},
"options": {
"fallbackOutput": "extra"
}
},
"typeVersion": 3.2
}
],
"connections": {
"File Link": {
"main": [
[
{
"node": "Send to Telegram",
"type": "main",
"index": 0
}
]
]
},
"File Link1": {
"main": [
[
{
"node": "Send to Telegram",
"type": "main",
"index": 0
}
]
]
},
"Switch Mode": {
"main": [
[
{
"node": "Edit Image (OpenAI)",
"type": "main",
"index": 0
}
],
[
{
"node": "Get Input Image by URL",
"type": "main",
"index": 0
}
],
[
{
"node": "Image Generation",
"type": "main",
"index": 0
}
]
]
},
"SETUP API KEY": {
"main": [
[
{
"node": "Upload Result Image to imgbb",
"type": "main",
"index": 0
}
]
]
},
"Image Generation": {
"main": [
[
{
"node": "Convert json binary to File",
"type": "main",
"index": 0
}
]
]
},
"On form submission": {
"main": [
[
{
"node": "Switch Mode",
"type": "main",
"index": 0
}
]
]
},
"Edit Image (OpenAI)": {
"main": [
[
{
"node": "Convert json binary to File final",
"type": "main",
"index": 0
}
]
]
},
"Get Input Image by URL": {
"main": [
[
{
"node": "Edit Image (OpenAI)",
"type": "main",
"index": 0
}
]
]
},
"Set Access Permissions": {
"main": [
[
{
"node": "File Link",
"type": "main",
"index": 0
}
]
]
},
"Convert json binary to File": {
"main": [
[
{
"node": "SETUP API KEY",
"type": "main",
"index": 0
}
]
]
},
"Upload Result Image to imgbb": {
"main": [
[
{
"node": "File Link1",
"type": "main",
"index": 0
}
]
]
},
"Convert json binary to File final": {
"main": [
[
{
"node": "Upload Result Image to Google Drive",
"type": "main",
"index": 0
}
]
]
},
"Upload Result Image to Google Drive": {
"main": [
[
{
"node": "Set Access Permissions",
"type": "main",
"index": 0
}
]
]
}
}
}
Credentials you'll need
Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.
googleApihttpBasicAuthopenAiApitelegramApi
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
Transform text prompts into stunning images or edit existing visuals using OpenAI's latest GPT-4 Vision model through an intuitive web form interface.
Source: https://n8n.io/workflows/4391/ — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
This workflow was built to solve a real, painful creator problem: you know what to explain, but you don’t like how you sound, hesitate while speaking, or don’t feel fluent enough on camera.
This workflow is ideal for content creators, video marketers, and research professionals who need to extract actionable insights, detailed transcripts, or metadata from YouTube videos efficiently. It
Creators, designers, and developers exploring AI-powered image generation. Automation enthusiasts who want to integrate image creation into n8n workflows. Telegram bot builders looking to add visual A
[](https://www.linkedin.com/in/mosaab-yassir-lafrimi/)[](https://t.me/joevenner)
This template is designed for filmmakers, content creators, social media managers, and AI developers who want to harness OpenAI's Sora 2 for creating physically accurate, cinematic videos with synchro