AutomationFlowsAI & RAG › Generate Images with Openai Dall-e via Telegram & Log to Google Sheets

Generate Images with Openai Dall-e via Telegram & Log to Google Sheets

ByDavid Olusola @dae221 on n8n.io

This workflow allows users to generate AI images directly from Telegram while automatically logging each request to Google Sheets for tracking. When a user sends a prompt to your Telegram bot, the workflow receives the prompt, generates an image using OpenAI, saves the prompt…

Event trigger★★☆☆☆ complexityAI-powered5 nodesOpenAITelegram TriggerTelegramGoogle Sheets
AI & RAG Trigger: Event Nodes: 5 Complexity: ★★☆☆☆ AI nodes: yes Added:

This workflow corresponds to n8n.io template #5462 — we link there as the canonical source.

This workflow follows the Google Sheets → OpenAI 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 →

Download .json
{
  "id": "SGqUVskzXEBI5EHa",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Telegram AI Image Generator + Google Sheets Logger",
  "tags": [],
  "nodes": [
    {
      "id": "09061203-acb3-45f3-a2e9-a6899fab1260",
      "name": "OpenAI",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        -100,
        -40
      ],
      "parameters": {
        "prompt": "={{ $json.message.text }}",
        "options": {
          "size": "1024x1024",
          "dalleQuality": "standard",
          "returnImageUrls": true
        },
        "resource": "image"
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.8
    },
    {
      "id": "a571ef80-e5ab-457f-8bf0-ab4372420819",
      "name": "Telegram Trigger",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        -320,
        -40
      ],
      "parameters": {
        "updates": [
          "message"
        ],
        "additionalFields": {}
      },
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "90001184-fca0-44a2-892b-72c772bfd6da",
      "name": "Telegram",
      "type": "n8n-nodes-base.telegram",
      "position": [
        380,
        -40
      ],
      "parameters": {
        "file": "={{ $json['Image title'] }}",
        "chatId": "={{ $('Telegram Trigger').item.json.message.chat.id }}",
        "operation": "sendPhoto",
        "additionalFields": {}
      },
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "924d8b95-8687-4419-b994-93e32a23ea24",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -400,
        -360
      ],
      "parameters": {
        "width": 920,
        "height": 480,
        "content": "## Telegram AI Image Generator + Google Sheets Logger\n1. Telegram Trigger\nReceives image generation requests from users directly via Telegram.\n\n2. OpenAI Node\nProcesses the request by generating the required image based on the user\u2019s prompt.\n\n3. Saves the prompt and generated image link to Google Sheets.\n\n4. Telegram Send Message\nSends the generated image back to the user in Telegram as a seamless automated response.\n\nLoom Demo : [Link](https://www.loom.com/share/1c5e645442f6441baf9efd12a334eef0)"
      },
      "typeVersion": 1
    },
    {
      "id": "aed2c34b-ef3f-465d-a5bd-9d3fda8f9a9a",
      "name": "Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        160,
        -40
      ],
      "parameters": {
        "columns": {
          "value": {
            "Image title": "={{ $json.url }}",
            "Image description": "={{ $json.revised_prompt }}"
          },
          "schema": [
            {
              "id": "Image description",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Image description",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Image title",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Image title",
              "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/1iABxBKBY9ERctigW1bYvvRTIAf-m-InTSvSKnqANUhg/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1iABxBKBY9ERctigW1bYvvRTIAf-m-InTSvSKnqANUhg",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1iABxBKBY9ERctigW1bYvvRTIAf-m-InTSvSKnqANUhg/edit?usp=drivesdk",
          "cachedResultName": "image database"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.6
    }
  ],
  "active": true,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "2e4735b4-9872-45d0-af17-2af4314ad196",
  "connections": {
    "OpenAI": {
      "main": [
        [
          {
            "node": "Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Telegram": {
      "main": [
        []
      ]
    },
    "Google Sheets": {
      "main": [
        [
          {
            "node": "Telegram",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Telegram Trigger": {
      "main": [
        [
          {
            "node": "OpenAI",
            "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.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

This workflow allows users to generate AI images directly from Telegram while automatically logging each request to Google Sheets for tracking. When a user sends a prompt to your Telegram bot, the workflow receives the prompt, generates an image using OpenAI, saves the prompt…

Source: https://n8n.io/workflows/5462/ — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

Ask questions like “How much did I spend on food last month?” and get instant answers from your financial data — directly in Telegram.

Telegram Trigger, OpenAI, Google Sheets +2
AI & RAG

&gt; ⚠️ Disclaimer: This workflow uses Community Nodes and must be run on a self-hosted instance of n8n.

HTTP Request, Telegram Trigger, Telegram +2
AI & RAG

Viral Tik Tok Clone Finder. Uses httpRequest, telegramTrigger, openAi, googleSheets. Event-driven trigger; 41 nodes.

HTTP Request, Telegram Trigger, OpenAI +2
AI & RAG

This workflow is designed for content creators, agencies, influencers, and automation builders who want to transform viral videos into personalized avatar-based edits — and automatically publish them

Telegram Trigger, Telegram, HTTP Request +3
AI & RAG

💸 HOW IT WORKS — AI TELEGRAM EXPENSE TRACKER

Telegram Trigger, OpenAI, Google Sheets +1