Skip to main content

Convert GitHub code commits to LinkedIn posts with Gemini AI and code image generation

Workflow preview

Workflow preview
100%
Convert GitHub code commits to LinkedIn posts with Gemini AI and code image generation preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

Turn your code commits into engaging social media content automatically. This workflow monitors a GitHub repository, uses AI to write a LinkedIn post about your changes, generates a beautiful "Mac ...

Best for

  • Social Media automation workflows
  • Multimodal AI automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.stickynote, n8n-nodes-base.githubtrigger, n8n-nodes-base.github, n8n-nodes-base.linkedin, @n8n/n8n-nodes-langchain.agent, n8n-nodes-base.code, n8n-nodes-base.httprequest, n8n-nodes-base.merge

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Marco Florez.

Original n8n.io source

1.1 Workflow description

Title
Convert GitHub code commits to LinkedIn posts with Gemini AI and code image generation
Workflow name
Convert GitHub code commits to LinkedIn posts with Gemini AI and code image generation

Turn your code commits into engaging social media content automatically. This workflow monitors a GitHub repository, uses AI to write a LinkedIn post about your changes, generates a beautiful "Mac-window" style image of your code, and publishes it all to LinkedIn.

How it works

  1. GitHub Trigger: Watches for new push events in your selected repository.
  2. AI Analysis: Passes the code changes to an LLM (via LangChain) to write a professional LinkedIn post and select the best code snippet.
  3. Image Generation: Creates a custom HTML view of your code (with syntax highlighting and window controls) and converts it to an image using the HCTI API.
  4. Hosting & Posting: Uploads the generated image back to GitHub for hosting, then combines the text and image to publish a live post on LinkedIn.

Set up steps

  1. Configure Credentials: You will need credentials for:
    • GitHub (OAuth2 or Access Token)
    • LinkedIn (OAuth2)
    • OpenRouter (or swap the model node for OpenAI/Anthropic)
    • HCTI.io (for the HTML-to-Image conversion)
  2. Update GitHub Nodes:
    • In the Trigger node: Set your Owner and Repository.
    • In the File Download node: Set the same Owner and Repository.
    • In the Upload Image node: Set the target repo where you want images stored.
  3. Update LinkedIn Node:
    • Add your LinkedIn Person URN in the Person field.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Main Info

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 2 - Section 1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 3 - Section 2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 4 - Section 3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 5 - Section 4

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 6 - Github Trigger1

Type / Role
n8n-nodes-base.githubTrigger - githubTrigger
Config choices
Version 1

Block 7 - GitHub File Download

Type / Role
n8n-nodes-base.github - github
Config choices
Version 1.1

Block 8 - Post to LinkedIn

Type / Role
n8n-nodes-base.linkedIn - linkedIn
Config choices
Version 1

Block 9 - LinkedIn Content Creator

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 2

Block 10 - Create Code HTML

Type / Role
n8n-nodes-base.code - code
Config choices
Version 1

Block 11 - Generate Code Image

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 12 - GET the genarted Image

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 13 - Upload to Image Repo

Type / Role
n8n-nodes-base.github - github
Config choices
Version 1.1

Block 14 - Merge

Type / Role
n8n-nodes-base.merge - merge
Config choices
Version 3.2

Block 15 - Extract Modified Files

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 16 - Extract from File

Type / Role
n8n-nodes-base.extractFromFile - extractFromFile
Config choices
Version 1

Block 17 - Structured Output Parser

Type / Role
@n8n/n8n-nodes-langchain.outputParserStructured - outputParserStructured
Config choices
Version 1.3

Block 18 - Edit Fields

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 19 - OpenRouter Chat Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenRouter - lmChatOpenRouter
Config choices
Version 1

Block 20 - Extract from File1

Type / Role
n8n-nodes-base.extractFromFile - extractFromFile
Config choices
Version 1.1

3. Summary Table

Workflow Convert GitHub code commits to LinkedIn posts with Gemini AI and code image generation
Complexity advanced
Nodes 20
Categories Social Media, Multimodal AI
Author Marco Florez
Published 25 Dec 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/12131/12131.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Convert GitHub code commits to LinkedIn posts with Gemini AI and code image generation do?

Turn your code commits into engaging social media content automatically. This workflow monitors a GitHub repository, uses AI to write a LinkedIn post about your changes, generates a beautiful "Mac ...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Social Media, Multimodal AI use case.