TikTok Upload (dlir2404)
AI-generatedSummary
Uploads a video (and optional cover image) to TikTok using a TikTok session cookie from credentials, then creates a post with caption, visibility, comment, schedule and product-anchor settings.
Inputs
- postSettings — Collection of post options: Caption Text (defaults to the file name without extension if empty), Visibility Type (Public/Friends/Private), Allow Comments (Yes/No), Schedule Time (Unix epoch in seconds; 0 posts immediately), and Anchors (product anchors with Product ID and Display name, truncated to 30 characters). A schedule time in the past throws an error; non-numeric values fall back to 0; values that look like milliseconds are converted to seconds.
- videoInputType (required) — How the video is supplied: Binary Input Field or File Path.
- videoBinaryField (required) — Name of the binary property holding the video (default 'data'). Shown when input type is binary; errors if not found on any input item.
- videoFilePath (required) — Absolute server path to the video file. Shown when input type is File Path; errors if missing or nonexistent.
- coverInputType — None, Binary Input Field, or File Path for an optional cover image.
- coverBinaryField — Binary property name holding the cover image (default 'cover'). If missing, the cover is skipped with a warning.
- coverFilePath — Absolute server path to the cover image. If missing, the cover is skipped.
Output shape
A single item with json: success (true), message, coverUri (empty string if no cover), videoId (vid), and videoMeta from the upload.
Requires the node's credentials: a TikTok session JSON (must contain a user ID) and a dlir2404 API key (used for the product-anchor lookup). Errors from upload or post creation throw a NodeOperationError. Only one post is made per execution, regardless of the number of input items; binary fields are looked up across all input items.
Examples
Example 1: Post a video from a previous node's binary data immediately as public.
Video Input Type: Binary, Video Binary Field: data, Post Settings: Caption Text set, Visibility Public, Schedule Time 0.
Example 2: Schedule a private video from disk with a custom cover.
Video Input Type: File Path with /data/clip.mp4, Cover Input Type: File Path, Visibility Private, Schedule Time set to a future epoch in seconds.