Automate Twitter Banner with New Followers Using n8n

This workflow automates updating your Twitter profile banner with images of your newest followers. Save time by fetching follower images, processing, and compositing them into a sleek banner instantly using n8n automation.
httpRequest
editImage
merge
+3
Learn how to Build this Workflow with AI:
Workflow Identifier: 2380
NODES in Use: Manual Trigger, HTTP Request, Item Lists, Function, Merge, Edit Image

Press CTRL+F5 if the workflow didn't load.

Visit through Desktop for Best experience

1. Opening Problem Statement

Meet Sarah, a social media manager for a growing tech startup. Every week, she spends hours manually updating the company’s Twitter profile banner to showcase their newest followers — a task she finds repetitive and time-consuming. Sarah’s manual approach involves downloading profile images, resizing and cropping them using graphic software, hardcoding placements, and then uploading the final banner to Twitter. This process eats up 3-4 hours weekly that she could spend on strategic marketing efforts instead. Additionally, errors like incorrectly sized images or upload mistakes create frustration and reduce the brand’s professional appearance.

This is the exact challenge this n8n workflow addresses: automating the creation of a Twitter profile banner featuring the most recent followers’ avatars. It fetches follower data directly from Twitter, processes their images with precise edits, composits them onto a background template, and uploads the new banner image automatically — all without manual intervention.

2. What This Automation Does

When this workflow is triggered in n8n, here’s what happens step-by-step:

  • Fetches up to 3 new followers from your Twitter account using Twitter API with OAuth authentication.
  • Extracts profile image URLs from their follower data.
  • Downloads each follower’s profile image at higher resolution than the default.
  • Resizes and crops each image into a circular avatar sized perfectly for a Twitter banner.
  • Fetches a custom background template image where avatars will be composited.
  • Composites the 3 follower avatars onto the background at precise locations for a polished banner layout.
  • Uploads the new banner image back to Twitter using Twitter’s “update_profile_banner” API endpoint.

Benefits:

  • Saves Sarah 3-4 hours weekly on manual image editing and uploading.
  • Ensures consistent, perfectly sized, and well-placed avatars.
  • Automates banner updating process for higher follower engagement and professional social presence.
  • Reduces human error during image processing and upload.
  • Can be executed on demand using a manual trigger or scheduled with minimal tweaks.

3. Prerequisites ⚙️

  • n8n account with workflow creation permissions.
  • Twitter API access with:
    – Bearer Token credential for Twitter API v2 to fetch followers (HTTP Header Auth node).
    – OAuth1 credentials for Twitter API v1.1 for banner upload.
  • Background banner image hosted URL ({TEMPLATE_IMAGE_URL}) to composite avatars onto.
  • No additional tools required; all image processing is handled within n8n.

4. Step-by-Step Guide

Step 1: Set Up Manual Trigger to Start Workflow

Navigate in n8n to Create a new workflow. Add the Manual Trigger node. This node allows you to execute the workflow on demand with a simple button click during testing or live use.

You should see a node labeled “On clicking ‘execute'” waiting to be triggered manually.

Common mistake: Forgetting to switch the workflow to active mode for manual execution.

Step 2: Configure Twitter Followers Fetch

Add an HTTP Request node next, named “Fetch new followers”. This node calls the Twitter API endpoint:
https://api.twitter.com/2/users/{YOUR_USER_ID}/followers?user.fields=profile_image_url&max_results=3.

Replace {YOUR_USER_ID} with your actual Twitter user ID. Use HTTP Header Auth credentials with your Twitter Bearer Token to authenticate this request.

Expect JSON data response with up to 3 latest followers.

Common mistake: Using incorrect user ID or missing authentication will result in 401 Unauthorized errors.

Step 3: Split Followers Data into Individual Items

Use the Item Lists node to extract the followers array from the API response. Set the “fieldToSplitOut” parameter to data, which contains follower objects.

This prepares each follower as a separate item for further processing.

Step 4: Download High-Resolution Profile Images

Add an HTTP Request node called “Fetching images”. Use the expression:
= {{$json["profile_image_url"].replace('normal','400x400')}}
This converts the default profile image URL to fetch a larger 400×400 pixel image.

Set Response Format to File and Data Property Name to “avatar” to treat the image as binary data.

Step 5: Resize Avatars to 200×200 Pixels

Connect a Edit Image node configured to Resize images. Input this node gets the avatar binary from previous step and resizes to 200×200 pixels.

Step 6: Crop Images into Circular Avatars

Add another Edit Image node with a multi-step operation:

  • Create a 200×200 black background.
  • Draw a transparent white circle mask.
  • Composite the resized avatar with this circle mask using “In” operator to create a circular avatar with transparency.

This results in perfectly rounded avatars suitable for overlay.

Step 7: Resize Avatars to Smaller 75×75 for Banner

Use a third Edit Image node to resize cropped avatars down to 75×75 pixels. This size fits neatly on the banner background.

Step 8: Consolidate Avatars into Binary Data

Add a Function node with this JavaScript code:

const binary = {};
for (let i=0; i < items.length; i++) {
  binary[`data${i}`] = items[i].binary.avatar;
}
return [{ json: { numIcons: items.length }, binary }];

This gathers all resized avatar binaries to be composited on the banner.

Step 9: Fetch Background Banner Image

Add a HTTP Request node named “Fetch bg” with the URL set to your banner template image URL. Make sure Response Format is File and Data Property Name is “bg”.

Step 10: Merge Background and Avatars Binary Data

Use the Merge node set to “mergeByIndex” mode to join the background image and avatars binary data into a single stream for the final edit.

Step 11: Composite Avatars onto Banner Background

Add another Edit Image node performing multiple composite operations:

  • Place the first avatar at position X=1000, Y=375.
  • Place the second avatar at position X=1100, Y=375.
  • Place the third avatar at position X=1200, Y=375.

The result is a single banner image with arranged avatars on the template.

Step 12: Upload Updated Banner to Twitter

Finally, add an HTTP Request node with POST method to Twitter API endpoint https://api.twitter.com/1.1/account/update_profile_banner.json. Use OAuth1 credentials and send the banner image as multipart form-data with binary property “banner:bg”.

After execution, your Twitter banner updates to display your 3 newest followers automatically!

5. Customizations ✏️

  • Change number of followers featured: Modify the max_results parameter in the “Fetch new followers” HTTP Request node to showcase more or fewer followers.
  • Adjust avatar sizes: Change dimensions in the “Resize” and “Resize1” Edit Image nodes to fit different banner designs.
  • Switch background image: Update the URL in the “Fetch bg” HTTP Request node to a new banner template to refresh branding or theme for special events.
  • Change avatar positioning: Modify X and Y coordinates in the final “Edit Image” node’s composite operations to shift avatar placements.

6. Troubleshooting 🔧

Problem: “401 Unauthorized” error when fetching followers.
Cause: Incorrect or expired Bearer Token in HTTP Header Auth credentials.
Solution: Regenerate Twitter API Bearer Token, update credentials in n8n, and reauthorize access.

Problem: Banner doesn’t update after execution.
Cause: OAuth1 credentials for banner upload may be invalid or missing.
Solution: Verify OAuth1 Twitter credentials are correct and authorized with ‘write’ permissions.

Problem: Images appear distorted or not circular.
Cause: Multi-step crop node settings incorrect.
Solution: Review the “Crop” node’s circle drawing coordinates and composite operator to ensure proper masking.

7. Pre-Production Checklist ✅

  • Test Twitter API credentials separately using Postman or similar tool to confirm access.
  • Validate URLs for all HTTP Request nodes including background image.
  • Run workflow manually with small max_results to confirm avatar downloads and final banner composition.
  • Backup existing Twitter banner image externally before deploying automation.

8. Deployment Guide

Activate the workflow in n8n once tested. You can schedule this workflow with a Cron node to run daily or weekly for continuous banner updates.

Monitor executions with n8n execution logs to catch errors. Use error handling nodes or add notifications as needed.

If self-hosting n8n, ensure the correct environment variables for Twitter credentials are set securely. Resources such as Hostinger for self-hosting can guide on setting up n8n environments.

9. FAQs

Q: Can I use this workflow with Instagram instead of Twitter?
A: Instagram API differs significantly and may not support similar banner uploads. This workflow is tailored specifically for Twitter.

Q: Does this consume Twitter API rate limits?
A: Yes, fetching followers and updating banners counts towards your Twitter API v2 and v1 usage limits. Adjust frequency accordingly.

Q: Is my data safe using OAuth1 and Bearer Tokens?
A: Yes, all authentication is secured by Twitter standards and n8n’s credential management.

Q: Can I change how many follower avatars appear?
A: Yes, adjust the max_results field in the “Fetch new followers” node.

10. Conclusion

By following this guide, you automated updating your Twitter profile banner to feature your three newest followers with perfectly cropped avatars composited onto a custom background. This saves you multiple hours weekly and ensures your social media presence looks engaging and professional without manual effort.

Next, consider automating follower thank you messages or scheduling tweets announcing new followers for comprehensive Twitter engagement automation.

This unique, hands-on workflow leverages several n8n nodes like HTTP Request, Edit Image, and Merge, showcasing the power of n8n for creative social media automations.

Related Workflows

Automate Viral UGC Video Creation Using n8n + Degaus (Beginner-Friendly Guide)

Learn how to automate viral UGC video creation using n8n, AI prompts, and Degaus. This beginner-friendly guide shows how to import, configure, and run the workflow without technical complexity.
Form Trigger
Google Sheets
Gmail
+37
Free

AI SEO Blog Writer Automation in n8n (Beginner Guide)

A complete beginner guide to building an AI-powered SEO blog writer automation using n8n.
AI Agent
Google Sheets
httpRequest
+5
Free

Automate CrowdStrike Alerts with VirusTotal, Jira & Slack

This workflow automates processing of CrowdStrike detections by enriching threat data via VirusTotal, creating Jira tickets for incident tracking, and notifying teams on Slack for quick response. Save hours daily by transforming complex threat data into actionable alerts effortlessly.
scheduleTrigger
httpRequest
jira
+5
Free

Automate Telegram Invoices to Notion with AI Summaries & Reports

Save hours on financial tracking by automating invoice extraction from Telegram photos to Notion using Google Gemini AI. This workflow extracts data, records transactions, and generates detailed spending reports with charts sent on schedule via Telegram.
lmChatGoogleGemini
telegramTrigger
notion
+9
Free

Automate Email Replies with n8n and AI-Powered Summarization

Save hours managing your inbox with this n8n workflow that uses IMAP email triggers, AI summarization, and vector search to draft concise replies requiring minimal review. Automate business email processing efficiently with AI guidance and Gmail integration.
emailReadImap
vectorStoreQdrant
emailSend
+12
Free

Automate Email Campaigns Using n8n with Gmail & Google Sheets

This n8n workflow automates personalized email outreach campaigns by integrating Gmail and Google Sheets, saving hours of manual follow-up work and reducing errors in email sequences. It ensures timely follow-ups based on previous email interactions, optimizing communication efficiency.
googleSheets
gmail
code
+5
Free