This workflow corresponds to n8n.io template #8450 โ we link there as the canonical source.
This workflow follows the Datatable โ Gmail 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 โ
{
"nodes": [
{
"id": "55b32b5a-3320-4e6e-acae-9a960b30eae0",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
1568,
224
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "4871a388-e7ea-46ee-a366-97b4d7b4bce3",
"name": "Sticky Note16",
"type": "n8n-nodes-base.stickyNote",
"position": [
1568,
-224
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "ca2af46d-8093-49c9-9049-eecbbe010c9f",
"name": "Sticky Note17",
"type": "n8n-nodes-base.stickyNote",
"position": [
3136,
576
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "b1d2a753-6129-4f20-82ed-79e6b014276d",
"name": "Sticky Note18",
"type": "n8n-nodes-base.stickyNote",
"position": [
3136,
464
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "46ac9a16-dfbb-4583-9b62-44d79eccba4f",
"name": "Sticky Note21",
"type": "n8n-nodes-base.stickyNote",
"position": [
1008,
448
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "2e06c32f-cc26-4016-868e-b9320ad333d1",
"name": "Sticky Note22",
"type": "n8n-nodes-base.stickyNote",
"position": [
4112,
576
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "d62e4d2e-1f41-4929-94b3-331e249e2fc5",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
848,
1008
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "40ecc1bb-f664-4dfb-ae41-6bdb37cf13f6",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
1328,
960
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "d0efa54d-1a97-4e49-bd99-cf6817ff7018",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
1712,
688
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "54b19325-c56f-4125-9995-f5d9e21a27f5",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
1712,
1024
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "bd8971bb-d1bf-4f88-88d5-ea70ead41aad",
"name": "Sticky Note6",
"type": "n8n-nodes-base.stickyNote",
"position": [
2288,
992
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "e3372fed-fe15-4256-af65-a9cc9431283c",
"name": "Sticky Note7",
"type": "n8n-nodes-base.stickyNote",
"position": [
2832,
800
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "04a7c34e-57b7-4e22-beb8-7da790108c8b",
"name": "Send Gmail Report",
"type": "n8n-nodes-base.gmail",
"notes": "Send dahsboard with top 10 of the most engaging post ",
"position": [
2880,
1184
],
"parameters": {},
"executeOnce": true,
"notesInFlow": true,
"typeVersion": 2.1
},
{
"id": "74636cff-3361-4a7f-ab5b-511b14de8b02",
"name": "Rank All Platforms",
"type": "n8n-nodes-base.code",
"notes": "Sorts all posts + give them points depending on their likes + comments",
"position": [
2560,
1184
],
"parameters": {},
"notesInFlow": true,
"typeVersion": 2
},
{
"id": "3bd6590d-fb82-441b-a8b3-367ebc83dc54",
"name": "Rank Reddit Posts",
"type": "n8n-nodes-base.code",
"notes": "Sorts posts",
"position": [
2000,
816
],
"parameters": {},
"notesInFlow": true,
"typeVersion": 2
},
{
"id": "153770fe-e635-404f-a031-88e9598f1552",
"name": "Rank TikTok Posts",
"type": "n8n-nodes-base.code",
"notes": "Sorts posts",
"position": [
2000,
1536
],
"parameters": {},
"notesInFlow": true,
"typeVersion": 2
},
{
"id": "faaa353c-5b28-486a-88cf-43672f8c26a2",
"name": "When Schedule Fires",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
896,
1168
],
"parameters": {},
"typeVersion": 1.2
},
{
"id": "3d85e890-63a8-4114-bc8c-d2b859bd072e",
"name": "Save Rankings to Table",
"type": "n8n-nodes-base.dataTable",
"position": [
2880,
1056
],
"parameters": {},
"typeVersion": 1
},
{
"id": "112d0f9b-40e6-4fea-b856-9201efebd930",
"name": "Get Queries from Table",
"type": "n8n-nodes-base.dataTable",
"position": [
1104,
1168
],
"parameters": {},
"typeVersion": 1
},
{
"id": "e358a0e7-b3a8-4416-a774-d090c0d5e98e",
"name": "Loop Over Queries",
"type": "n8n-nodes-base.splitInBatches",
"position": [
1376,
1168
],
"parameters": {},
"typeVersion": 3
},
{
"id": "7b62e515-c0a0-4973-bbfe-6bbf4af0efd2",
"name": "Fetch TikTok Posts via Apify",
"type": "n8n-nodes-base.httpRequest",
"notes": "Post the request on apify",
"position": [
1760,
1536
],
"parameters": {},
"executeOnce": false,
"notesInFlow": true,
"retryOnFail": true,
"typeVersion": 4.2
},
{
"id": "4fbf5b80-295c-4633-b23c-ed235e1e06ab",
"name": "Fetch Reddit Posts via Apify",
"type": "n8n-nodes-base.httpRequest",
"notes": "Post the request on apify",
"position": [
1760,
816
],
"parameters": {},
"executeOnce": false,
"notesInFlow": true,
"retryOnFail": true,
"typeVersion": 4.2
},
{
"id": "208c9a90-9464-4d83-aa6a-68554dcdfcc4",
"name": "Merge Platform Results",
"type": "n8n-nodes-base.merge",
"position": [
2336,
1168
],
"parameters": {},
"typeVersion": 3.2
},
{
"id": "43dfdbe1-9342-4d5b-a961-28e467f877c6",
"name": "Fetch Instagram Posts via Apify",
"type": "n8n-nodes-base.httpRequest",
"notes": "Post the request on apify",
"position": [
1760,
1184
],
"parameters": {},
"executeOnce": false,
"notesInFlow": true,
"retryOnFail": true,
"typeVersion": 4.2
},
{
"id": "16e79945-de07-4eb9-af7d-31d7289d6ba3",
"name": "Rank Instagram Posts",
"type": "n8n-nodes-base.code",
"notes": "### What the system does:\nLaunches Instagram hashtag scraping via Apify's Instagram scraper\nSearches recent posts (last 7 days) under specified hashtags\nImplements 30-second processing wait for data collection completion\nRetrieves Instagram post data including likes, comments, and captions\nFilters and processes main posts (excluding carousel items and stories)\nApplies Instagram-specific engagement scoring for content ranking\n\n**Instagram Scoring Formula:**\n- Likes: 1 point each\n- Comments: 2 points each (emphasizing meaningful engagement)\n- Final score = (likes \u00d7 1) + (comments \u00d7 2)\n\n### Result:\n\u2705 Top 10 most engaging Instagram posts identified\n\u2705 Visual content performance metrics captured\n\u2705 Influencer and brand content engagement measured\n\u2705 Platform-specific engagement patterns analyzed",
"position": [
2000,
1184
],
"parameters": {},
"notesInFlow": true,
"typeVersion": 2
},
{
"id": "bd1d0460-f3a3-4d66-ac13-a6f34f5129e8",
"name": "Sticky Note8",
"type": "n8n-nodes-base.stickyNote",
"position": [
288,
800
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "0c6430ed-77ec-403b-b2b6-7baecd5f66cb",
"name": "Sticky Note9",
"type": "n8n-nodes-base.stickyNote",
"position": [
1712,
1376
],
"parameters": {
"content": ""
},
"typeVersion": 1
}
],
"connections": {
"Loop Over Queries": {
"main": [
[],
[
{
"node": "Fetch Reddit Posts via Apify",
"type": "main",
"index": 0
},
{
"node": "Fetch TikTok Posts via Apify",
"type": "main",
"index": 0
},
{
"node": "Fetch Instagram Posts via Apify",
"type": "main",
"index": 0
}
]
]
},
"Rank Reddit Posts": {
"main": [
[
{
"node": "Merge Platform Results",
"type": "main",
"index": 0
}
]
]
},
"Rank TikTok Posts": {
"main": [
[
{
"node": "Merge Platform Results",
"type": "main",
"index": 2
}
]
]
},
"Send Gmail Report": {
"main": [
[
{
"node": "Loop Over Queries",
"type": "main",
"index": 0
}
]
]
},
"Rank All Platforms": {
"main": [
[
{
"node": "Send Gmail Report",
"type": "main",
"index": 0
},
{
"node": "Save Rankings to Table",
"type": "main",
"index": 0
}
]
]
},
"When Schedule Fires": {
"main": [
[
{
"node": "Get Queries from Table",
"type": "main",
"index": 0
}
]
]
},
"Rank Instagram Posts": {
"main": [
[
{
"node": "Merge Platform Results",
"type": "main",
"index": 1
}
]
]
},
"Get Queries from Table": {
"main": [
[
{
"node": "Loop Over Queries",
"type": "main",
"index": 0
}
]
]
},
"Merge Platform Results": {
"main": [
[
{
"node": "Rank All Platforms",
"type": "main",
"index": 0
}
]
]
},
"Fetch Reddit Posts via Apify": {
"main": [
[
{
"node": "Rank Reddit Posts",
"type": "main",
"index": 0
}
]
]
},
"Fetch TikTok Posts via Apify": {
"main": [
[
{
"node": "Rank TikTok Posts",
"type": "main",
"index": 0
}
]
]
},
"Fetch Instagram Posts via Apify": {
"main": [
[
{
"node": "Rank Instagram Posts",
"type": "main",
"index": 0
}
]
]
}
}
}
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
๐บ Full walkthrough video: https://youtu.be/Me4d4BILvHk
Source: https://n8n.io/workflows/8450/ โ original creator credit. Request a take-down โ
More Social Media workflows โ ยท Browse all categories โ
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
Automatically upload your Instagram videos to YouTube with configurable time gaps between each upload, using n8n Tables for deduplication. Fetches recent Instagram posts via the Meta Graph API and fil
Meta long-lived user tokens typically expire after ~60 days. If a token expires, any workflows that rely on it start failing. Manual renewal is easy to forget and time consuming. This template monitor
This n8n template acts as your automated social media data analyst. Instead of manually checking your analytics across different dashboards every week, this workflow scrapes your latest stats, calcula
What It Does
This workflow automatically discovers trending topics, generates engaging social media content using AI, and publishes posts to X (Twitter) and Facebook via Buffer.