{
  "id": "Ds5H7wm74GpWPQNC",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Scrape TikTok Profile & Transcript with Dumpling AI and Save to Google Sheets",
  "tags": [],
  "nodes": [
    {
      "id": "5f9ee78c-393b-4e7b-87e8-d89101bc50bb",
      "name": "Watch for New TikTok Links in Sheet",
      "type": "n8n-nodes-base.googleSheetsTrigger",
      "position": [
        -600,
        -220
      ],
      "parameters": {
        "event": "rowAdded",
        "options": {},
        "pollTimes": {
          "item": [
            {
              "mode": "everyMinute"
            }
          ]
        },
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1DWaAJRixKtThSewdhCxHILsvaAlSzd8kKx6-w3oWqx8/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1DWaAJRixKtThSewdhCxHILsvaAlSzd8kKx6-w3oWqx8/edit?usp=drivesdk",
          "cachedResultName": "Videos"
        }
      },
      "credentials": {
        "googleSheetsTriggerOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "c60c56c9-4a52-4640-8c07-236ee8a281ab",
      "name": " Extract Username from TikTok URL",
      "type": "n8n-nodes-base.set",
      "position": [
        -380,
        -220
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "42a565a7-1f01-49b6-a781-ab3d9896828c",
              "name": "USERNAME",
              "type": "string",
              "value": "={{ $json[\"USERNAME Video\"] && $json[\"USERNAME Video\"].match(/@([^\\/]+)/) ? $json[\"USERNAME Video\"].match(/@([^\\/]+)/)[1] : null }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "0f60893c-5cfa-4521-9921-91cf61acbf12",
      "name": " Get TikTok Profile Data using Dumpling AI",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -160,
        -220
      ],
      "parameters": {
        "url": "https://app.dumplingai.com/api/v1/get-tiktok-profile",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"handle\": \"{{ $json.USERNAME }}\"\n}\n",
        "sendBody": true,
        "sendQuery": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "queryParameters": {
          "parameters": [
            {}
          ]
        },
        "headerParameters": {
          "parameters": [
            {}
          ]
        }
      },
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "bbe2ccef-6ce2-4ace-9adb-0ec947dcdc44",
      "name": "Get TikTok Video Transcript using Dumpling AI",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        60,
        -220
      ],
      "parameters": {
        "url": " https://app.dumplingai.com/api/v1/get-tiktok-transcript",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"videoUrl\": \"{{ $('Watch for New TikTok Links in Sheet').item.json['USERNAME Video'] }}\"\n}\n",
        "sendBody": true,
        "specifyBody": "json",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "7785398a-fae6-49fb-9e38-d98e76a9dd71",
      "name": "Save Profile Stats and Transcript to Google Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        280,
        -220
      ],
      "parameters": {
        "columns": {
          "value": {
            "Username ": "={{ $(' Extract Username from TikTok URL').item.json.USERNAME }}",
            "Transcript": "={{ $json.transcript }}",
            "Video Count": "={{ $(' Get TikTok Profile Data using Dumpling AI').item.json.stats.videoCount }}",
            "heart count": "={{ $(' Get TikTok Profile Data using Dumpling AI').item.json.stats.heart }}",
            "Follower count": "={{ $(' Get TikTok Profile Data using Dumpling AI').item.json.stats.followerCount }}",
            "USERNAME Video": "={{ $('Watch for New TikTok Links in Sheet').item.json['USERNAME Video'] }}",
            "Following Count": "={{ $(' Get TikTok Profile Data using Dumpling AI').item.json.stats.followingCount }}"
          },
          "schema": [
            {
              "id": "USERNAME Video",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "USERNAME Video",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Username ",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Username ",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Follower count",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Follower count",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Following Count",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Following Count",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "heart count",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "heart count",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Video Count",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Video Count",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Transcript",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Transcript",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1DWaAJRixKtThSewdhCxHILsvaAlSzd8kKx6-w3oWqx8/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1DWaAJRixKtThSewdhCxHILsvaAlSzd8kKx6-w3oWqx8/edit?usp=drivesdk",
          "cachedResultName": "Videos"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.5
    },
    {
      "id": "f702661a-1495-44df-990d-eb92bbff562f",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -910,
        -620
      ],
      "parameters": {
        "width": 720,
        "height": 560,
        "content": "\ud83c\udfaf Workflow Purpose\n#### This automation monitors a Google Sheet for new TikTok video links. When a new link is added, it uses Dumpling AI to extract both the creator's profile data and the transcript of the linked video. Finally, it writes the results back to the Google Sheet.\n---\n#### \ud83e\udde9 Node Breakdown\n\n1. **Watch for New TikTok Links in Sheet**  \n   Triggers when a new TikTok video URL is added to the sheet.\n\n2. **Extract Username from TikTok URL**  \n   Uses a RegEx match to isolate the TikTok handle from the video URL.\n\n3. **Get TikTok Profile Data using Dumpling AI**  \n   Sends the username to Dumpling AI to retrieve stats like followers, following, likes, and total video count.\n\n4. **Get TikTok Video Transcript using Dumpling AI**  \n   Extracts the transcript for the video using the URL.\n\n5. **Save Profile Stats and Transcript to Google Sheet**  \n   Appends the video URL, username, profile stats, and transcript into the same spreadsheet.\n"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "9b39c10d-bac9-43a4-a31a-cc07b69d7004",
  "connections": {
    " Extract Username from TikTok URL": {
      "main": [
        [
          {
            "node": " Get TikTok Profile Data using Dumpling AI",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Watch for New TikTok Links in Sheet": {
      "main": [
        [
          {
            "node": " Extract Username from TikTok URL",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    " Get TikTok Profile Data using Dumpling AI": {
      "main": [
        [
          {
            "node": "Get TikTok Video Transcript using Dumpling AI",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get TikTok Video Transcript using Dumpling AI": {
      "main": [
        [
          {
            "node": "Save Profile Stats and Transcript to Google Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}