AutomationFlowsGeneral › Extract and Structure X Post Comments with Airtop Browser Automation

Extract and Structure X Post Comments with Airtop Browser Automation

ByAirtop @cesar-at-airtop on n8n.io

Engaging with conversations on X (formerly Twitter) is critical for brands and individuals monitoring sentiment, leads, or emerging trends. Manually collecting comments is time-consuming—this automation enables scalable extraction of comment data to inform your outreach or…

Event trigger★★☆☆☆ complexity7 nodesAirtopForm TriggerExecute Workflow Trigger
General Trigger: Event Nodes: 7 Complexity: ★★☆☆☆ Added:

This workflow corresponds to n8n.io template #4208 — we link there as the canonical source.

This workflow follows the Execute Workflow Trigger → Form Trigger recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "id": "H2dcncE2ycWUMZkR",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Extract X Post Comments",
  "tags": [
    {
      "id": "gNiDOCnjqCXR7phD",
      "name": "Marketing",
      "createdAt": "2025-04-15T01:08:25.516Z",
      "updatedAt": "2025-04-15T01:08:25.516Z"
    }
  ],
  "nodes": [
    {
      "id": "505ad6cb-0c11-4272-a13d-01f64d2e82e5",
      "name": "Edit Fields",
      "type": "n8n-nodes-base.set",
      "position": [
        420,
        0
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "45120659-ed42-40a3-9c6a-545db1028a7a",
              "name": "data.modelResponse",
              "type": "object",
              "value": "={{ $json.data.modelResponse }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "c3e20b9d-9d46-4c19-841c-667ac657c263",
      "name": "Extract X Post Comments",
      "type": "n8n-nodes-base.airtop",
      "position": [
        220,
        0
      ],
      "parameters": {
        "url": "={{ $json.x_post_url }}",
        "prompt": "=This is an x post. Extract up to {{ $json.max_number_of_comments }} comments to the post. For each comment extract the name of the author, the x profile URL of the author, and the text of the comment.  ",
        "resource": "extraction",
        "profileName": "={{ $json.airtop_profile }}",
        "sessionMode": "new",
        "additionalFields": {
          "outputSchema": "{\n  \"type\": \"object\",\n  \"properties\": {\n    \"comments\": {\n      \"type\": \"array\",\n      \"items\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"author_name\": {\n            \"type\": \"string\",\n            \"description\": \"The name of the author of the comment\"\n          },\n          \"author_profile_url\": {\n            \"type\": \"string\",\n            \"description\": \"The X profile URL of the author\"\n          },\n          \"comment_text\": {\n            \"type\": \"string\",\n            \"description\": \"The text content of the comment\"\n          }\n        },\n        \"required\": [\n          \"author_name\",\n          \"author_profile_url\",\n          \"comment_text\"\n        ],\n        \"additionalProperties\": false\n      },\n      \"description\": \"A list of comments extracted from the X post, with each comment containing the author's name, profile URL, and text.\"\n    }\n  },\n  \"required\": [\n    \"comments\"\n  ],\n  \"additionalProperties\": false,\n  \"$schema\": \"http://json-schema.org/draft-07/schema#\"\n}",
          "paginationMode": "infinite-scroll"
        }
      },
      "credentials": {
        "airtopApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "59c05430-1bea-49c6-b320-ad58611e48e0",
      "name": "On form submission",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        -280,
        -100
      ],
      "parameters": {
        "options": {},
        "formTitle": "Extract comments from a specific post on X",
        "formFields": {
          "values": [
            {
              "fieldLabel": "X Post URL",
              "placeholder": "https://x.com/levikwelch/status/1923467917997334537",
              "requiredField": true
            },
            {
              "fieldLabel": "Airtop Profile (connected to X)",
              "requiredField": true
            },
            {
              "fieldType": "number",
              "fieldLabel": "Max number of comments",
              "placeholder": "10"
            }
          ]
        },
        "formDescription": "=This automation takes X post URL and Airtop Profile (authenticated for X) and returns the list of comments made on the post"
      },
      "typeVersion": 2.2
    },
    {
      "id": "0bd8e64e-8de4-492e-b7ba-beb4b2190f15",
      "name": "Unify params",
      "type": "n8n-nodes-base.set",
      "position": [
        -60,
        0
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "f071e020-6701-4ef3-8f32-db59d68206c8",
              "name": "x_post_url",
              "type": "string",
              "value": "={{ $json[\"X Post URL\"] || $json.x_post_url }}"
            },
            {
              "id": "571ddf88-a16a-4a5a-ba4b-c5d06dd92334",
              "name": "airtop_profile",
              "type": "string",
              "value": "={{ $json[\"Airtop Profile (connected to X)\"] || $json.airtop_profile }}"
            },
            {
              "id": "fd9acf61-4a8d-4bcf-842b-0468c4df6c55",
              "name": "max_number_of_comments",
              "type": "number",
              "value": "={{ $json['Max number of comments'] || $json.max_number_of_comments }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "7837359e-7ee6-49d0-b292-948e4c4d0ba6",
      "name": "When Executed by Another Workflow",
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "position": [
        -280,
        100
      ],
      "parameters": {
        "workflowInputs": {
          "values": [
            {
              "name": "x_post_url"
            },
            {
              "name": "airtop_profile"
            },
            {
              "name": "max_number_of_comments",
              "type": "number"
            }
          ]
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "1a6ce30d-04d4-4608-a2f9-00fc6ed0493d",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -320,
        -200
      ],
      "parameters": {
        "width": 400,
        "height": 460,
        "content": "## Input Parameters\nRun this workflow using a form or from another workflow"
      },
      "typeVersion": 1
    },
    {
      "id": "543a0f9e-55ae-42d4-b6f3-63052c675f56",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1080,
        -540
      ],
      "parameters": {
        "width": 700,
        "height": 960,
        "content": "README\n# Extracting Comments from an X Post\n\n## Use Case\nEngaging with conversations on X (formerly Twitter) is critical for brands and individuals monitoring sentiment, leads, or emerging trends. Manually collecting comments is time-consuming\u2014this automation enables scalable extraction of comment data to inform your outreach or analysis.\n\n## What This Automation Does\nThis automation extracts comments from a specified X post, with the following input parameters:\n\n- **`airtop_profile`**: The name of your [Airtop Profile](https://portal.airtop.ai/browser-profiles) connected to X.\n- **`x_post_url`**: The URL of the X post to extract comments from.\n- **`max_number_of_comments`**: The maximum number of comments to retrieve.\n\n## How It Works\n1. Takes input via a form or another workflow.\n2. Normalizes the input values.\n3. Creates a new browser session using Airtop.\n4. Navigates to the provided X post.\n5. Uses a prompt to extract up to the specified number of comments, returning:\n   - Author name\n   - Author profile URL\n   - Comment text\n\n## Setup Requirements\n1. [Airtop API Key](https://portal.airtop.ai/api-keys) \u2014 free to generate.\n2. An [Airtop Profile](https://portal.airtop.ai/browser-profiles) connected to X (requires one-time login).\n\n## Next Steps\n- **Pair with X Monitoring**: Use this with the [X monitoring automation](https://www.airtop.ai/blog/automating-x-monitoring-with-airtop-and-make) to detect relevant posts and extract discussion context automatically.\n- **Feed into Analytics**: Combine with summarization or sentiment analysis tools to understand audience response at scale.\n- **Export for CRM/BI**: Pipe the structured comment data into your CRM or business intelligence stack for lead tracking or reporting.\n"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "1ac46447-4e57-40e0-b873-e969196bab1d",
  "connections": {
    "Unify params": {
      "main": [
        [
          {
            "node": "Extract X Post Comments",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "On form submission": {
      "main": [
        [
          {
            "node": "Unify params",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract X Post Comments": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When Executed by Another Workflow": {
      "main": [
        [
          {
            "node": "Unify params",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

Engaging with conversations on X (formerly Twitter) is critical for brands and individuals monitoring sentiment, leads, or emerging trends. Manually collecting comments is time-consuming—this automation enables scalable extraction of comment data to inform your outreach or…

Source: https://n8n.io/workflows/4208/ — original creator credit. Request a take-down →

More General workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

General

Post on X. Uses airtop, executeWorkflowTrigger, formTrigger, stopAndError. Event-driven trigger; 10 nodes.

Airtop, Execute Workflow Trigger, Form Trigger +1
General

Automatically responding to X (formerly Twitter) posts can help you engage with potential customers at scale, saving time while maintaining a personal touch.

Execute Workflow Trigger, Airtop, Form Trigger
General

Post on X. Uses airtop, executeWorkflowTrigger, stickyNote, formTrigger. Event-driven trigger; 9 nodes.

Airtop, Execute Workflow Trigger, Form Trigger
General

Seamlessly automate posting to X using Airtop and Make.

Airtop, Execute Workflow Trigger, Form Trigger
General

This automation scores companies based on their LinkedIn profile using custom Ideal Customer Profile (ICP) criteria. It’s ideal for qualifying B2B leads and prioritizing outreach based on fit.

Form Trigger, Airtop, Execute Workflow Trigger