Simplify TikTok to draft-only Content Posting#5703
Conversation
Remove Direct Post stubs and legacy Share Kit webhook triggers that Sim does not ship, and fix draft upload response handling so real TikTok errors are not misreported as size-limit failures. Co-authored-by: Cursor <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Greptile SummaryThis PR reduces TikTok content posting to draft uploads. The main changes are:
Confidence Score: 4/5Legacy Direct Post requests can run as draft uploads, and stored legacy trigger IDs can break or stop firing.
apps/sim/lib/api/contracts/tiktok-tools.ts and apps/sim/triggers/registry.ts Important Files Changed
Reviews (1): Last reviewed commit: "Simplify TikTok to draft-only Content Po..." | Re-trigger Greptile |
| export const tiktokPublishVideoBodySchema = z.object({ | ||
| accessToken: z.string().min(1, 'Access token is required'), | ||
| file: RawFileInputSchema, | ||
| }) |
There was a problem hiding this comment.
Direct Requests Become Draft Uploads
A caller that still sends mode: 'direct' with Direct Post metadata now passes this schema because z.object strips those unknown fields. The route no longer has the direct-mode guard, so a request that previously returned 400 can upload the video as a draft and report success under different semantics.
| tiktok_post_publicly_available: tiktokPostPubliclyAvailableTrigger, | ||
| tiktok_post_publish_complete: tiktokPostPublishCompleteTrigger, |
There was a problem hiding this comment.
Stored Trigger IDs Lose Their Definition
A saved workflow or webhook subscription can still contain tiktok_video_publish_completed or tiktok_video_upload_failed. Removing both registry entries without migrating that stored state makes trigger lookup throw when the workflow is loaded, while webhook matching for the same IDs returns false and silently discards later events.
Reject legacy mode:direct publish requests instead of silently drafting, keep deprecated Share Kit triggers registered for saved workflows, and apply biome format/import fixes. Co-authored-by: Cursor <[email protected]>
Summary
{ accessToken, file }contractvideo.publish.completed,video.upload.failed) and related providershareIdpathspost.publish.*+authorization.removedtriggersTest plan
publishIdpost.publish.inbox_deliveredorpost.publish.complete) still formats correctlyMade with Cursor