n8n Tutorial

  • Loading...

n8n tutorial - Lesson 22: AI Image Generation in n8n with gpt-image-1

n8n tutorial - Lesson 22: AI Image Generation in n8n with gpt-image-1

Hi everyone, in this session of our n8n workflow automation tutorial series, we cover how to fix broken image generation after OpenAI killed DALL-E, migrate to gpt-image-1, and extend the Content Factory with a YouTube metadata child workflow — all real steps from an actual n8n image generation AI build.

How to do:

Step 1 — Understand Why DALL-E Stopped Working

Before touching any node, confirm the root cause so you fix the right thing.
  1. OpenAI permanently shut down DALL-E 2 and DALL-E 3 on 12 May 2026 (announced 14 November 2025). Any call to model: "dall-e-3" returns error code model_not_found with the message "The model 'dall-e-3' does not exist" — there is no grace period.
  2. The original plan from the previous session was to swap the OpenAI node for an HTTP Request node and simply remove response_format. That partial fix is not enough because the model itself no longer exists.
  3. Web-search to confirm the shutdown date before making any code change — never rely solely on AI knowledge when the situation is time-sensitive.

Note — This is a recurring lesson in production automation: when an AI assistant's training data is older than the current date, always run a quick search to verify before acting on its suggestion.

Step 2 — Migrate the Image Generation Node to gpt-image-1

Replace the dead DALL-E call with gpt-image-1 and update the request body to match the new API contract.
  1. Open your T6-Content-Child-Blog workflow and locate the node that previously called DALL-E (either an OpenAI node or an HTTP Request node).
  2. In the HTTP Request node, set the Body to:
    • model: gpt-image-1
    • prompt: your prompt expression
    • size: 1024x1024
    • n: 1
  3. Remove any response_format field from the body — gpt-image-1 does not accept it and will error if it is present.

Tip — The endpoint URL stays the same (https://api.openai.com/v1/images/generations). Only the model name and body shape change, so keep your existing Authorization header and credentials untouched.

Step 3 — Handle the Base64 Response (Replace the Download Image Node)

gpt-image-1 returns a Base64 string, not a URL — the old Download Image node is now useless and must be replaced.
  1. Understand the critical difference:
    • DALL-E 3 returned: data[0].url — a public URL you could GET directly.
    • gpt-image-1 returns: data[0].b64_json — a raw Base64 string.
  2. Delete (or disable) the Download Image node that previously performed a GET request on the image URL.
  3. Add a Code node named Base64 to Binary immediately after the HTTP Request node.
  4. Inside the Code node, write logic to:
    • Read $json.data[0].b64_json from the previous node's output.
    • Convert it to a binary buffer.
    • Return it as a binary field named data so downstream nodes (e.g., Google Drive upload) can consume it.
  5. Connect the Code node output to your Google Drive upload node and confirm the binary field name matches what the Drive node expects.

Tip — After uploading, set the file permission to Anyone with the link / Reader (Make Public) in Google Drive. Without this, the thumbnail embed in your blog HTML (<img src="https://drive.google.com/thumbnail?id={id}&sz=w1024">) will return a 403 for public readers.

Step 4 — Fix the Draft Post URL and Post ID Fields

Verify the actual field names returned by the Blogger POST Draft node — two fields from the previous session were guessed incorrectly.
  1. Run the Create Draft node against a real Blogger API call and inspect the raw output JSON.
  2. Confirm field mappings:
    • postId → use {{ $json.id }} (top-level field — this guess was correct).
    • blogId → use {{ $json.blog.id }}.
    • blogUrldo not use {{ $json.url }} for a draft. For a DRAFT post, url only returns the blog homepage, not a permalink.
  3. For the edit link, construct it manually: https://www.blogger.com/blog/post/edit/{{ $json.blog.id }}/{{ $json.id }}

Note — A published post would populate url with the real permalink. Because this workflow saves drafts, the direct edit URL is more useful for review before publishing.

Step 5 — Build the YouTube Metadata Child Workflow

Create T6-Content-Child-YouTube as a 6-node workflow that generates YouTube SEO metadata and writes it to a Google Doc.
  1. Add a When Called by Another Workflow trigger node; define one input field: topic.
  2. Add an AI / Claude node (model: Claude Haiku 4.5) named YouTube SEO:
    • Connect it to a Structured Output Parser.
    • The prompt must demand JSON-only output with fields: title, description, tags, timestamps.
  3. Add a Code node named Format Doc Content to shape the parsed JSON into a readable Google Doc body string.
  4. Add a Google Docs node set to Create; note that the field holding the new document's ID in the output is id — not documentId (a common wrong guess).
  5. Add a second Google Docs node set to Update (Insert Text) to write the formatted content into the newly created document; reference the doc ID with {{ $json.id }}.
  6. Add a final Code node named Build YT Output; prefix all output fields with yt_ (e.g., yt_title, yt_tags, yt_docUrl, processedBy_YouTube) to prevent field collisions when Merging with Blog child output later.

Tip — This child workflow generates text metadata only — it does not create or upload a video. Auto-injecting this metadata into an actual YouTube upload requires a separate step: update the child to also write into the T5-Video-Metadata Sheet, which the upload workflow reads from.

Step 6 — Fix "Model Output Doesn't Fit Required Format" in the Output Parser

If the Structured Output Parser throws this error, tighten the prompt before reaching for advanced fixes.
  1. Edit the YouTube SEO node's system/user prompt to explicitly state: respond with JSON only, no markdown fences, no extra commentary, no trailing text.
  2. Test again — in most cases, this prompt strictness (Fix 1) resolves the error completely.
  3. The Auto-fixing Output Parser (Fix 2) is a more robust fallback that automatically retries malformed outputs. Keep this as a documented option for production hardening but do not implement it now unless Fix 1 fails.

Step 7 — Connect Both Children in the Parent Dispatch Workflow

Update T6-Content-Factory-Dispatch to fan out to both child workflows in parallel and merge their results.
  1. After the Limit node, draw two separate wires — one to Call Child Blog and one to Call Child YouTube.
  2. Set both Execute Sub-workflow nodes to Run once for each item so each topic spawns both children.
  3. Add a Merge node after both children; set its mode to Combine by Position.
  4. Connect both child output wires into the Merge node, then connect Merge to the Mark Done node.
  5. Test with one topic (e.g., "Top 5 amenities at Vinhomes Global Gate") and confirm:
    • Merge outputs exactly 1 item.
    • The item contains both blog fields and yt_-prefixed YouTube fields with no overwrites.

Production tip — The yt_ prefix on all YouTube child output fields is what prevents Merge from overwriting blog fields that share the same name (e.g., both children might output a title). Always prefix child outputs when multiple children feed a single Merge node.

Key Lessons from This Session

  1. DALL-E 2 and DALL-E 3 are permanently gone. Any workflow using those models must migrate to gpt-image-1 — there is no fallback or grace period.
  2. gpt-image-1 returns Base64, not a URL. Replace any "Download Image" node with a Code node that converts data[0].b64_json to a binary field.
  3. Draft Blogger posts do not return a real permalink. Build the edit URL manually from blog.id and id instead of relying on $json.url.
  4. Google Docs Create node returns id, not documentId. Always inspect raw output before writing expressions that reference node fields.
  5. Prefix child output fields to avoid Merge collisions. Use a consistent naming convention like yt_ for all fields from the YouTube child workflow.
  6. Prompt strictness fixes most Output Parser errors. Require JSON-only responses before reaching for the Auto-fixing Output Parser.
  7. Search before you fix, especially for API changes. When an AI tool suggests a fix for an API error, verify current model availability online first.

Conclusion:

In this n8n tutorial, we migrated image generation from the retired DALL-E to gpt-image-1, handled the Base64 response format correctly, fixed draft post field mappings, and built a parallel YouTube metadata child workflow — completing the core Content Factory. The next session focuses on production hardening: error output routing on each Execute Sub-workflow node, switching the parent trigger from Manual to Schedule, and linking an Error Handler workflow. If you have any questions, feel free to leave a comment below. Thank you!

Tags: n8n image generation AI, n8n tutorial, n8n workflow automation, gpt-image-1, n8n HTTP Request node, OpenAI image API, n8n sub-workflow, n8n Merge node

Maybe you are interested!

Build an Interactive Knowledge Train Drag-and-Drop Game Without Coding

Turning boring study questions into interactive games transforms how students engage with learning. Instead of students answering traditional questions one by one, educators can build dynamic drag-and-drop activities that turn practice sessions into play sessions. Here's what's interesting: you don't need any coding knowledge. With ChatGPT's help, you can generate a complete, functional HTML game from a single prompt.

This guide walks you through creating an interactive "Knowledge Train" game. The concept is elegant: students drag train cars onto tracks in the correct sequence, matching questions with answers. Each car contains two elements—the answer to the previous question on the left, and the next question on the right. This chain-linking approach makes knowledge connections visual and intuitive.

How to Build Your Knowledge Train Game

Step 1:

Open Gemini and switch to Canvas mode to begin building your game. Copy the prompt below into the interface.

Create an interactive HTML game called: KNOWLEDGE TRAIN.

Requirements:

- Build a standalone HTML file (HTML + CSS + JavaScript in one file) that works offline.

- Use bright 2D animations and colors suitable for elementary school students.

- Theme: educational train game.

- Include: locomotive, train tracks, multiple cars, and a draggable car depot.

- Students drag cars from the depot below onto the track in correct sequence.

Game Mechanics:

- The first car presents the opening question.

- Each car contains two sections:

 + Left side: ANSWER to the previous question.
 + Right side: NEXT QUESTION.

- When a car is placed correctly:
 
 + Car locks onto the track.
 + Play a success sound.
 + Show a subtle bounce effect.

- When a car is placed incorrectly:
 + Car returns to the depot.
 + Show a shake effect.
 + Play an error sound.

- Upon completion:
 + Display confetti animation.
 + Show congratulations message.
 + Animate the train moving left to right across the screen.

Layout:

- Top: "KNOWLEDGE TRAIN" title.

- Right side buttons:
 + Reset
 + Check
 + Shuffle

- Center area:
 + Locomotive on the left.
 + Empty slots for cars.
 + Horizontal scrollbar to view final cars.

- Bottom area:
 + Draggable car depot.
 + Horizontal scrollbar.

Data Structure (Teachers edit this):

const firstQuestion = "Who was the first king to establish our nation?";

const data = [

  {

    id: 1,

    answer: "King Hung",

    question: "According to legend, who invented sticky rice cakes and square cakes?",

  },

  {

    id: 2,

    answer: "Lang Lieu", 

    question: "Which three-year-old boy grew up overnight to fight invaders?",

  },

  {

    id: 3,

    answer: "Saint Giong",

    question: "Which two female war heroes rode elephants against enemy forces?",

  },

  {

    id: 4,

    answer: "The Two Trung Sisters",

    question: "Who placed wooden stakes in the Bach Dang River to defeat the Southern Han army?",

  },

  {

    id: 5,

    answer: "TEACHER ENTERS ANSWER",

    question: "TEACHER ENTERS NEXT QUESTION",

  },

  {

    id: 6,

    answer: "Ngo Quyen",

    question: "Complete!",

    label: "Finished"

  }

];

Technical Requirements:

- Enable mouse drag-and-drop functionality.

- Randomly shuffle cars in the depot.

- When a car is correctly placed, it disappears from the depot and appears on the track.

- Auto-scroll to the next empty slot when a car is added.

- Final car must always be draggable and never hidden.

- Clear horizontal scrollbars for both track and depot areas.

- Responsive design optimized for laptop screens.

- Large, readable fonts.

- No overlapping text or images.

- No external libraries required.

- Works completely offline.

- All code in a single HTML file.

Design Guidelines:

- Primary colors: sky blue, yellow, red, green.

- Rounded car corners with visible wheels.

- Left answer section: yellow background.

- Right question section: white background.

- Empty slots: dashed border outline.

- Fun effects without visual clutter.

Provide complete, production-ready HTML code so I can save it as .html and open it in Chrome immediately.

Step 2:

Wait a moment for the game to appear on the right side of your screen. Test it out. If you spot issues or want to adjust something, type your request in the left panel. Once satisfied, click the download icon to save the HTML file to your computer.

To play the game anytime, simply click the HTML file and it opens in any browser.

Here's what the game looks like in action. Students read questions, then drag and drop the correct cars to build their answer sequence and complete the train.


Related Articles

How to Use Gemini for Summarizing YouTube Videos

YouTube hosts an enormous library of knowledge and entertainment—millions of videos upload daily. But let's be honest: most of us don't have time to watch entire videos from start to finish.

If you're looking for an AI tool to handle video summaries, Gemini is an excellent choice. Just paste a video link and issue a simple command, and Gemini extracts the main points for you. What's interesting here is that Gemini goes beyond basic summaries—it can pull out key takeaways, list instructional steps, generate study notes, answer specific video-related questions, and reformat content into more digestible layouts. Here's how to get started with Gemini for YouTube video summaries.

How to Summarize YouTube Videos Using Gemini

Step 1:

Start by pasting the YouTube video link into Gemini's chat box. Then enter a command like the one below to analyze the video and extract key points:

Analyze and study this YouTube video, then extract the main ideas and critical points.

You can customize your request with variations such as:

  • Summarize the video in 200 words.
  • List the 10 main points from this video.
  • Explain the content in simple terms.
  • Create a beginner-friendly summary.
  • Convert the content into bullet points.
  • Extract step-by-step instructions from the video.
  • Rewrite the content as study notes.

Step 2:

Make sure to switch to the Pro model and hit send to process your YouTube video summary request.

Step 3:

Within moments, you'll receive a breakdown of the video's main content. Gemini organizes everything into distinct sections, making it easy to scan and absorb the information.

Step 4:

Want to turn this summary into a visual infographic? Use this command to convert the text into a graphic format:

Create a clear, clean study diagram or infographic from the information above.

Give Gemini a moment to process and generate an infographic based on the summary. Once it's ready, download the image as you normally would.

Important Considerations When Using Gemini for YouTube Summaries

Despite its usefulness, Gemini does have limitations:

  • Output quality depends on the data quality the AI can access.
  • Private or restricted videos cannot be analyzed.
  • AI may miss subtle details or nuance in the original content.
  • For highly technical videos, verify the original to double-check accuracy.

To get more accurate summaries from Gemini, follow these best practices:

  • Use specific prompts instead of vague requests.
  • Specify the desired length of the summary.
  • Ask for list format if you need note-taking structure.
  • Ask follow-up questions after the summary to clarify unclear points.
  • Use multiple prompts if you want a deeper analysis of different video sections.


Related Articles

n8n tutorial - Lesson 21: Sub-Workflows in n8n: Build Modular Automation

n8n tutorial - Lesson 21: Sub-Workflows in n8n: Build Modular Automation

Hi everyone, in this n8n sub workflow tutorial, you'll learn how to split a large automation into reusable child workflows using the Execute Workflow node. This is a core pattern in n8n workflow automation that keeps your projects modular, maintainable, and easy to scale.

How to do:

Step 1 — Understand When to Use Sub-Workflows

Before building anything, know the five situations where the sub-workflow pattern pays off in n8n workflow automation.
  1. Use a sub-workflow when the same logic is called from multiple parent workflows — for example, a "post to Blogger" routine used by both a blog factory and an email pipeline.
  2. Use it when a single workflow exceeds ~15 nodes and becomes hard to read or debug.
  3. Use it when you want to test one processing unit (text formatting, image generation, number math) independently without running the full parent.
  4. Use it when different team members own different stages — each person edits their own child workflow without touching shared logic.
  5. Use it when you need to process each item in a loop through a consistent set of nodes — the parent iterates, the child does the work.

Step 2 — Build Child Workflow A (Text Processor)

The first child workflow, T6-B2-Child-A-TextProcessor, receives a text string, transforms it to uppercase, and returns the result.
  1. Create a new workflow named T6-B2-Child-A-TextProcessor.
  2. Add a When Executed by Another Workflow trigger node. In the Input Schema, define one field: name text, type String.
  3. Add a Set node after the trigger. Configure three output fields:
    • result → expression {{ $json.text.toUpperCase() }}
    • processedAt → expression {{ $now.toISO() }}
    • processedBy → fixed string Child-A-TextProcessor
  4. Save the workflow, then click Test workflow with pinned data {"text": "hello sub workflow"}. Expected output: result: "HELLO SUB WORKFLOW".

Note — Depending on your n8n version, the When Executed by Another Workflow trigger's schema screen may only show Name and Type fields — there is no auto-generated sample value input box. You must pin test data manually to run standalone tests.

Step 3 — Build Child Workflow B (Number Processor)

The second child, T6-B2-Child-B-NumberProcessor, receives a number and returns its square — demonstrating that each child can use a completely different node type.
  1. Create a new workflow named T6-B2-Child-B-NumberProcessor.
  2. Add a When Executed by Another Workflow trigger. Define one schema field: name number, type Number.
  3. Add a Code node with the following JavaScript:
    • const n = items[0].json.number;
    • return [{ json: { squared: n * n, processedAt: new Date().toISOString(), processedBy: "Child-B-NumberProcessor" } }];
  4. Save and test with pinned data {"number": 7}. Expected output: squared: 49.

Step 4 — Build the Parent Dispatch Workflow

The parent workflow, T6-B2-Parent-Dispatch, sends data to both children in parallel and merges the results.
  1. Create a new workflow named T6-B2-Parent-Dispatch.
  2. Add a Manual Trigger node, then a Set node to mock input — set text to hello sub workflow and number to 7.
  3. From the mock input node, create two parallel branches:
    • Branch 1: Execute Workflow node → select T6-B2-Child-A-TextProcessor. Set Run once for all items. Map text{{ $json.text }}.
    • Branch 2: Execute Workflow node → select T6-B2-Child-B-NumberProcessor. Set Run once for all items. Map number{{ $json.number }}.
  4. Add a Merge node connected to both branches. Set Mode to Combine By Position.
  5. Run the parent and verify the merged output contains fields from both children: result, squared, and both processedAt values.

Tip — Use Combine By Position (not Combine By Matching Fields) when your two branches don't share a common key field. Combine By Matching Fields requires a shared identifier — in this demo, there is none.

Step 5 — Know the 7 Gotchas Before Going Further

These are the practical issues you will hit in real n8n sub workflow builds.
  1. Field name collision: If Child A and Child B both output a field called processedAt, the Merge node will overwrite one with the other. Rename fields to be unique per child (e.g., processedAt_A vs processedAt_B).
  2. Timezone offset: $now.toISO() returns local time; new Date().toISOString() in a Code node returns UTC. Be consistent across children to avoid confusion in logs.
  3. Cross-node reference breaks after deleting a node: If your child was duplicated from another workflow and still references a deleted node — e.g., $('Get Topics') — the expression will throw an error. Update every reference to point to the new trigger: $('When Executed by Another Workflow').
  4. Double-equals bug: In the Execute Workflow input mapping, if the field is already in Expression mode, type {{ $json.topic }} — do NOT prefix it with =. Writing ={{ $json.topic }} passes the literal string =Hướng dẫn... as the topic title instead of the actual value.
  5. Schema only validates, it does not inject sample data: The trigger schema defines expected input types. It does not create a test input form — pin data manually for standalone testing.
  6. Run mode matters: Run once for all items calls the child once and passes all items in a batch. Run once for each item calls the child once per item. Use "each item" when the child must process one topic at a time (e.g., the Content Factory).
  7. On Error behavior: Each Execute Workflow node has an On Error setting with three options: Stop Workflow (default — halts everything), Continue (skips the failed item silently), Continue (using error output) (routes the error to a separate output pin for handling). For production, set this to Continue (using error output) so one bad topic doesn't kill the whole batch.

Step 6 — Refactor Content Factory into Parent + Child

Now apply the sub-workflow pattern to a real project: the existing T4-B5-Blog-Batch workflow (14 nodes) is split into a parent dispatcher and a child blog generator.
  1. Design the split:
    • Parent (T6-Content-Factory-Dispatch): reads topics from Google Sheet T4-B5-Blog-Topics, calls the child for each topic, marks the sheet row as done.
    • Child (T6-Content-Child-Blog): receives one topic string, generates HTML blog post, posts draft to Blogger, returns topic / status / postId / blogUrl.
  2. Build the child workflow:
    1. Duplicate T4-B5-Blog-Batch. Rename it T6-Content-Child-Blog.
    2. Delete the Get Topics, Limit, and Mark Done nodes.
    3. Add a When Executed by Another Workflow trigger with schema field topic (type String).
    4. Find every expression that references $('Get Topics') and replace it with $('When Executed by Another Workflow').
    5. Add a final Set node (Build Output) that returns: topic, status, postId (from $json.id of the Blogger POST response), blogUrl (from $json.url).
  3. Build the parent workflow:
    1. Duplicate T4-B5-Blog-Batch. Rename it T6-Content-Factory-Dispatch.
    2. Delete the 11 internal processing nodes, keeping only: Manual TriggerGet TopicsLimitMark Done.
    3. Insert a Call Child Blog (Execute Workflow) node between Limit and Mark Done. Select T6-Content-Child-Blog. Set Run to Run once for each item.
    4. Map the child input: field name topic, value {{ $json.topic }} (no leading =).
    5. In the Mark Done node, set the match condition to topic = {{ $json.topic }} — this uses the topic field returned by the child output, ensuring the correct sheet row is marked regardless of item ordering.

Production tip — Always match Mark Done using a value from the child's output (not the parent's pre-call data). If the child transforms or normalizes the topic string, matching against the child's returned topic field prevents row-pairing mismatches in your sheet.

Step 7 — Test the Full Content Factory and Fix Errors

Run the parent with one topic in the sheet and work through the three errors that appear in a typical first run.
  1. Error 1 — DALL-E response_format known issue:
    • The OpenAI DALL-E node throws an error related to the response_format parameter on certain n8n versions.
    • Workaround: disable the DALL-E node and its 3 downstream image-handling nodes in T6-Content-Child-Blog. The blog post will be created without an image until this is fixed in Session 22.
  2. Error 2 — Double-equals in topic title:
    • Symptom: the blog post title appears as =Hướng dẫn... (the raw expression string, not the evaluated value).
    • Fix: open the Call Child Blog node, find the topic input field, confirm it is already in Expression mode, and change the value from ={{ $json.topic }} to {{ $json.topic }}.
  3. Error 3 — Broken cross-node reference:
    • Symptom: child workflow throws Referenced node does not exist: Get Topics.
    • Fix: search the child for every expression containing $('Get Topics') and replace with $('When Executed by Another Workflow').
  4. After all three fixes, run the parent again. Expected results:
    • Blogger draft created with clean title ✅
    • Google Sheet row marked as done ✅
    • No expression errors ✅

Note — The DALL-E issue is a known bug in specific n8n versions. The fix — replacing the OpenAI node with an HTTP Request node calling images/generations directly without the response_format parameter — is scheduled for the next session.

Key Lessons from This Session

  1. Always test each child workflow standalone before connecting to the parent. Pin sample data to the trigger and verify output before wiring the Execute Workflow node in the parent.
  2. Use Combine By Position when branches share no common key field. Combine By Matching Fields requires a shared identifier — if none exists, the merge will silently drop rows.
  3. The double-equals bug (={{ }}) passes a literal string, not an expression. If an input field is already in Expression mode, write {{ $json.field }} without the leading =.
  4. Cross-node references break when the referenced node is deleted. After duplicating a workflow and removing nodes, audit every expression for references to deleted node names.
  5. Match Mark Done using the child's output topic, not the parent's pre-call data. This prevents sheet row mismatches when items are processed out of order.
  6. Set Execute Workflow error handling to "Continue (using error output)" in production. This routes failed items to a separate pin instead of stopping the entire batch.
  7. Run once for each item vs. run once for all items controls batching behavior. Use "each item" when the child must handle one record at a time with its own context.

Conclusion:

In this n8n sub workflow tutorial, you built a full three-workflow demo — two standalone child processors and a parent dispatcher — then applied the same pattern to a real Content Factory by refactoring a 14-node monolith into a clean parent-plus-child architecture. The sub-workflow pattern is the foundation for orchestrating multi-format content pipelines in n8n tutorial series like this one, and every production technique covered here (error routing, expression mode awareness, cross-node reference auditing) will carry forward into more advanced n8n workflow automation builds. Next session covers re-enabling the DALL-E image branch with a direct HTTP Request workaround, verifying postId and blogUrl output values, and expanding the factory to dispatch to YouTube and Email child workflows.

If you have any questions, feel free to leave a comment below. Thank you!

Tags: n8n sub workflow tutorial, n8n tutorial, n8n workflow automation, Execute Workflow node, modular automation, n8n Content Factory, n8n beginner to advanced, workflow design patterns

Maybe you are interested!

How to Disable and Control AI Features on Your Samsung Galaxy Phone

Artificial intelligence has become inseparable from modern smartphones. Every major manufacturer is loading their devices with increasingly sophisticated AI capabilities, and Samsung is leading the charge. From virtual assistants and real-time translation to photo editing tools and writing assistance, AI is everywhere on the latest Galaxy lineup.

But here's the thing: not every user wants AI integrated into every aspect of their phone experience. Some people only need a handful of useful features, while others prioritize privacy or want to reduce unnecessary background services consuming system resources.

The good news? Samsung actually gives you real control over Galaxy AI. You can enable or disable individual features without touching others, or limit how AI processes your data—all without diving into confusing settings menus.

What Exactly Is Galaxy AI?

Galaxy AI is Samsung's umbrella term for the AI technologies integrated into its latest devices. It's a collection of features including live call translation, writing assistance, text summarization, AI-powered photo editing, intelligent search, and several other productivity tools.

Samsung's vision is to make your smartphone a smarter personal assistant—one that can help with both work and daily life. The catch? Not everyone needs or wants access to this entire AI ecosystem. That's why Samsung built in flexible management options.

How to Disable Individual Galaxy AI Features

Many Galaxy AI features genuinely save time and effort. Rather than turning everything off, most users prefer to disable only the tools they don't actually use.

To manage individual AI services on your Samsung Galaxy phone, follow these steps:

  • Open Settings.
  • Tap Galaxy AI.
  • Select the specific AI feature you want to adjust.
  • Toggle the switch to Off to disable that feature.

This screen displays your complete Galaxy AI toolkit. You can switch individual features on or off based on your actual needs instead of disabling the whole system at once.

What's interesting here is this granular approach—you keep the tools that genuinely improve your workflow while eliminating the clutter of features you rarely touch.

Restricting AI to On-Device Processing Only

Privacy-conscious users will appreciate another option Samsung offers.

At the bottom of the Galaxy AI settings screen, there's a toggle that lets you limit data processing to your device itself, rather than sending information to Samsung's cloud servers.

When you enable this mode, your phone processes AI tasks directly on its hardware. This reduces the amount of data traveling over the internet and strengthens your personal data protection.

There's a tradeoff, though. Some AI features rely on cloud server processing, so they'll either stop working or perform less effectively. In certain cases, the quality of results may suffer compared to using full cloud services.

Ditching Bixby If Samsung's AI Isn't Your Style

Beyond Galaxy AI, there's Bixby—Samsung's virtual assistant that's been integrated into devices for years. Plenty of users have probably forgotten it's even running in the background.

If you want to minimize Samsung's AI footprint, replacing or disabling Bixby is worth considering.

Samsung now lets you choose a different default assistant. In most cases, Google Assistant is the popular choice thanks to its broad compatibility and robust feature set.

That said, options vary depending on your Galaxy model. On the newer Galaxy S26 series, for example, Bixby isn't the default assistant anymore. If you install the Perplexity app, you can even set that as your replacement assistant.

How to Replace Bixby with Google Assistant

To switch to Google Assistant instead of Bixby, follow these steps:

  • Open Settings.
  • Go to Apps.
  • Tap Default Apps.
  • Select Digital Assistant App.
  • Choose Google.

From now on, whenever you activate voice assistant on your phone, Google Assistant handles the request instead of Bixby.

Beyond Google Assistant, other options depend on which AI apps you've installed. Newer AI assistant platforms may also appear in your list if they support Android system integration.

Should You Turn Off Galaxy AI Completely?

The answer depends on how you actually use your phone.

If you regularly take advantage of features like language translation, writing support, smart search, or AI photo editing, keeping Galaxy AI enabled offers real practical value.

On the flip side, if privacy is your main concern, you want to reduce background services, or you simply don't want AI features cluttering your interface, disabling the unnecessary tools will give you a cleaner experience.

The real concern is this: Samsung isn't forcing you to use their entire AI ecosystem. You're completely free to choose exactly how much AI appears on your device.


Samsung keeps adding more AI features to Galaxy devices, but the decision about how to use them remains yours. Through the Galaxy AI section in settings, you can easily enable or disable individual features, restrict data processing to your device, or swap out Bixby for a different assistant that better matches your preferences.

For most people, the sweet spot isn't eliminating AI entirely. Instead, it's keeping the features that genuinely improve your daily workflow while disabling the tools that don't add value. That way, you get the benefits of AI while maintaining full control over your phone.

Related Articles

Getting Started with the Gemini API: A Complete Setup Guide

When you're feeding large amounts of data to an AI model for analysis, one critical constraint becomes apparent: the model's context window — essentially how much information it can hold in memory at once. Send too much data, and the model forgets chunks of your instructions, leading to inaccurate and basically useless results.

Google's Gemini 1.5 Pro changes the game here. It can process massive amounts of data simultaneously, supporting up to one million tokens per prompt — roughly equivalent to 700,000 words. Beyond text, this model is multimodal, meaning it can handle up to one hour of video, 9.5 hours of audio, and over 30,000 lines of code all in a single request.

This guide walks you through what Gemini can do and how to configure API calls to start communicating with it. With such a massive context window, you can send extremely lengthy prompts with complex instructions, examples, and data that needs processing — all without needing a machine learning degree.

What exactly is Gemini API?

Gemini API gives you access to Google's suite of AI models:

  • Gemini 1.0 Pro — a natural language processing model with conversational and code-generation capabilities
  • Gemini 1.5 Pro — a multimodal model with a context window reaching one million tokens
  • Gemini 1.5 Flash — a faster multimodal model with tighter input and output limitations

When you connect these models to your own tools, applications, or internal systems, you unlock their capabilities wherever you're working. No more bouncing between chat interfaces and your development environment.

Two primary pathways exist for connecting to Gemini API. The easiest route is using the free tier through Google AI Studio — this is your fastest path to getting started. If you need deeper control and want to integrate with other models, Google Vertex AI Model Garden gives you that flexibility.

Obtaining Your Gemini API Key and Establishing a Connection

Step 1: Create a Google AI Studio Account

Head to the Gemini API website and click Sign In to Google AI Studio. Follow the prompts to create a new account or log in with your existing Google credentials.

Step 2: Review the Documentation and API Reference

Every API works differently, so you'll need to lean on API documentation to understand features and use cases. The API reference, on the other hand, is a technical deep-dive into commands, parameters, and setup instructions to help you deploy it in your project.

Here are the links to both the Gemini API documentation and the API reference for content generation.

Step 3: Generating Your API Key

Once you're logged into Google AI Studio, read and accept any pop-ups that appear. You can explore the Gemini models here and tweak some basic settings on the right side of the screen.

In the top-left corner, click the Get API key button.


Get API key button in Google AI Studio

Next, click Create API key.


Create API key button in Google AI Studio

Accept the security prompt that appears, then click Create API key in new project.


Create API key in new project button in Google AI Studio

Google will generate a fresh API key. Copy it immediately, then close the pop-up.

Important Security Note: Treat this API key like a password. If someone gets hold of it, they can use it to make API calls on your account. Depending on your usage, this could rack up charges or disable your endpoint. Never share it publicly, and if you're deploying an app to the web, research best practices for securing API keys before going live.

Back on the API key dashboard, you'll see your new key listed, along with a new section containing a cURL command below it. If you don't see it, try refreshing your browser.


List of API keys in Google AI Studio

Let's break down what each line of this command does.

curl \\

For terminal users, this initiates a new connection. The backslash is a line continuation character for readability — it doesn't affect the actual command. We won't need it.

-H 'Content-Type: application/json' \\

This is a request header, marked by the -H flag. It contains the Content-Type key set to application/json, telling the API endpoint what type of data to expect. Postman (the platform we'll use to make API calls in this guide) handles this automatically, so we can skip it too.

 -d '{"contents":[{"parts":[{"text":"Explain how AI works"}]}]}' \\

The -d flag marks the data being sent with the request. Written in JSON, "contents" marks your request payload, split into "parts". It contains a "text" part with the value "Explain how AI works" — this is your prompt to the AI model.

 -X POST 'https://generativelanguage.googleapis.com/v1beta/models/gemini-1.5-flash-latest:generateContent?key=YOUR_API_KEY'

The -X parameter specifies the HTTP request type — in this case, POST. The URL points to your API endpoint, where the request gets sent.

Step 4: Setting Up Your API Call

You now have everything needed to start calling Gemini API. If you want to follow along, create a free account on Postman, a platform for designing and testing APIs. Alternatively, you can use a no-code app builder or your internal development tools.

If you're using Postman, sign in to your dashboard and click New Request at the top.


New Request button in Postman

Start by handling the -X flag. In the request input field, click the dropdown showing GET and switch it to POST. Then copy the URL from the -X flag (without the quotes at the beginning and end) and paste it in.


Switching GET to POST and adding the URL with -X flag in Postman

Just below, you'll notice a new parameter appears. Postman detected it from your URL: "key=YOUR_API_KEY". This is where you'll pass your unique API key. Delete YOUR_API_KEY (in the URL input field or in the query parameters table below) and replace it with your actual key.

Setting up a new API is more like debugging than a smooth ride, so let's troubleshoot together. Click the Send button and see what happens.


Click the Send button in Postman

HTTP 400 Bad Request error. The message tells us the contents are not specified. No surprise there — we haven't configured the request body in Postman yet, so it's sending an empty request to the API.


Error message in Postman

Whenever you hit an error making an API call, look for syntax mistakes and refer back to the documentation and API reference. Stuck? ChatGPT can help you format requests and JSON correctly.

Step 5: Configuring Your Request Body

Let's set up the request body to fix that error. Back in the request tab at the top of Postman, below the endpoint input field, click the Body tab, then select raw.


Select Body and raw in Postman

We'll paste the entire content from the -d flag of your previous request. The guide has formatted it for readability. Copy and paste it into line 1 of the interface:

{
  "contents": [
    {
      "parts": [
        {
          "text": "Explain how AI works"
        }
      ]
    }
  ]
}

JSON pasted into Postman

There's only one way to know for sure if this works: Click the Send button again.


Click Send once more in Postman

If you've followed the guide correctly, you'll now see something new in the response tab: HTTP 200 OK status and the full response from Gemini.


Success message and response from Gemini API

There's something interesting buried in this lengthy response. Scroll to the bottom and look at this section.


citationMetadata information from Gemini API

The "citationMetadata" and "citationSources" keys show that Gemini performed a web search to generate its response. It's based on the page shown in the "uri" key. What's interesting here is that this also explains why the API took longer than usual to respond — in this example, the call took about 10 seconds to return an answer.

Step 6: Sending Your Own Prompts

You're now communicating with Gemini API, but this won't help much if you can't send your own prompts. In Postman's request tab, replace the value inside the "text" key with your own text. Keep the quotation marks at the beginning and end — without them, the call will return an error.


Change the prompt for Gemini API in Postman

When you click Send, you'll see a new response at the bottom of the screen.

Step 7: Adjusting Generation Settings

You can add multiple parameters to your request body to control how Gemini generates responses. Visit the API documentation's model reference page to see them all.

The page might feel overwhelming on first read. The first section you need is the guide for the request body.


Documentation for request body from Google for Gemini API

When you copy and paste this entire JSON into Postman's request body, you gain control over the generation process. Note that parameters are marked with their accepted data types — strings, integers, floats, numbers — so replace them with actual values before running the command.

If you don't need a particular parameter, delete it from the request body. Make sure you also remove all brackets associated with it, so everything opens and closes correctly. Postman will warn you if it finds problems, and if you're stuck, paste it into ChatGPT and ask it to fix the syntax.

The second useful part of the page explains what each parameter does, right below the Request body section.


Explanation of parameters from Google for Gemini API

You'll find helpful explanations for each parameter's purpose, what it does, which models it works with, and what values it accepts.


Adding a parameter in Postman

Here's a quick rundown of these key configuration parameters:

  • temperature controls creativity and randomness in responses.
  • top_p controls vocabulary diversity.
  • top_k controls how many candidate words the model considers when generating a response. For example, setting top_k to 64 tells the model to pick only from the 64 most likely words.
  • max_output_tokens controls the maximum length of the response. In this example, it's limited to 100 tokens.

And here's what you get after clicking Send.


Output result from Gemini API in Postman

As you can see, the max_output_tokens parameter truncated the response, confirming that your settings are working as intended.

Step 8: Switching Between AI Models

So far, we've been talking to the latest version of Gemini 1.5 Flash, but other models are available through this API. You can switch between them by changing the model name in your endpoint URL.

In Postman's request input field, find the name of the Gemini model you're currently using.


Change the AI model in Postman

Replace it with a different model name. You can find a complete list on the documentation page, or copy and paste one of these:

  • gemini-1.5-pro-latest
  • gemini-1.0-pro

Keep the forward slash at the beginning and colon at the end intact in your endpoint URL. After clicking Send, your prompt will go to the new model and you may see responses of varying quality.

Step 9: Embedding Gemini Into Your Application

You can integrate Gemini's core functionality into your application using Google AI Studio and the free API tier. Check your no-code app builder's or internal tool's documentation for instructions on connecting an API, and you'll be ready to set up calls immediately. For example, here's a guide on connecting an API using FlutterFlow.

However, if you want to deeply integrate Gemini models into your app and protect your data, using Vertex AI through Google Cloud Platform is your best bet. This route requires programming knowledge or hiring an expert to set up the endpoints and API calls. After that, you can add those configurations to your product or application.


Related Articles

n8n tutorial - Lesson 20: Error Handling in n8n: Build a Production Error Workflow

n8n tutorial - Lesson 20: Error Handling in n8n: Build a Production Error Workflow

Hi everyone, in this session of the n8n Workflow Automation Tutorial series, we cover n8n error handling — specifically how to build a centralized Error Handler workflow that sends automatic Telegram alerts whenever any of your production workflows fail. This is a must-have pattern before you scale beyond a handful of active workflows.

How to do:

Step 1 — Create the Error Handler Workflow

Build a new workflow named T6-B1-Error-Handler with 3 nodes connected in sequence.
  1. Create a new workflow and name it T6-B1-Error-Handler.
  2. Add the Error Trigger node — this is an n8n built-in node that automatically receives the execution context whenever a linked workflow fails.
  3. The Error Trigger provides four key fields from the failed execution:
    • workflow.name — name of the failed workflow
    • execution.lastNodeExecuted — the node where execution stopped
    • execution.error.message — the error message text
    • execution.url — direct link to the failed execution in your n8n instance

Step 2 — Add a Code Node to Format the Error Message

Add a Code node after the Error Trigger to build a clean, readable Markdown message for Telegram.
  1. Add a Code node and name it Format Error Message.
  2. Extract the four fields from the error context: workflow.name, execution.lastNodeExecuted, execution.error.message, and execution.url.
  3. Truncate the error message if it exceeds 400 characters — long error strings break Telegram message formatting.
  4. Build the output as a Markdown legacy string with this structure:
    • A header line (e.g., ⚠️ Workflow Failed)
    • Workflow name
    • Last node that failed
    • Timestamp
    • Truncated error message
    • Clickable execution URL link

Tip — Use Markdown legacy mode in Telegram (not MarkdownV2). MarkdownV2 requires escaping many special characters that commonly appear in error messages, which causes send failures in production.

Step 3 — Add the Telegram Send Node

Add a Telegram node as the final step to deliver the alert.
  1. Add a Telegram node connected after Format Error Message.
  2. Set Resource to Message and Operation to Send Message.
  3. Set the Text field to reference the formatted message output from the Code node.
  4. Set Parse Mode to Markdown (legacy format).
  5. Ensure Append Attribution is turned OFF — attribution adds extra text to the message that pollutes alert readability.
  6. Make sure the workflow is set to Active — the Error Handler must be active to receive triggered events from other workflows.

Step 4 — Apply the Error Workflow Setting to Your Production Workflows

Link each of your production workflows to T6-B1-Error-Handler through their individual settings.
  1. Open each workflow you want to protect (in this session: 8 workflows from Week 5 — T5-B2, T5-B2b, T5-B3, T5-B3b, T5-B4, T5-B5, T5-B6, T5-B7).
  2. Click the Settings ⚙️ icon inside the workflow editor.
  3. Find the Error Workflow dropdown and select T6-B1-Error-Handler.
  4. Click Save.
  5. Repeat for all 8 workflows — this setting works for both Active workflows and Manual workflows.

Tip — You only need one shared Error Handler workflow for all your workflows. You do not need a separate error handler per workflow. This centralized pattern keeps alert management simple and consistent.

Step 5 — Test the Error Workflow with a Production Execution

Testing the Error Workflow requires a production execution — the standard test UI will not trigger it.
  1. Create a temporary test workflow named T6-B1-Test-Trigger-Error.
  2. Do NOT use a Manual Trigger for this test — manually running a workflow via the Execute Workflow button (the flask 🧪 icon) runs in test mode, which does not trigger the Error Workflow.
  3. Instead, use a Schedule Trigger set to run every 1 minute.
  4. Deliberately build the workflow so it will fail (e.g., reference a node that does not exist or misconfigure a required field).
  5. Set the test workflow to Active.
  6. Wait up to 1 minute for the Schedule Trigger to fire a production execution.
  7. Confirm the failure appears in Executions without the flask 🧪 icon — no flask means it was a production execution.
  8. Verify the Telegram alert arrives with the correct workflow name, failed node, error message, and execution URL.
  9. After the test passes, toggle the test workflow Active OFF or delete it to prevent repeated alerts every minute.

Production tip — In the n8n Executions list, executions with a flask 🧪 icon are test executions and will never trigger the Error Workflow. Executions without that icon are production executions and will trigger it. Always check for the flask icon when debugging why your Error Workflow is not firing.

Key Lessons from This Session

  1. Error Workflow only fires on production executions. Test mode (flask 🧪 icon, triggered via the Execute Workflow UI button) does not trigger the Error Workflow — only Schedule Triggers, Webhooks, or other external production triggers do.
  2. One Error Handler covers all workflows. You apply the same T6-B1-Error-Handler to as many source workflows as needed via Settings ⚙️ → Error Workflow — no duplication required.
  3. Truncate long error messages in code. Cap error message text at 400 characters before sending to Telegram — raw error messages can be very long and break message formatting.
  4. Use Markdown legacy, not MarkdownV2, for Telegram alerts. Error messages contain special characters that MarkdownV2 requires escaping, which causes frequent send failures.
  5. The Error Handler workflow must be Active. If the Error Handler workflow is inactive, it will not receive any triggered events regardless of how many source workflows are linked to it.
  6. Clean up test workflows after verification. A Schedule-triggered test workflow set to every 1 minute will keep firing and generating alerts — always toggle it off or delete it immediately after the test passes.
  7. The Error Trigger node provides all execution context automatically. You do not need to pass data manually — workflow.name, execution.url, execution.error.message, and execution.lastNodeExecuted are all available directly in the node output.

Conclusion:

In this n8n tutorial, we built a production-grade error handling pattern using a 3-node Error Handler workflow — Error Trigger, Code formatter, and Telegram alert — and applied it to 8 active production workflows through the Settings → Error Workflow option. The most important insight from this session is the distinction between test executions and production executions: the Error Workflow will only fire in production, so always validate it with a Schedule Trigger rather than the manual Execute button. This error handling setup is now the safety net for the entire n8n workflow automation system built across Week 5, and the next session moves on to the Sub-workflow pattern using the Execute Workflow node.

If you have any questions, feel free to leave a comment below. Thank you!

Tags: n8n error handling, n8n tutorial, n8n workflow automation, n8n error trigger, n8n telegram alert, n8n production workflow, n8n error workflow setup, workflow monitoring n8n

Maybe you are interested!

n8n tutorial - Lesson 19: n8n Weekly Digest: Aggregate All Your Data in One Report

n8n tutorial - Lesson 19: n8n Weekly Digest: Aggregate All Your Data in One Report

Hi everyone, in this session of the n8n Workflow Automation Tutorial series, we're building an n8n weekly digest workflow that pulls data from four Google Sheets, aggregates everything with a Code node, generates an AI summary using Claude, and delivers it to Telegram every Sunday at 7 PM. This is the capstone workflow for the YouTube Assistant project — and it's a great real-world example of parallel branching, cross-node aggregation, and LLM-powered reporting in a single automated pipeline.

How to do:

Step 1 — Create the Workflow and Set the Schedule Trigger

Create a new workflow named T5-B7-Weekly-Digest and configure a cron-based schedule to fire every Sunday at 19:00.
  1. In n8n, click + New Workflow and name it T5-B7-Weekly-Digest.
  2. Add a Schedule Trigger node and set the mode to Cron.
  3. Enter the cron expression 0 19 * * 0 — this means every Sunday at 19:00.
  4. Save the node. This single trigger will fan out into four parallel branches in the next step.

Tip — The cron expression 0 19 * * 0 breaks down as: minute=0, hour=19, any day-of-month, any month, weekday=0 (Sunday). Double-check your server timezone in n8n settings so the trigger fires at the correct local time.

Step 2 — Add Four Parallel Google Sheets Branches

Connect four separate Google Sheets nodes directly to the Schedule Trigger, one for each metrics sheet, so all four reads execute in parallel.
  1. Add a Google Sheets node, name it Get Comments Stats, and connect it to the Schedule Trigger.
  2. Configure it:
    • Credential: Google Sheets Personal (shared across all four nodes)
    • Spreadsheet: select T5-Comments-Queue
    • Operation: Get Rows
    • Always Output Data: ON
  3. Duplicate the node three times and rename them:
    • Get Title Stats → Sheet: T5-Title-Suggestions
    • Get Performance Stats → Sheet: T5-Performance-Snapshots
    • Get Metadata Stats → Sheet: T5-Video-Metadata
  4. Connect all four nodes directly from the Schedule Trigger output — they run in parallel, not in sequence.

Note — Always Output Data = ON is the correct setting here because these nodes act as reference lookups — you want the workflow to continue even if a sheet has no rows yet. This is different from trigger-style nodes where you want AOD = OFF to avoid empty runs.

Step 3 — Merge All Four Branches

Add a Merge node to collect all four streams into a single flow before aggregation.
  1. Add a Merge node and name it Merge All Sheets.
  2. Set Mode to Append — this stacks all rows from all four sheets into one item list.
  3. Connect all four Google Sheets nodes (Get Comments Stats, Get Title Stats, Get Performance Stats, Get Metadata Stats) as inputs to this Merge node.
  4. Verify in test mode that the merged output shows approximately 34 items (the combined row count from all four sheets).

Tip — The Append merge mode is the right choice when you don't need to join rows by a key — you just want all items stacked. The next Code node will use cross-node references to read each sheet's data individually, so the merged list here is mainly a trigger to pass execution forward.

Step 4 — Aggregate Stats with a Code Node Using Cross-Node References

Add a Code node that reads each sheet independently via cross-node references and builds a single structured summary object.
  1. Add a Code node named Aggregate Stats and connect it to Merge All Sheets.
  2. Set Mode to Run Once for All Items.
  3. In the code editor, reference each sheet's data using the cross-node pattern:
    • const comments = $('Get Comments Stats').all();
    • const titles = $('Get Title Stats').all();
    • const performance = $('Get Performance Stats').all();
    • const metadata = $('Get Metadata Stats').all();
  4. Build a nested summary object with these four sections:
    • comments: total, by_category, by_status
    • titles: total, by_status
    • performance: video_count, total_view, total_like, videos (list)
    • metadata: total, by_status
  5. For the performance section, sort rows to get the latest snapshot per video before summing totals — use a reduce or sort + dedup pattern in JavaScript.
  6. Add a week_label field formatted as DD/MM/YYYY using JavaScript's Date object to label the digest by week.
  7. Return return [{ json: summary }]; — a single item containing the full aggregated object.

Production tip — Always use $('Node Name').all() cross-node references inside a Code node running "once for all items" when you need to aggregate across multiple upstream branches. Never use .find() in expression fields for lookups — build an O(1) lookup map in Code instead.

Step 5 — Generate the AI Weekly Digest with Claude

Add a Basic LLM Chain node connected to the Anthropic API to turn the aggregated stats object into a formatted Telegram message.
  1. Add a Basic LLM Chain node named Weekly Digest and connect it to Aggregate Stats.
  2. Set the model to Claude Haiku 4.5 (consistent with the rest of the project).
  3. Set Temperature to 0.3 and Max Tokens to 2500.
  4. Write the system/user prompt using an XML 5-block structure:
    • Block 1 — Role: define the assistant as a YouTube analytics reporter
    • Block 2 — Data: inject the aggregated stats via {{ $json.summary }} or the relevant field
    • Block 3 — Format rules: specify telegram_markdown_legacy — single asterisk *bold*, no V2 syntax
    • Block 4 — Digest structure: list the 7 required sections (e.g., overview, comments, titles, performance, metadata, highlights, next week)
    • Block 5 — Constraints: language, tone, emoji use
  5. Test the node. If you get an authentication error, check your Anthropic API balance — a $0 balance silently stops all active workflows using Haiku.

Note — If the Claude API returns an error due to insufficient credit, top up your Anthropic account ($5–10 is enough to cover several weeks of digest runs) and re-run the workflow. This is an external dependency, not a design flaw — but it means you should monitor your Anthropic console balance regularly and consider enabling auto-recharge if available.

Step 6 — Send the Digest to Telegram

Add a Telegram node to deliver the AI-generated digest message every Sunday evening.
  1. Add a Telegram node named Send Weekly Digest and connect it to Weekly Digest.
  2. Select your existing Telegram Bot credential (reused from earlier workflows in this series).
  3. Set Chat ID to your target Telegram group or personal chat ID.
  4. Set Parse Mode to Markdown (legacy — single asterisk format, not MarkdownV2).
  5. In the Message field, reference the LLM output: {{ $json.text }} or the field your LLM Chain outputs.
  6. Set Append Attribution to OFF to keep the message clean.

Tip — Always use Telegram Markdown legacy (single * for bold, single _ for italic) when your LLM is prompted to produce Telegram-formatted text. MarkdownV2 requires escaping many special characters, which makes AI output unreliable without a post-processing step.

Step 7 — Activate the Workflow

With all 9 nodes connected and tested, activate the workflow so it runs automatically every Sunday at 19:00.
  1. Click the Inactive toggle in the top-right corner of the workflow editor to set it to Active.
  2. Verify the full node chain is connected:
    • Schedule Trigger → 4× Google Sheets nodes (parallel)
    • Google SheetsMerge All Sheets
    • Merge All SheetsAggregate Stats (Code)
    • Aggregate StatsWeekly Digest (LLM Chain)
    • Weekly DigestSend Weekly Digest (Telegram)
  3. Check Executions the following Monday morning to confirm the Sunday run completed without red errors.
  4. If the workflow ran during an Anthropic credit outage, top up the balance and manually trigger a test run to confirm recovery.

Production tip — After activating any workflow that depends on a paid external API (Anthropic, OpenAI, etc.), bookmark the provider's billing console and check it at least once a week. A $0 balance will silently stop all active workflows using that provider — there is no built-in n8n alert for third-party API credit exhaustion.

Key Lessons from This Session

  1. Parallel branching from a single trigger. Connect multiple nodes directly to one trigger node to read from several data sources simultaneously — this is faster and cleaner than chaining them sequentially.
  2. Use Merge (Append) to reunite parallel branches. Append mode stacks all items from all inputs without needing a join key — ideal when you plan to aggregate in the next Code node anyway.
  3. Cross-node references in Code nodes unlock multi-source aggregation. Use $('Node Name').all() inside a "Run Once" Code node to read each source independently and build a structured summary object.
  4. Always Output Data = ON for lookup/reference nodes. Set AOD=ON on any Google Sheets node acting as a data source so the workflow continues even when a sheet is temporarily empty.
  5. Sort and dedup snapshot data before summing. For lifetime stats stored as snapshots, always pick the latest snapshot per video before calculating totals — otherwise you double-count historical rows.
  6. Telegram Markdown legacy: single asterisk only. Prompt your LLM to use *bold* (one asterisk), not **bold** — Telegram legacy parse mode does not support double asterisks.
  7. Monitor third-party API credit balances regularly. A depleted Anthropic (or OpenAI) balance silently kills every active workflow using that credential — check balances on a set schedule and enable auto-recharge if available.
  8. Vietnamese (and other CJK-adjacent) tokens are ~3× heavier than English. If your AI output language is not English, set Max Tokens high enough to avoid truncated messages — 2500 is a safe floor for a 7-section digest.

Conclusion:

In this n8n tutorial, we built a complete n8n weekly digest workflow that uses parallel Google Sheets branches, a cross-node Code aggregator, a Claude LLM chain, and a Telegram sender to deliver a structured weekly report every Sunday — all fully automated. This pattern of branching + merging + Code aggregation is one of the most reusable patterns in n8n workflow automation, applicable any time you need to consolidate data from multiple sources into a single report. The next session opens Week 6: a multi-channel Content Factory that connects Blog, YouTube, Email, and Word output from a single idea using sub-workflows and error handling.

If you have any questions, feel free to leave a comment below. Thank you!

Tags: n8n weekly digest workflow, n8n tutorial, n8n workflow automation, n8n Google Sheets aggregate, n8n Telegram bot, n8n Code node cross-node reference, n8n LLM chain Claude, n8n parallel branches merge

Maybe you are interested!

Copyright © 2016 QTitHow All Rights Reserved