Back to Catalog

Rewrite viral LinkedIn posts in your voice with Google Gemini and Telegram approval

ConnectSafelyConnectSafely
242 views
2/3/2026
Official Page

Rewrite viral LinkedIn posts in your voice with AI and Telegram approval using Google Gemini

Who's it for

This workflow is designed for LinkedIn creators, personal brand builders, thought leaders, and content marketers who want to consistently create engaging content without starting from scratch. Perfect for professionals who admire viral posts from others but want to adapt those ideas to their own unique voice and style.

If you're struggling to maintain a consistent posting schedule, looking for content inspiration, or want to repurpose trending ideas while keeping your authentic voice, this automation handles the creative heavy lifting while giving you full control over what gets published.

How it works

The workflow transforms viral LinkedIn posts into personalized content that matches your writing style, complete with AI-generated images, all controlled through Telegram.

The process flow:

  1. Send any LinkedIn post URL to your Telegram bot
  2. Security check validates your Telegram user ID
  3. ConnectSafely.ai scrapes the original post content and engagement metrics
  4. Your custom persona profile is loaded (tone, phrases, formatting preferences)
  5. Google Gemini AI rewrites the post to match YOUR voice
  6. Gemini generates a professional, on-brand image for the post
  7. Preview is sent to Telegram for your review
  8. Approve or reject with a simple reply
  9. On approval, the post goes live on LinkedIn automatically

Setup steps

Step 1: Create a Telegram Bot

  1. Open Telegram and search for @BotFather
  2. Send /newbot and follow the prompts to create your bot
  3. Save the API token provided by BotFather
  4. Get your Telegram User ID by messaging @userinfobot

Step 2: Configure Telegram Credentials in n8n

  1. Go to Credentials β†’ Add Credential β†’ Telegram API
  2. Paste your bot token from BotFather
  3. Save the credential
  4. Update all Telegram nodes to use this credential

Step 3: Set Up Security Check

  1. Open the πŸ”’ Security Check node
  2. Replace YOUR_TELEGRAM_USER_ID with your actual Telegram user ID
  3. This ensures only YOU can trigger the workflow

Step 4: Configure ConnectSafely.ai API

  1. Sign up at ConnectSafely.ai
  2. Navigate to Settings β†’ API Keys in your dashboard
  3. Generate a new API key
  4. In n8n, go to Credentials β†’ Add Credential β†’ ConnectSafely API
  5. Paste your API key and save
  6. Connect this credential to the πŸ” Scrape LinkedIn Post node

Step 5: Configure Google Gemini API

  1. Go to Google AI Studio
  2. Create or select a project
  3. Generate an API key
  4. In n8n, go to Credentials β†’ Add Credential β†’ Google Gemini (PaLM) API
  5. Paste your API key and save
  6. Connect this credential to both:
    • Google Gemini Chat Model node
    • Generate an image node

Step 6: Connect Your LinkedIn Account

  1. In n8n, go to Credentials β†’ Add Credential β†’ LinkedIn OAuth2 API
  2. Follow the OAuth flow to connect your LinkedIn account
  3. Connect this credential to the Create LinkedIn Post node
  4. Update the person parameter with your LinkedIn Person ID (URN)

Step 7: Customize Your Persona

  1. Open the πŸ‘€ Load Your Persona node
  2. Edit the PERSONA object to match YOUR writing style:
    • Update name with your name
    • Modify expertiseAreas with your topics
    • Adjust commonPhrases with phrases you actually use
    • Set preferredEmojis to your favorites
    • Customize styleNotes to capture your unique voice

Step 8: Activate the Workflow

  1. Save your workflow
  2. Toggle the workflow to Active
  3. Your Telegram bot is now ready to receive LinkedIn URLs

Customization

Persona Customization

The πŸ‘€ Load Your Persona node is where you define your unique voice. Key areas to customize:

| Field | Description | Example | |-------|-------------|---------| | tone | Overall communication style | "Professional yet approachable, data-driven" | | voice | Perspective and personality | "First-person, authentic, vulnerable" | | formatting | Structure preferences | "Short paragraphs, emoji bullets, line breaks" | | hooks | Opening style | "Start with contrarian takes or personal stories" | | expertiseAreas | Your niche topics | ["SaaS growth", "Leadership", "Remote work"] | | commonPhrases | Signature expressions | ["Here's the truth:", "I learned this the hard way:"] |

Image Generation

The πŸ“ Create Image Prompt node generates the image prompt. Modify the style parameters to match your brand:

  • Current style: Modern, clean, corporate, vector art
  • Customize: Change to photography, illustrations, or abstract visuals

Post Length

In the persona configuration, adjust postLength:

  • "short" - Quick insights (under 500 characters)
  • "medium" - Standard posts (500-1500 characters)
  • "long" - Deep dives (1500-3000 characters)

AI Model Selection

The workflow uses gemini-2.5-pro for text. You can switch to other models in the Google Gemini Chat Model node based on your needs.


Requirements

| Requirement | Details | |-------------|---------| | n8n Version | 1.0+ recommended | | Telegram Bot | Created via @BotFather | | ConnectSafely.ai Account | API key required | | Google AI Studio Account | Gemini API key required | | LinkedIn Account | OAuth2 connected in n8n | | Community Node | n8n-nodes-connectsafely-ai (self-hosted only) |

⚠️ Note: This workflow uses the ConnectSafely community node, which requires a self-hosted n8n instance.


Use cases

  • Content Repurposing: Transform competitor or industry leader posts into your own perspective
  • Consistent Posting: Maintain a regular posting schedule without content creation burnout
  • Style Consistency: Ensure every post matches your established personal brand
  • Trend Riding: Quickly create content around viral topics while they're still relevant
  • A/B Testing: Test different approaches by approving or rejecting variations

Troubleshooting

Common Issues & Solutions

Issue: Bot not responding to messages

  • Solution: Verify the Telegram webhook is active; check the Telegram Trigger node is properly configured

Issue: "Profile not found" from ConnectSafely.ai

  • Solution: Ensure the LinkedIn URL is complete and public. Some posts on private profiles can't be scraped

Issue: Image generation fails

  • Solution: Verify your Gemini API key has access to image generation models. Check quota limits in Google AI Studio

Issue: LinkedIn post fails to publish

  • Solution: Confirm your LinkedIn OAuth2 credentials are valid and haven't expired. Re-authorize if needed

Issue: AI generates posts that don't match your style

  • Solution: Be more specific in your persona configuration. Add more example phrases and detailed style notes

Issue: Security check blocks your messages

  • Solution: Double-check your Telegram User ID is correctly entered (must be a number, not username)

Documentation & Resources

Official Documentation

Support


Connect With Us

Stay updated with the latest automation tips, LinkedIn strategies, and platform updates:


Need Custom Workflows?

Looking to build sophisticated LinkedIn automation workflows tailored to your business needs?

Contact our team for custom automation development, strategy consulting, and enterprise solutions.

We specialize in:

  • Multi-channel engagement workflows
  • AI-powered personalization at scale
  • Lead scoring and qualification automation
  • CRM integration and data synchronization
  • Custom reporting and analytics pipelines

Rewrite Viral LinkedIn Posts in Your Voice with Google Gemini and Telegram Approval

This n8n workflow automates the process of rewriting viral LinkedIn posts to match your unique voice, leveraging Google Gemini for AI-powered content generation and Telegram for approval before publishing. It's designed for content creators, marketers, and professionals who want to maintain a consistent brand voice on LinkedIn without manual content creation from scratch.

What it does

  1. Triggers on Telegram Message: The workflow starts when a new message is received in a configured Telegram chat. This message is expected to contain the URL or content of a viral LinkedIn post you want to rewrite.
  2. Analyzes and Rewrites with Google Gemini: The AI Agent, powered by Google Gemini, takes the input LinkedIn post and rewrites it in a specified voice or style. This could involve extracting key points, rephrasing, or adding a personal touch.
  3. Formats Output: The rewritten post is then processed by a Structured Output Parser and an "Edit Fields" (Set) node to ensure it's in a clean, usable format for review.
  4. Sends for Approval via Telegram: The rewritten post is sent back to the Telegram chat for your review and approval.
  5. Conditional Publishing to LinkedIn:
    • If you approve the post in Telegram (e.g., by sending a specific keyword like "yes" or "approve"), the workflow proceeds to publish the rewritten content to your LinkedIn profile.
    • If the post is not approved, the workflow ends, allowing you to iterate on the content.

Prerequisites/Requirements

  • n8n Instance: A running instance of n8n.
  • Telegram Bot Token: A Telegram bot configured and its API token for sending and receiving messages.
  • Google Gemini API Key: Access to the Google Gemini API for AI content generation.
  • LinkedIn Account: A LinkedIn account with appropriate permissions to post content.
  • Langchain Nodes: Ensure the @n8n/n8n-nodes-langchain package is installed in your n8n instance.

Setup/Usage

  1. Import the Workflow: Import the provided JSON into your n8n instance.
  2. Configure Credentials:
    • Telegram Trigger & Telegram Node: Set up your Telegram Bot credential. You'll need your bot token.
    • Google Gemini Chat Model & Google Gemini Node: Configure your Google Gemini API key credential.
    • LinkedIn Node: Set up your LinkedIn credential, which will likely involve OAuth authentication to grant n8n permission to post on your behalf.
  3. Customize Nodes:
    • Telegram Trigger (Node 50): Ensure it's listening to the correct chat ID or group where you'll send the initial LinkedIn post.
    • AI Agent (Node 1119):
      • Configure the "Google Gemini Chat Model" (Node 1262) to use your Gemini credential.
      • Crucially, define the prompt for the AI Agent. This prompt should instruct Gemini on how to rewrite the LinkedIn post, including your desired voice, tone, and any specific elements to include or exclude. For example: "Rewrite the following LinkedIn post in a concise, professional, yet slightly humorous tone, focusing on actionable insights for [your industry/niche]. Ensure it's under 1300 characters."
    • Structured Output Parser (Node 1179): This node is likely set up to parse the AI Agent's output into a structured format. Review its configuration to ensure it matches the expected output from Gemini.
    • Edit Fields (Set) (Node 38): This node can be used to further refine or extract specific fields from the rewritten content before sending it for approval.
    • Telegram (Node 49): Configure the message template to send the rewritten post clearly for approval. You might include buttons for "Approve" and "Reject".
    • If (Node 20): Configure the condition to check for your approval message from Telegram. For instance, {{ $json.text === 'Approve' }}.
    • LinkedIn (Node 367): Configure this node to publish the approved content to your LinkedIn profile. Specify the content field from the previous nodes.
  4. Activate the Workflow: Once configured, activate the workflow.

Now, when you send a LinkedIn post (or its content) to your Telegram bot, it will be rewritten by Google Gemini, sent back for your approval, and then automatically published to LinkedIn if you approve it.

Related Templates

AI multi-agent executive team for entrepreneurs with Gemini, Perplexity and WhatsApp

This workflow is an AI-powered multi-agent system built for startup founders and small business owners who want to automate decision-making, accountability, research, and communication, all through WhatsApp. The β€œvirtual executive team,” is designed to help small teams to work smarter. This workflow sends you market analysis, market and sales tips, It can also monitor what your competitors are doing using perplexity (Research agent) and help you stay a head, or make better decisions. And when you feeling stuck with your start-up accountability director is creative enough to break the barrier 🎯 Core Features πŸ§‘β€πŸ’Ό 1. President (Super Agent) Acts as the main controller that coordinates all sub-agents. Routes messages, assigns tasks, and ensures workflow synchronization between the AI Directors. πŸ“Š 2. Sales & Marketing Director Uses SerpAPI to search for market opportunities, leads, and trends. Suggests marketing campaigns, keywords, or outreach ideas. Can analyze current engagement metrics to adjust content strategy. πŸ•΅οΈβ€β™€οΈ 3. Business Research Director Powered by Perplexity AI for competitive and market analysis. Monitors competitor moves, social media engagement, and product changes. Provides concise insights to help the founder adapt and stay ahead. ⏰ 4. Accountability Director Keeps the founder and executive team on track. Sends motivational nudges, task reminders, and progress reports. Promotes consistency and discipline β€” key traits for early-stage success. πŸ—“οΈ 5. Executive Secretary Handles scheduling, email drafting, and reminders. Connects with Google Calendar, Gmail, and Sheets through OAuth. Automates follow-ups, meeting summaries, and notifications directly via WhatsApp. πŸ’¬ WhatsApp as the Main Interface Interact naturally with your AI team through WhatsApp Business API. All responses, updates, and summaries are delivered to your chat. Ideal for founders who want to manage operations on the go. βš™οΈ How It Works Trigger: The workflow starts from a WhatsApp Trigger node (via Meta Developer Account). Routing: The President agent analyzes the incoming message and determines which Director should handle it. Processing: Marketing or sales queries go to the Sales & Marketing Director. Research questions are handled by the Business Research Director. Accountability tasks are assigned to the Accountability Director. Scheduling or communication requests are managed by the Secretary. Collaboration: Each sub-agent returns results to the President, who summarizes and sends the reply back via WhatsApp. Memory: Context is maintained between sessions, ensuring personalized and coherent communication. 🧩 Integrations Required Gemini API – for general intelligence and task reasoning Supabase- for RAG and postgres persistent memory Perplexity API – for business and competitor analysis SerpAPI – for market research and opportunity scouting Google OAuth – to connect Sheets, Calendar, and Gmail WhatsApp Business API – for message triggers and responses πŸš€ Benefits Acts like a team of tireless employees available 24/7. Saves time by automating research, reminders, and communication. Enhances accountability and strategy consistency for founders. Keeps operations centralized in a simple WhatsApp interface. 🧰 Setup Steps Create API credentials for: WhatsApp (via Meta Developer Account) Gemini, Perplexity, and SerpAPI Google OAuth (Sheets, Calendar, Gmail) Create a supabase account at supabase Add the credentials in the corresponding n8n nodes. Customize the system prompts for each Director based on your startup’s needs. Activate and start interacting with your virtual executive team on WhatsApp. Use Case You are a small organisation or start-up that can not afford hiring; marketing department, research department and secretar office, then this workflow is for you πŸ’‘ Need Customization? Want to tailor it for your startup or integrate with CRM tools like Notion or HubSpot? You can easily extend the workflow or contact the creator for personalized support. Consider adjusting the system prompt to suite your business

ShadrackBy Shadrack
331

Auto-reply & create Linear tickets from Gmail with GPT-5, gotoHuman & human review

This workflow automatically classifies every new email from your linked mailbox, drafts a personalized reply, and creates Linear tickets for bugs or feature requests. It uses a human-in-the-loop with gotoHuman and continuously improves itself by learning from approved examples. How it works The workflow triggers on every new email from your linked mailbox. Self-learning Email Classifier: an AI model categorizes the email into defined categories (e.g., Bug Report, Feature Request, Sales Opportunity, etc.). It fetches previously approved classification examples from gotoHuman to refine decisions. Self-learning Email Writer: the AI drafts a reply to the email. It learns over time by using previously approved replies from gotoHuman, with per-classification context to tailor tone and style (e.g., different style for sales vs. bug reports). Human Review in gotoHuman: review the classification and the drafted reply. Drafts can be edited or retried. Approved values are used to train the self-learning agents. Send approved Reply: the approved response is sent as a reply to the email thread. Create ticket: if the classification is Bug or Feature Request, a ticket is created by another AI agent in Linear. Human Review in gotoHuman: How to set up Most importantly, install the gotoHuman node before importing this template! (Just add the node to a blank canvas before importing) Set up credentials for gotoHuman, OpenAI, your email provider (e.g. Gmail), and Linear. In gotoHuman, select and create the pre-built review template "Support email agent" or import the ID: 6fzuCJlFYJtlu9mGYcVT. Select this template in the gotoHuman node. In the "gotoHuman: Fetch approved examples" http nodes you need to add your formId. It is the ID of the review template that you just created/imported in gotoHuman. Requirements gotoHuman (human supervision, memory for self-learning) OpenAI (classification, drafting) Gmail or your preferred email provider (for email trigger+replies) Linear (ticketing) How to customize Expand or refine the categories used by the classifier. Update the prompt to reflect your own taxonomy. Filter fetched training data from gotoHuman by reviewer so the writer adapts to their personalized tone and preferences. Add more context to the AI email writer (calendar events, FAQs, product docs) to improve reply quality.

gotoHumanBy gotoHuman
353

πŸŽ“ How to transform unstructured email data into structured format with AI agent

This workflow automates the process of extracting structured, usable information from unstructured email messages across multiple platforms. It connects directly to Gmail, Outlook, and IMAP accounts, retrieves incoming emails, and sends their content to an AI-powered parsing agent built on OpenAI GPT models. The AI agent analyzes each email, identifies relevant details, and returns a clean JSON structure containing key fields: From – sender’s email address To – recipient’s email address Subject – email subject line Summary – short AI-generated summary of the email body The extracted information is then automatically inserted into an n8n Data Table, creating a structured database of email metadata and summaries ready for indexing, reporting, or integration with other tools. --- Key Benefits βœ… Full Automation: Eliminates manual reading and data entry from incoming emails. βœ… Multi-Source Integration: Handles data from different email providers seamlessly. βœ… AI-Driven Accuracy: Uses advanced language models to interpret complex or unformatted content. βœ… Structured Storage: Creates a standardized, query-ready dataset from previously unstructured text. βœ… Time Efficiency: Processes emails in real time, improving productivity and response speed. *βœ… Scalability: Easily extendable to handle additional sources or extract more data fields. --- How it works This workflow automates the transformation of unstructured email data into a structured, queryable format. It operates through a series of connected steps: Email Triggering: The workflow is initiated by one of three different email triggers (Gmail, Microsoft Outlook, or a generic IMAP account), which constantly monitor for new incoming emails. AI-Powered Parsing & Structuring: When a new email is detected, its raw, unstructured content is passed to a central "Parsing Agent." This agent uses a specified OpenAI language model to intelligently analyze the email text. Data Extraction & Standardization: Following a predefined system prompt, the AI agent extracts key information from the email, such as the sender, recipient, subject, and a generated summary. It then forces the output into a strict JSON structure using a "Structured Output Parser" node, ensuring data consistency. Data Storage: Finally, the clean, structured data (the from, to, subject, and summarize fields) is inserted as a new row into a specified n8n Data Table, creating a searchable and reportable database of email information. --- Set up steps To implement this workflow, follow these configuration steps: Prepare the Data Table: Create a new Data Table within n8n. Define the columns with the following names and string type: From, To, Subject, and Summary. Configure Email Credentials: Set up the credential connections for the email services you wish to use (Gmail OAuth2, Microsoft Outlook OAuth2, and/or IMAP). Ensure the accounts have the necessary permissions to read emails. Configure AI Model Credentials: Set up the OpenAI API credential with a valid API key. The workflow is configured to use the model, but this can be changed in the respective nodes if needed. Connect the Nodes: The workflow canvas is already correctly wired. Visually confirm that the email triggers are connected to the "Parsing Agent," which is connected to the "Insert row" (Data Table) node. Also, ensure the "OpenAI Chat Model" and "Structured Output Parser" are connected to the "Parsing Agent" as its AI model and output parser, respectively. Activate the Workflow: Save the workflow and toggle the "Active" switch to ON. The triggers will begin polling for new emails according to their schedule (e.g., every minute), and the automation will start processing incoming messages. --- Need help customizing? Contact me for consulting and support or add me on Linkedin.

DavideBy Davide
1616