n8n Integration
With TwitterShots' n8n integration, you can easily generate tweet screenshot in your automated workflows.
Features
- Simple integration with no code
- Multiple output formats (SVG, PNG, HTML)
- Light/dark theme support
- Customizable logo options (X, bluebird, or none)
- Configurable display options (full text, timestamp, view count, statistics)
There are two ways to use TwitterShots in n8n for tweet screenshots:
- using the official n8n TwitterShots node (under review)
- using custom HTTP requests
Follow the tutorial below - no coding required.
Using TwitterShots Node
If you prefer video, check out this YouTube tutorial video Generate Twitter screenshot with n8n
Authentication
Before using the node, you need to set up TwitterShots API credentials:
- Visit TwitterShots account to get an API key
- You will need it when adding your API key to n8n credentials
For detailed information about API credentials and parameters, please refer to the API Documentation.
Usage
- Create a workflow, search for TwitterShots node and add it to your workflow
- Select "Get a tweet screenshot" action
- Create TwitterShots API credentials and paste your API key
- Select Tweet Screenshot Resource
- Paste the tweet ID and configure output format and display options
- Add "Additional Fields" based on your needs
- Run the workflow to get your tweet screenshot
Using HTTP Request
You can also use n8n's HTTP Request node for screenshots. Simply copy and paste the JSON configuration below - no manual setup required.
Usage
- Add a new workflow, copy and paste the JSON configuration below
- Replace YOUR_X_API_KEY with your actual API key in Header Parameters
- Execute workflow
{
"name": "TwitterShots HTTP Request",
"nodes": [
{
"parameters": {
"url": "=https://api.twittershots.com/api/v1/screenshot/{{ $json['Tweet ID'] }}",
"sendQuery": true,
"queryParameters": {
"parameters": [
{
"name": "theme",
"value": "light"
},
{
"name": "format",
"value": "png"
},
{
"name": "logo",
"value": "x"
},
{
"name": "showFullText",
"value": "false"
},
{
"name": "showTimestamp",
"value": "true"
},
{
"name": "showViews",
"value": "true"
},
{
"name": "showStats",
"value": "true"
}
]
},
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "X-API-KEY",
"value": "YOUR_X_API_KEY"
}
]
},
"options": {
"response": {
"response": {
"responseFormat": "file"
}
}
}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
208,
0
],
"id": "c7229f35-6fac-42ca-8b99-655e8388d273",
"name": "Get Tweet screenshot"
},
{
"parameters": {
"formTitle": "Generate Tweet Screenshot",
"formDescription": "Get screenshot from tweet ID",
"formFields": {
"values": [
{
"fieldLabel": "Tweet ID",
"placeholder": "Paste your tweet ID here",
"requiredField": true
}
]
},
"options": {}
},
"type": "n8n-nodes-base.formTrigger",
"typeVersion": 2.2,
"position": [
0,
0
],
"id": "e8993108-52c6-48bc-8d5b-ebbbce008199",
"name": "Tweet form submission",
"webhookId": "643745e4-b1c2-4bef-9bb6-e2f0a851b8c3"
}
],
"pinData": {},
"connections": {
"Tweet form submission": {
"main": [
[
{
"node": "Get Tweet screenshot",
"type": "main",
"index": 0
}
]
]
}
},
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "cf32143e-bf93-49e6-8238-5210ab27d9ab",
"meta": {
"instanceId": "e39499fdd8705cc482b3da5e37cd2f2b428d03c8da883d31d22d7e1f54b0eb9a"
},
"id": "ASNUC3vmMFALNJrY",
"tags": []
}
Additional Resources
- n8n is a fair-code licensed workflow automation platform
- n8n official TwitterShots node
- TwitterShots API Documentation