Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions apps/docs/components/ui/icon-mapping.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ import {
TemporalIcon,
TextractIcon,
ThriveIcon,
TikTokIcon,
TinybirdIcon,
TrelloIcon,
TriggerDevIcon,
Expand Down Expand Up @@ -484,6 +485,7 @@ export const blockTypeToIconMap: Record<string, IconComponent> = {
textract: TextractIcon,
textract_v2: TextractIcon,
thrive: ThriveIcon,
tiktok: TikTokIcon,
tinybird: TinybirdIcon,
trello: TrelloIcon,
trigger_dev: TriggerDevIcon,
Expand Down
1 change: 1 addition & 0 deletions apps/docs/content/docs/en/integrations/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@
"temporal",
"textract",
"thrive",
"tiktok",
"tinybird",
"trello",
"trigger_dev",
Expand Down
237 changes: 237 additions & 0 deletions apps/docs/content/docs/en/integrations/tiktok.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,237 @@
---
title: TikTok
description: Access TikTok profiles and videos, and upload inbox drafts
---

import { BlockInfoCard } from "@/components/ui/block-info-card"

<BlockInfoCard
type="tiktok"
color="#000000"
/>

## Usage Instructions

Integrate TikTok into your workflow. Get user profile information including follower counts and video statistics. List and query videos with cover images, embed links, and metadata. Send uploaded videos to the TikTok inbox as drafts for human review and publishing, then track post status.



## Actions

### `tiktok_get_user`

Get the authenticated TikTok user profile information including display name, avatar, bio, follower count, and video statistics.

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `fields` | string | No | Comma-separated allowlisted fields to return. open_id and display_name are always included. Available: open_id, union_id, avatar_url, avatar_large_url, display_name, bio_description, profile_deep_link, is_verified, username, follower_count, following_count, likes_count, video_count. Include avatar_url or avatar_large_url to receive avatarFile. |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `openId` | string | Unique TikTok user ID for this application |
| `unionId` | string | Unique TikTok user ID across all apps from the same developer |
| `displayName` | string | User display name |
| `bioDescription` | string | User bio description |
| `profileDeepLink` | string | Deep link to user TikTok profile |
| `isVerified` | boolean | Whether the account is verified |
| `username` | string | TikTok username |
| `followerCount` | number | Number of followers |
| `followingCount` | number | Number of accounts the user follows |
| `likesCount` | number | Total likes received across all videos |
| `videoCount` | number | Total number of public videos |
| `avatarFile` | file | Downloadable copy of the profile avatar image \(largest available variant\), stored as a workflow file so it can be chained into file-consuming blocks \(e.g. attached to an email\). |

### `tiktok_list_videos`

Get a list of the authenticated user's TikTok videos with cover images, titles, and metadata. Supports pagination.

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `maxCount` | number | No | Maximum number of videos to return \(1-20\) |
| `cursor` | number | No | Cursor for pagination \(from previous response\) |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `videos` | array | List of TikTok videos |
| ↳ `id` | string | Video ID |
| ↳ `title` | string | Video title |
| ↳ `coverImageUrl` | string | Signed TikTok CDN cover URL. It is public but time-limited, so consume it immediately. |
| ↳ `embedLink` | string | Embeddable video URL |
| ↳ `embedHtml` | string | HTML embed markup for the video |
| ↳ `duration` | number | Video duration in seconds |
| ↳ `createTime` | number | Unix timestamp when the video was created |
| ↳ `shareUrl` | string | Shareable video URL |
| ↳ `videoDescription` | string | Video description or caption |
| ↳ `width` | number | Video width in pixels |
| ↳ `height` | number | Video height in pixels |
| ↳ `viewCount` | number | Number of views |
| ↳ `likeCount` | number | Number of likes |
| ↳ `commentCount` | number | Number of comments |
| ↳ `shareCount` | number | Number of shares |
| `cursor` | number | Cursor for fetching the next page of results |
| `hasMore` | boolean | Whether there are more videos to fetch |

### `tiktok_query_videos`

Query specific TikTok videos by their IDs to get fresh metadata including cover images, embed links, and video details.

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `videoIds` | array | Yes | Array of video IDs to query \(maximum 20\) |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `videos` | array | List of queried TikTok videos |
| ↳ `id` | string | Video ID |
| ↳ `title` | string | Video title |
| ↳ `coverImageUrl` | string | Signed TikTok CDN cover URL. It is public but time-limited, so consume it immediately. |
| ↳ `embedLink` | string | Embeddable video URL |
| ↳ `embedHtml` | string | HTML embed markup for the video |
| ↳ `duration` | number | Video duration in seconds |
| ↳ `createTime` | number | Unix timestamp when the video was created |
| ↳ `shareUrl` | string | Shareable video URL |
| ↳ `videoDescription` | string | Video description or caption |
| ↳ `width` | number | Video width in pixels |
| ↳ `height` | number | Video height in pixels |
| ↳ `viewCount` | number | Number of views |
| ↳ `likeCount` | number | Number of likes |
| ↳ `commentCount` | number | Number of comments |
| ↳ `shareCount` | number | Number of shares |

### `tiktok_upload_video_draft`

Send an uploaded video to the authenticated user's TikTok inbox for manual editing and posting. The user must open TikTok and tap the inbox notification to complete the post. Rate limit: 6 requests per minute per user.

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `file` | file | Yes | Video file to upload from the workflow. Maximum size: 250 MB. |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `publishId` | string | Unique identifier for tracking the draft status. Use this with the Get Post Status tool to check when the user has completed posting from their inbox. |

### `tiktok_get_post_status`

Check the status of a video draft upload. Use the publishId returned from Upload Video Draft to track progress.

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `publishId` | string | Yes | The publish ID returned from a post/upload tool. |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `status` | string | Current status of the post. Values: PROCESSING_UPLOAD/PROCESSING_DOWNLOAD \(TikTok is processing the media\), SEND_TO_USER_INBOX \(draft delivered, awaiting user action\), PUBLISH_COMPLETE \(successfully posted\), FAILED \(check failReason\). |
| `failReason` | string | Reason for failure if status is FAILED. Null otherwise. |
| `publiclyAvailablePostId` | array | Array of public post IDs \(as strings\) once the content is published and publicly viewable. Can be used to construct the TikTok post URL. |
| `uploadedBytes` | number | Number of bytes uploaded to TikTok for FILE_UPLOAD posts |
| `downloadedBytes` | number | Number of bytes TikTok reports as downloaded |



## Triggers

A **Trigger** is a block that starts a workflow when an event happens in this service.

### TikTok Authorization Removed

Trigger when a user deauthorizes your TikTok app

#### Configuration

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `triggerCredentials` | string | Yes | TikTok Account |
#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `event` | string | TikTok webhook event name |
| `createTime` | number | UTC epoch seconds when the event occurred |
| `userOpenId` | string | TikTok user open_id for the connected account |
| `clientKey` | string | TikTok app client_key that received the event |
| `reason` | number | Revocation reason \(0 unknown, 1 user disconnect, 2 account deleted, 3 age change, 4 banned, 5 developer revoke\) |


---

### TikTok Post Inbox Delivered

Trigger when a draft notification is delivered to the creator inbox

#### Configuration

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `triggerCredentials` | string | Yes | TikTok Account |


---

### TikTok Post No Longer Public

Trigger when a post is no longer publicly viewable on TikTok

#### Configuration

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `triggerCredentials` | string | Yes | TikTok Account |


---

### TikTok Post Publicly Available

Trigger when a published post becomes publicly viewable on TikTok

#### Configuration

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `triggerCredentials` | string | Yes | TikTok Account |


---

### TikTok Post Publish Complete

Trigger when a TikTok Content Posting publish completes

#### Configuration

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `triggerCredentials` | string | Yes | TikTok Account |


---

### TikTok Post Publish Failed

Trigger when a TikTok Content Posting publish fails

#### Configuration

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `triggerCredentials` | string | Yes | TikTok Account |
2 changes: 1 addition & 1 deletion apps/sim/blocks/blocks/tiktok.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const TikTokBlock: BlockConfig<TikTokResponse> = {
bgColor: '#000000',
icon: TikTokIcon,
triggerAllowed: true,
hideFromToolbar: true,
hideFromToolbar: false,

subBlocks: [
{
Expand Down
2 changes: 2 additions & 0 deletions apps/sim/lib/integrations/icon-mapping.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ import {
TemporalIcon,
TextractIcon,
ThriveIcon,
TikTokIcon,
TinybirdIcon,
TrelloIcon,
TriggerDevIcon,
Expand Down Expand Up @@ -458,6 +459,7 @@ export const blockTypeToIconMap: Record<string, IconComponent> = {
temporal: TemporalIcon,
textract_v2: TextractIcon,
thrive: ThriveIcon,
tiktok: TikTokIcon,
tinybird: TinybirdIcon,
trello: TrelloIcon,
trigger_dev: TriggerDevIcon,
Expand Down
71 changes: 71 additions & 0 deletions apps/sim/lib/integrations/integrations.json
Original file line number Diff line number Diff line change
Expand Up @@ -19394,6 +19394,77 @@
"integrationType": "hr",
"tags": ["content-management", "knowledge-base", "automation"]
},
{
"type": "tiktok",
"slug": "tiktok",
"name": "TikTok",
"description": "Access TikTok profiles and videos, and upload inbox drafts",
"longDescription": "Integrate TikTok into your workflow. Get user profile information including follower counts and video statistics. List and query videos with cover images, embed links, and metadata. Send uploaded videos to the TikTok inbox as drafts for human review and publishing, then track post status.",
"bgColor": "#000000",
"iconName": "TikTokIcon",
"docsUrl": "https://docs.sim.ai/integrations/tiktok",
"operations": [
{
"name": "Get User Info",
"description": "Get the authenticated TikTok user profile information including display name, avatar, bio, follower count, and video statistics."
},
{
"name": "List Videos",
"description": "Get a list of the authenticated user's TikTok videos with cover images, titles, and metadata. Supports pagination."
},
{
"name": "Query Videos",
"description": "Query specific TikTok videos by their IDs to get fresh metadata including cover images, embed links, and video details."
},
{
"name": "Upload Video Draft",
"description": "Send an uploaded video to the authenticated user's TikTok inbox for manual editing and posting. The user must open TikTok and tap the inbox notification to complete the post. Rate limit: 6 requests per minute per user."
},
{
"name": "Get Post Status",
"description": "Check the status of a video draft upload. Use the publishId returned from Upload Video Draft to track progress."
}
],
"operationCount": 5,
"triggers": [
{
"id": "tiktok_post_publish_complete",
"name": "TikTok Post Publish Complete",
"description": "Trigger when a TikTok Content Posting publish completes"
},
{
"id": "tiktok_post_publish_failed",
"name": "TikTok Post Publish Failed",
"description": "Trigger when a TikTok Content Posting publish fails"
},
{
"id": "tiktok_post_inbox_delivered",
"name": "TikTok Post Inbox Delivered",
"description": "Trigger when a draft notification is delivered to the creator inbox"
},
{
"id": "tiktok_post_publicly_available",
"name": "TikTok Post Publicly Available",
"description": "Trigger when a published post becomes publicly viewable on TikTok"
},
{
"id": "tiktok_post_no_longer_public",
"name": "TikTok Post No Longer Public",
"description": "Trigger when a post is no longer publicly viewable on TikTok"
},
{
"id": "tiktok_authorization_removed",
"name": "TikTok Authorization Removed",
"description": "Trigger when a user deauthorizes your TikTok app"
}
],
"triggerCount": 6,
"authType": "oauth",
"oauthServiceId": "tiktok",
"category": "tools",
"integrationType": "communication",
"tags": ["marketing", "content-management"]
},
{
"type": "tinybird",
"slug": "tinybird",
Expand Down
10 changes: 1 addition & 9 deletions scripts/generate-docs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,7 @@ const HANDWRITTEN_TRIGGER_DOCS = new Set([
])

/** Providers whose docs are already covered by hand-written pages. */
const SKIP_TRIGGER_PROVIDERS = new Set([
'generic',
'rss',
'table',
'sim',
// TikTok is temporarily hideFromToolbar; skip so cleanup does not leave an
// orphan triggers-only docs page after the actions page is removed.
'tiktok',
])
const SKIP_TRIGGER_PROVIDERS = new Set(['generic', 'rss', 'table', 'sim'])

/**
* Maps trigger provider names (from TriggerConfig.provider) to their
Expand Down
Loading