Data & Databases

Publish YouTube videos to Twitter with database logging

21 nodes 342 107 Automatic trigger
Download

Workflow Description

Automation that extracts video data from YouTube and posts them to Twitter in batches, while storing complete details in PostgreSQL for tracking, analytics, and campaign management across both platforms.

How it works

  1. 1.Trigger workflow manually or on schedule
  2. 2.Fetch video metadata from YouTube channel
  3. 3.Process and batch the video information
  4. 4.Post updates to Twitter account
  5. 5.Log transaction details in PostgreSQL database

Use cases

  • Automatically share new YouTube videos with Twitter followers
  • Track video performance metrics and social engagement
  • Manage multi-platform content distribution efficiently
  • Generate automated reports linking YouTube uploads to Twitter reach

Requirements

  • Active YouTube channel with API access
  • Verified Twitter/X account with app credentials
  • PostgreSQL database configured and accessible
  • API keys securely stored in n8n credentials

Service Value

Ready-made workflow template for automation delivery and service execution.

Apps Used

Split In Batches Twitter/X Postgres YouTube

Details

Trigger Automatic trigger
Nodes 21
Apps 4
Views 342
Downloads 107

How to Use

  1. 1.Click "Download Template"
  2. 2.Open your n8n dashboard
  3. 3.Go to Workflows > Import from File
  4. 4.Select downloaded file and configure credentials

Nodes Used (21)

/

Loop Over Items

Split In Batches

#1

find_video_data1

HTTP Request

#2

When clicking ‘Test workflow’

Manual Trigger

#3

Execute Workflow Trigger

Execute Workflow Trigger

#4

fetch_last_registered

Postgres

#5

get_videos

You Tube

#6

if_is_empty

If

#7

Postgres

Postgres

#8

insert_items

Postgres

#9

create_table

Postgres

#10

remove_shorts

Code

#11

create_query

Code

#12

structure_data

Code

#13

if_empty

If

#14

already_populated

Set

#15

map_data

Set

#16

sanitize_data

Code

#17

Sticky Note

Sticky Note

#18

Sticky Note1

Sticky Note

#19

see table

Postgres

#20

drop table

Postgres

#21