Automatically promote your YouTube video on X
Last edited 12 days ago
YouTube to X Post
Overview
This n8n workflow automates the process of promoting your latest YouTube videos on X (formerly Twitter). It ensures that posts are engaging, concise, and follow platform-specific requirements. Additionally, the workflow logs social posts into a Google Sheet for record-keeping.
Features
- Fetch Latest YouTube Videos: Pulls recently uploaded videos from a specified channel.
- Generate Engaging X Posts: Uses OpenAI's GPT-4 to create tailored, witty posts about your videos.
- Character Limit Validation: Ensures posts comply with X's character limit by rewriting if necessary.
- Post Scheduling: Automates post publishing to X.
- Google Sheets Integration: Logs posts and their status for tracking and management.
- Optional Notifications: Sends updates via Discord, Slack, or Gmail (disabled by default).
How It Works
-
Trigger:
- Manually trigger the workflow or set a scheduled check for new videos (disabled by default).
-
Fetch YouTube Videos:
- Retrieves the latest videos from your YouTube channel, filtering duplicates.
-
Content Creation:
- OpenAI generates a witty and humanized post under 220 characters, using video title and description.
- If the post exceeds the character limit, it is rewritten automatically.
-
Google Sheets Logging:
- Logs the generated post to a Google Sheet with details like time, date, and post status.
-
Post to X:
- Publishes the generated post on X. Updates the Google Sheet with the post URL.
-
Optional Notifications:
- Sends notifications about the published post via Discord, Slack, or Gmail.
Setup Instructions
-
Credentials:
- Add credentials for:
- YouTube API
- OpenAI API
- Google Sheets API
- X (formerly Twitter) API
- Use the accounts associated with "AlexK1919."
- Add credentials for:
-
YouTube Node:
- Specify your YouTube Channel ID in the
Fetch Latest Videos
node. - Find your Channel ID here.
- Specify your YouTube Channel ID in the
-
Google Sheets Node:
- Configure the node with your Google Sheet for logging posts. Use the linked sheet: AlexK1919 Social Posts.
-
OpenAI Node:
- Set up your OpenAI API key for generating posts.
-
X Post Node:
- Connect your X account to the
Post to X
node.
- Connect your X account to the
-
Optional Notifications:
- Configure Discord, Slack, or Gmail nodes for custom notifications.
Customization
-
Schedule:
- Enable and modify the
Check Every 2 Hours
node to automatically check for new videos.
- Enable and modify the
-
Post Format:
- Edit the OpenAI prompt in the
Generate X Post
node to tweak the tone or style of the generated posts.
- Edit the OpenAI prompt in the
-
Additional Platforms:
- Expand this workflow to post on other social platforms by adding respective nodes (e.g., Facebook, LinkedIn).
Notes
- Posts are validated for character limits but are restricted to 220 characters to ensure compliance with X's guidelines and leave space for links.
- Posts are logged in the Google Sheet with details, including post status and timestamps.
- Current integrations are focused on promoting YouTube content; additional types can be supported with minor adjustments.
Contact
For support or inquiries:
- Alex Kim
- About Me
You may also like
New to n8n?
Need help building new n8n workflows? Process automation for you or your company will save you time and money, and it's completely free!