n8n Integration

With TwitterShots' n8n integration, you can easily generate tweet screenshot in your automated workflows.

n8n TwitterShots node image

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)

Two Ways to Use TwitterShots in n8n

There are two methods to integrate TwitterShots with your n8n workflows:

1. Official TwitterShots Node

  • Direct Integration: Use the verified TwitterShots n8n node
  • Installation: Search TwitterShots and install verified community nodes directly in the n8n app
  • Benefits: No-code setup, built-in UI, parameter validation

2. HTTP Request Node

  • Custom API Calls: Use n8n's HTTP Request node to make API calls
  • Flexibility: Full control over request parameters and response handling
  • Benefits: Customization options, direct API access

Follow the tutorial below for HTTP Request Node- no coding required.

Using TwitterShots in n8n

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:

  1. Visit TwitterShots account to get an API key
  2. 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

n8n Twitter screenshot workflow image

  1. Create a workflow, search for TwitterShots node and add it to your workflow
  2. Select "Get a tweet screenshot" action
  3. Create TwitterShots API credentials and paste your API key
  4. Select Tweet Screenshot Resource
  5. Paste the tweet ID and configure output format and display options
  6. Add "Additional Fields" based on your needs
  7. 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.

twitterscreenshot n8n request demo

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