This workflow corresponds to n8n.io template #7153 — we link there as the canonical source.
This workflow follows the Chainllm → Google Gemini Chat recipe pattern — see all workflows that pair these two integrations.
The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"id": "jm3oNfFXDKTuW4Ez",
"meta": {
"templateCredsSetupCompleted": true
},
"tags": [
{
"id": "xwCyk14uVKcJT0wM",
"name": "Template",
"createdAt": "2025-08-07T23:39:28.237Z",
"updatedAt": "2025-08-07T23:39:28.237Z"
}
],
"nodes": [
{
"id": "3d74dd76-1b29-429f-9c5b-1a989b4a7e61",
"name": "Generate Post Text",
"type": "@n8n/n8n-nodes-langchain.chainLlm",
"position": [
112,
544
],
"parameters": {
"text": "=Translate this text to {{ $('Settings').item.json.translate_to_language }} language:\n\n\"{{ $('Get APOD').item.json.explanation }}\"",
"batching": {},
"messages": {
"messageValues": [
{
"message": "=You are a translation specialist.\n\nTranslate the text you receive from English to especified language.\n\nReturn only the translation without explanations, notes, or additional comments.\n\nDo not invent words or terms, just translate the text."
}
]
},
"promptType": "define"
},
"typeVersion": 1.7
},
{
"id": "a6254b24-8925-4cce-a1a1-6539e8c6eab5",
"name": "Generate Hashtags",
"type": "@n8n/n8n-nodes-langchain.chainLlm",
"position": [
448,
544
],
"parameters": {
"text": "=Generate hashtags for this text in {{ $('Settings').item.json.translate_to_language }}:\n\n\"{{ $json.text }}\"",
"batching": {},
"messages": {
"messageValues": [
{
"message": "=You are a digital marketing expert specializing in science communication on LinkedIn. Generate strategic hashtags for astronomy, science, and technology posts to maximize reach and engagement.\n\n## \ud83d\udd34 CRITICAL INSTRUCTION\nGenerate ONLY a list of relevant hashtags. No comments, explanations, or additional text. Return hashtags only.\n\n## Mission\nAnalyze NASA APOD translated content and generate strategic hashtags combining:\n\u2705 **Fixed hashtags**: #NASA #Astronomy #APOD #n8n #Automation \n\u2705 **Content-specific**: Based on objects, phenomena, events \n\u2705 **Reach hashtags**: For visibility \n\u2705 **Portuguese/English mix**: For national and international audience \n\u2705 **Total**: 10-15 hashtags \n\n**Remember:** Return only hashtags separated by spaces. Nothing else."
}
]
},
"promptType": "define"
},
"typeVersion": 1.7
},
{
"id": "32d439dc-f50c-4657-8e55-6ece267709cf",
"name": "Get APOD",
"type": "n8n-nodes-base.nasa",
"position": [
-128,
432
],
"parameters": {
"additionalFields": {
"date": "={{ $today }}"
},
"binaryPropertyName": "apod_image"
},
"credentials": {
"nasaApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "7f3ed5ff-9be0-4a4f-af28-ff2acbc5b1f1",
"name": "Create Final Post Text",
"type": "n8n-nodes-base.set",
"position": [
784,
544
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "09a3a9ae-ffaa-4ce5-ae61-6cf4fd4d0e9b",
"name": "final_text",
"type": "string",
"value": "=NASA APOD (Astronomy Picture The Of Day) \ud83d\udcc5{{ $today.format('dd/MM/yyyy') }}\n{{ $('Get APOD').item.json.media_type == 'image' ? '' : '\\nNo image available today! Check out the full NASA APOD post here:\\nhttps://apod.nasa.gov/apod/ap' + $today.format('yyMMdd') + '.html\\n' }}\n{{ $('Generate Post Text').item.json.text }}\n\n{{ $('Generate Hashtags').item.json.text }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "aefded44-d806-430f-a01b-88667d32bcc2",
"name": "Preserve Binary",
"type": "n8n-nodes-base.merge",
"position": [
1008,
448
],
"parameters": {
"mode": "combine",
"options": {},
"combineBy": "combineAll"
},
"typeVersion": 3.2
},
{
"id": "0fada130-2363-45ea-88ee-e20532e5f069",
"name": "Settings",
"type": "n8n-nodes-base.set",
"position": [
-384,
432
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "2769a95d-f433-4090-83dc-b76f75ee6428",
"name": "linkedin_post_base_url",
"type": "string",
"value": "https://linkedin.com/feed/update/"
},
{
"id": "9df5f752-23fb-4873-9793-fcf0e11e83e8",
"name": "telegram_chat_id",
"type": "string",
"value": "your_telegram_chat_id"
},
{
"id": "7d55202f-9919-45f3-9f1e-f1785b161269",
"name": "translate_to_language",
"type": "string",
"value": "Brazilian Portuguese"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "febd56fc-a13c-486f-a029-a9fcd8de161e",
"name": "Notify On Telegram",
"type": "n8n-nodes-base.telegram",
"position": [
1936,
464
],
"parameters": {
"text": "=\ud83d\ude80 APOD publicado com sucesso!\n\n\ud83d\udcc5 Data: {{ $today.format('dd/MM/yyyy') }}\n\ud83d\udcdd T\u00edtulo: {{ $('Get APOD').item.json.title }}\n\ud83d\udd17 Link da Publica\u00e7\u00e3o: {{ $('Settings').item.json.linkedin_post_base_url }}{{ $('Publish On LinkedIn').item.json.urn }}\n\n\u2705 Workflow executado \u00e0s {{ $now.format('HH:mm') }}",
"chatId": "={{ $('Settings').item.json.telegram_chat_id }}",
"additionalFields": {}
},
"credentials": {
"telegramApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.2
},
{
"id": "38db3609-abbe-460a-8583-df3cd00a9573",
"name": "Cron",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
-608,
432
],
"parameters": {
"rule": {
"interval": [
{
"triggerAtHour": 12,
"triggerAtMinute": 11
}
]
}
},
"typeVersion": 1.2
},
{
"id": "b2ce3599-a75a-4d04-8788-2513bb692ffc",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1328,
80
],
"parameters": {
"width": 660,
"height": 740,
"content": "# \ud83d\ude80 NASA APOD to LinkedIn Automation\n\n**What it does:**\nThis workflow automatically fetches NASA's Astronomy Picture of the Day (APOD), translates the description to selected language using AI, generates strategic hashtags, and publishes it to LinkedIn with image attachment. You'll get a Telegram notification when it's done!\n\n**Perfect for:**\n- Content creators wanting consistent scientific content\n- Astronomy enthusiasts\n- Anyone interested in automated social media posting\n- Portuguese-speaking audiences who want NASA content in their language\n\n**How it works:**\n1. Runs on schedule (configurable time)\n2. Fetches latest NASA APOD via official API (with image)\n3. Translates English description to another language using Google Gemini AI\n4. Generates strategic hashtags mixing Portuguese/English\n5. Composes final LinkedIn post with image\n6. Publishes automatically to your LinkedIn profile\n7. Sends success notification via Telegram\n\n**Setup time:** ~15 minutes\n**Cost:** Completely FREE (uses free APIs and free AI model)\n**Requirements:** LinkedIn account, Telegram bot, OpenRouter API key\n\n**Features:**\n\u2705 Handles both images and videos from NASA\n\u2705 Smart hashtag generation with AI\n\u2705 Bilingual approach for maximum reach\n\u2705 Error handling and notifications\n\u2705 Easy customization through Settings nodes"
},
"typeVersion": 1
},
{
"id": "99cd5cd9-2070-40a7-95bd-96c22bec6bd0",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-448,
240
],
"parameters": {
"color": 7,
"width": 220,
"height": 340,
"content": "\u2699\ufe0f Configuration Hub\n\nCentralized settings for easy customization."
},
"typeVersion": 1
},
{
"id": "3275e445-a7ba-4a60-abac-ee9752a4d015",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
-48,
704
],
"parameters": {
"color": 7,
"width": 620,
"height": 280,
"content": "\ud83e\udde0 AI Model Configuration\n\nShared LLM model for both translation and hashtag generation\n- Provider: Google AI\n- Model: Gemini 2.5 Flash (fast & efficient!)\n- Connected to both LangChain nodes\n\nSetup required:\n- Google AI Studio account (free)\n- API key configured in credentials \n- Generous free tier with excellent performance"
},
"typeVersion": 1
},
{
"id": "d3fbc568-c4e2-4260-b16e-2ecfda0a5579",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
1392,
48
],
"parameters": {
"color": 7,
"width": 380,
"height": 688,
"content": "\ud83d\udcf2 LinkedIn Publisher\n\nAutomatically posts to your LinkedIn profile with image\n- Post type: IMAGE with text\n- Binary property: apod_image (from NASA)\n- Returns post URN for link generation\n- Person ID: Configured for your LinkedIn profile\n\nSetup required:\n- LinkedIn OAuth2 app creation\n- Proper credentials configuration\n- Profile permissions for posting"
},
"typeVersion": 1
},
{
"id": "71e193e5-89db-45bb-840b-db88306217bd",
"name": "Sticky Note5",
"type": "n8n-nodes-base.stickyNote",
"position": [
1792,
144
],
"parameters": {
"color": 7,
"width": 380,
"height": 480,
"content": "\ud83d\udcac Success Notification\n\nSends confirmation message with post details:\n- Publication date and NASA APOD title\n- Direct link to the LinkedIn post\n- Execution timestamp for tracking\n\nMessage format includes:\n\ud83d\ude80 Success confirmation\n\ud83d\udcc5 Date and title\n\ud83d\udd17 Clickable LinkedIn link\n\u2705 Execution time\n\nSetup: Configure your Telegram bot and get chat ID from @userinfobot"
},
"typeVersion": 1
},
{
"id": "5d034a0b-9d8f-463f-8f5c-2aaa98a0a2c1",
"name": "Sticky Note6",
"type": "n8n-nodes-base.stickyNote",
"position": [
-208,
240
],
"parameters": {
"color": 7,
"width": 260,
"height": 340,
"content": "\ud83d\udef0\ufe0f NASA APOD API\n\nFetches today's Astronomy Picture of the Day\n\nYou can use \"DEMO_KEY\" on credential API KEY for free (with rate limits)"
},
"typeVersion": 1
},
{
"id": "1fc81b76-5bb7-4ab8-926b-a99413a60273",
"name": "Google Gemini 2.5 Flash",
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
"position": [
416,
800
],
"parameters": {
"options": {}
},
"credentials": {
"googlePalmApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "6f552983-356b-4221-a916-fa5675cd344a",
"name": "Publish Image On LinkedIn",
"type": "n8n-nodes-base.linkedIn",
"position": [
1536,
368
],
"parameters": {
"text": "={{ $json.final_text }}",
"person": "l-ubY6OyMM",
"additionalFields": {},
"binaryPropertyName": "=apod_image",
"shareMediaCategory": "IMAGE"
},
"credentials": {
"linkedInOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "2b2cf1b4-0913-4a10-aaea-70f4b1db620d",
"name": "Is Image?",
"type": "n8n-nodes-base.if",
"position": [
1200,
448
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "3b18c772-2efa-43f4-99f2-988cc3670b5c",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.media_type }}",
"rightValue": "image"
}
]
}
},
"typeVersion": 2.2
},
{
"id": "cc219a02-47e5-4e9d-bf5f-4f73121f2603",
"name": "Publish On LinkedIn",
"type": "n8n-nodes-base.linkedIn",
"position": [
1536,
560
],
"parameters": {
"text": "={{ $json.final_text }}",
"person": "l-ubY6OyMM",
"additionalFields": {}
},
"credentials": {
"linkedInOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 1
}
],
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "b2bfd80e-f472-43cd-a914-2d64626c92a8",
"connections": {
"Cron": {
"main": [
[
{
"node": "Settings",
"type": "main",
"index": 0
}
]
]
},
"Get APOD": {
"main": [
[
{
"node": "Generate Post Text",
"type": "main",
"index": 0
},
{
"node": "Preserve Binary",
"type": "main",
"index": 0
}
]
]
},
"Settings": {
"main": [
[
{
"node": "Get APOD",
"type": "main",
"index": 0
}
]
]
},
"Is Image?": {
"main": [
[
{
"node": "Publish Image On LinkedIn",
"type": "main",
"index": 0
}
],
[
{
"node": "Publish On LinkedIn",
"type": "main",
"index": 0
}
]
]
},
"Preserve Binary": {
"main": [
[
{
"node": "Is Image?",
"type": "main",
"index": 0
}
]
]
},
"Generate Hashtags": {
"main": [
[
{
"node": "Create Final Post Text",
"type": "main",
"index": 0
}
]
]
},
"Generate Post Text": {
"main": [
[
{
"node": "Generate Hashtags",
"type": "main",
"index": 0
}
]
]
},
"Publish On LinkedIn": {
"main": [
[
{
"node": "Notify On Telegram",
"type": "main",
"index": 0
}
]
]
},
"Create Final Post Text": {
"main": [
[
{
"node": "Preserve Binary",
"type": "main",
"index": 1
}
]
]
},
"Google Gemini 2.5 Flash": {
"ai_languageModel": [
[
{
"node": "Generate Hashtags",
"type": "ai_languageModel",
"index": 0
},
{
"node": "Generate Post Text",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Publish Image On LinkedIn": {
"main": [
[
{
"node": "Notify On Telegram",
"type": "main",
"index": 0
}
]
]
}
}
}
Credentials you'll need
Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.
googlePalmApilinkedInOAuth2ApinasaApitelegramApi
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
Transform NASA's daily astronomical wonders into engaging LinkedIn content automatically. This workflow fetches NASA's Astronomy Picture of the Day, translates it to Brazilian Portuguese using AI, generates strategic hashtags, and publishes everything to your LinkedIn profile…
Source: https://n8n.io/workflows/7153/ — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
This workflow is for beauty salons who want consistent, high‑quality social media content without writing every post manually. It also suits agencies and automation builders who manage multiple beauty
This workflow contains community nodes that are only compatible with the self-hosted version of n8n.
Who Is This For?
This workflow turns any URL sent to a Telegram bot into ready-to-publish social posts: Trigger: Telegram message (checks if it contains a URL). Fetch & parse: Downloads the page and extracts readable
Auto-Generate Social Media Posts From Urls With Ai Telegram Multi-Platform Posting. Uses telegramTrigger, httpRequest, googleSheets, openAi. Event-driven trigger; 42 nodes.