Block 1 - TRIGGER | Schedule (09:00 server time)
- Type / Role
- n8n-nodes-base.scheduleTrigger - scheduleTrigger
- Config choices
- Version 1.2
This workflow is provided as-is. Please review and test before using in production.
Who’s it for Social media managers, creators, and brand accounts that rely on retweets for reach but want an automated, hands off cleanup after campaigns to keep profiles tidy and on brand. What it...
n8n-nodes-base.scheduletrigger, n8n-nodes-base.set, n8n-nodes-base.httprequest, n8n-nodes-base.splitout, n8n-nodes-base.if, n8n-nodes-base.splitinbatches, n8n-nodes-base.twitter, n8n-nodes-base.wait
This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by masaya kawabe.
Original n8n.io sourceSocial media managers, creators, and brand accounts that rely on retweets for reach but want an automated, hands-off cleanup after campaigns to keep profiles tidy and on-brand.
On a schedule, the workflow resolves your handle to a user ID, fetches recent tweets, filters retweets only, and safely unretweets them using batching and delays to respect rate limits. A dedicated CONFIG (Set Fields) node centralizes variables (e.g., target_username, max_results, batch_delay_minutes) so you can adjust behavior without touching logic.
/2/users/by/username/{username} – resolve handle → user ID/2/users/{id}/tweets?tweet.fields=created_at,referenced_tweets – fetch recent tweets (identify retweets via referenced_tweets.type === "retweeted")/2/users/{id}/retweets/{tweet_id} – unretweetGET /2/users/by/username/{username}
{
"data": { "id": "2244994945", "name": "Twitter Dev", "username": "TwitterDev" }
}
GET /2/users/{id}/tweets (truncated)
{
"data": [
{
"id": "1760000000000000000",
"text": "RT @someone: …",
"referenced_tweets": [{ "type": "retweeted", "id": "1759999999999999999" }],
"created_at": "2025-01-15T09:10:11.000Z"
}
],
"meta": { "result_count": 20 }
}
DELETE /2/users/{id}/retweets/{tweet_id}
{ "data": { "retweeted": false } }
Open CONFIG (Set Fields) and replace placeholders:
target_username = "your_handle"max_results = 100 (per fetch)batch_delay_minutes = 2 (throttle between batches)Connect X/Twitter credentials in n8n (no keys hard-coded in HTTP nodes).
Run once with small values, verify logs, then enable the schedule.
> Optional enhancements: add a dead-letter path (Error Trigger → Set → Sheets/Email/Slack) and a notification node (e.g., Slack) for execution feedback.
This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.
Showing the first 24 of 28 workflow blocks. Download the JSON for the full node graph.
| Workflow | Retweet cleanup with scheduling for X/Twitter |
|---|---|
| Complexity | advanced |
| Nodes | 28 |
| Categories | Social Media |
| Author | masaya kawabe |
| Published | 16 Oct 2025 |
Use the JSON export at /data/workflows/9766/9766.json as the source template for this automation.
Open n8n, import the downloaded JSON, and review each node before activating the workflow.
Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.
Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.
Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.
Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.
Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.
Who’s it for Social media managers, creators, and brand accounts that rely on retweets for reach but want an automated, hands off cleanup after campaigns to keep profiles tidy and on brand. What it...
Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.
Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Social Media use case.