Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
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
25 changes: 25 additions & 0 deletions apps/docs/components/icons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1274,6 +1274,31 @@ export function xAIIcon(props: SVGProps<SVGSVGElement>) {
)
}

export function TikTokIcon(props: SVGProps<SVGSVGElement>) {
return (
<svg
xmlns='http://www.w3.org/2000/svg'
viewBox='0 0 520.48 520.48'
width='1em'
height='1em'
{...props}
>
<path
fill='#ff004f'
d='m392.19,206.7v49.13c-8.6-.84-19.74-2.78-32.09-7.31-16.13-5.91-28.13-13.99-35.98-20.25v99.32l-.19-.31c.14,1.96.19,3.97.19,5.99,0,49.33-40.13,89.48-89.48,89.48s-89.48-40.15-89.48-89.48,40.13-89.5,89.48-89.5c4.82,0,9.57.39,14.2,1.13v48.43c-4.45-1.6-9.22-2.45-14.2-2.45-23.36,0-42.38,19-42.38,42.38s19.02,42.38,42.38,42.38,42.38-19.02,42.38-42.38c0-.88-.02-1.75-.08-2.63v-193.01h49.11c.18,4.16.35,8.34.53,12.51.33,8.19,3.25,16.05,8.32,22.49,5.97,7.57,14.76,16.36,27.13,23.38,11.57,6.56,22.45,9.38,30.15,10.7Z'
/>
<path
fill='#00f7ef'
d='m375.32,166.81v49.13c-8.6-.84-19.74-2.78-32.09-7.31-16.13-5.91-28.13-13.99-35.98-20.25v99.32l-.19-.31c.14,1.96.19,3.97.19,5.99,0,49.33-40.13,89.48-89.48,89.48s-89.48-40.15-89.48-89.48,40.13-89.5,89.48-89.5c4.82,0,9.57.39,14.2,1.13v48.43c-4.45-1.6-9.22-2.45-14.2-2.45-23.36,0-42.38,19-42.38,42.38s19.02,42.38,42.38,42.38,42.38-19.02,42.38-42.38c0-.88-.02-1.75-.08-2.63V97.74h49.11c.18,4.16.35,8.34.53,12.51.33,8.19,3.25,16.05,8.33,22.49,5.97,7.57,14.76,16.36,27.13,23.38,11.57,6.56,22.45,9.38,30.15,10.7Z'
/>
<path
fill='#fff'
d='m386.06,188.29v49.13c-8.6-.84-19.74-2.78-32.09-7.31-16.13-5.91-28.13-13.99-35.98-20.25v99.32l-.19-.31c.14,1.96.19,3.97.19,5.99,0,49.33-40.13,89.48-89.48,89.48s-89.48-40.15-89.48-89.48,40.13-89.5,89.48-89.5c4.82,0,9.57.39,14.2,1.13v48.43c-4.45-1.6-9.22-2.45-14.2-2.45-23.36,0-42.38,19-42.38,42.38s19.02,42.38,42.38,42.38,42.38-19.02,42.38-42.38c0-.88-.02-1.75-.08-2.63V119.22h49.11c.18,4.16.35,8.34.53,12.51.33,8.19,3.25,16.05,8.32,22.49,5.97,7.57,14.76,16.36,27.13,23.38,11.57,6.56,22.45,9.38,30.15,10.7Z'
/>
</svg>
)
}

export function xIcon(props: SVGProps<SVGSVGElement>) {
return (
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 50 50' width='1em' height='1em' {...props}>
Expand Down
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 @@ -213,6 +213,7 @@ import {
TemporalIcon,
TextractIcon,
ThriveIcon,
TikTokIcon,
TinybirdIcon,
TrelloIcon,
TriggerDevIcon,
Expand Down Expand Up @@ -475,6 +476,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 @@ -215,6 +215,7 @@
"temporal",
"textract",
"thrive",
"tiktok",
"tinybird",
"trello",
"trigger_dev",
Expand Down
342 changes: 342 additions & 0 deletions apps/docs/content/docs/en/integrations/tiktok.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,342 @@
---
title: TikTok
description: Access TikTok profiles and videos, and publish content
---

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

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

{/* MANUAL-CONTENT-START:intro */}
TikTok webhooks use a single app-level Callback URL configured in the [TikTok Developer Portal](https://developers.tiktok.com/):

`https://www.sim.ai/api/webhooks/tiktok`

(Use your environment’s `{APP_URL}/api/webhooks/tiktok` for staging or local ngrok.) You do not paste a unique per-workflow URL into TikTok. In Sim, connect a TikTok account on the trigger and deploy the workflow; events for that `user_openid` fan out to matching workflows.
{/* MANUAL-CONTENT-END */}


## 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. Publish videos directly to TikTok (or send them to the inbox as drafts) from an uploaded file or a file produced earlier in the workflow, 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 list of fields to return. 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 and avatar_large_url to receive the avatarFile output. |

#### 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_query_creator_info`

Check if the authenticated TikTok user can post content and retrieve their available privacy options, interaction settings, and maximum video duration. Required before any post per TikTok UX guidelines.

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `creatorAvatarUrl` | string | URL of the creator avatar |
| `creatorUsername` | string | TikTok username of the creator |
| `creatorNickname` | string | Display name/nickname of the creator |
| `privacyLevelOptions` | array | Available privacy levels for posting \(e.g., PUBLIC_TO_EVERYONE, MUTUAL_FOLLOW_FRIENDS, FOLLOWER_OF_CREATOR, SELF_ONLY\) |
| `commentDisabled` | boolean | Whether the creator has disabled comments by default |
| `duetDisabled` | boolean | Whether the creator has disabled duets by default |
| `stitchDisabled` | boolean | Whether the creator has disabled stitches by default |
| `maxVideoPostDurationSec` | number | Maximum allowed video duration in seconds |

### `tiktok_direct_post_video`

Publish a video to TikTok by uploading a file from the workflow. 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. |
| `title` | string | No | Video caption/description. Maximum 2200 characters. |
| `privacyLevel` | string | Yes | Privacy level for the video. Options: PUBLIC_TO_EVERYONE, MUTUAL_FOLLOW_FRIENDS, FOLLOWER_OF_CREATOR, SELF_ONLY. Must match one of the privacyLevelOptions returned by Query Creator Info. Note: unaudited apps \(including sandbox apps\) are restricted to SELF_ONLY. |
| `disableDuet` | boolean | Yes | Whether to disable duet for this video. The user must choose explicitly. |
| `disableStitch` | boolean | Yes | Whether to disable stitch for this video. The user must choose explicitly. |
| `disableComment` | boolean | Yes | Whether to disable comments for this video. The user must choose explicitly. |
| `videoCoverTimestampMs` | number | No | Timestamp in milliseconds to use as the video cover image. |
| `isAigc` | boolean | No | Set to true if the video is AI-generated content \(AIGC\). |
| `brandContentToggle` | boolean | Yes | Whether the video is a paid partnership promoting a third-party business. The user must choose explicitly. Branded content cannot be posted with Only Me privacy. |
| `brandOrganicToggle` | boolean | No | Set to true if the video is promoting the creator's own business. |
| `musicUsageConsent` | string | Yes | Must be 'accepted' after the user explicitly agrees to TikTok's Music Usage Confirmation. |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `publishId` | string | Unique identifier for tracking the post status. Use this with the Get Post Status tool to check if the video was successfully published. |

### `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 post initiated with Direct Post Video or Upload Video Draft. Use the publishId returned from the post request 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 |


---

### TikTok Video Publish Completed

Trigger when a Share Kit / Video Kit upload is published by the user

#### 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 |
| `shareId` | string | Share Kit / Video Kit share_id |


---

### TikTok Video Upload Failed

Trigger when a Share Kit / Video Kit upload fails in TikTok

#### 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 |
| `shareId` | string | Share Kit / Video Kit share_id |

Loading
Loading