diff --git a/components/kadenzo/README.md b/components/kadenzo/README.md new file mode 100644 index 0000000000000..4f5ed9435f262 --- /dev/null +++ b/components/kadenzo/README.md @@ -0,0 +1,25 @@ +# Kadenzo + +[Kadenzo](https://kadenzo.app) is a social media scheduling tool. These components +let you schedule posts to your connected accounts — X, Instagram, LinkedIn, TikTok, +Facebook, Threads, Bluesky, YouTube, Pinterest and more — from your Pipedream workflows. + +## Getting Started + +1. Generate an API key in Kadenzo: **Settings → API Keys** + (`https://studio.kadenzo.app/dashboard/settings?section=api`). The key is shown once — copy it. + The API is available on paid plans. +2. In Pipedream, connect your Kadenzo account by pasting the API key. +3. Add the **Schedule a Post** action: choose the account(s), write your content, set a + future time (ISO 8601, e.g. `2026-07-01T09:00:00Z`), and optionally add media URLs. + The post publishes automatically at that time. + +Full API reference: https://studio.kadenzo.app/developers + +## Troubleshooting + +- **401 `invalid_key`** — the key is wrong or was revoked; generate a new one. +- **403 `plan_required`** — the API is available on paid plans only. +- **422** (`scheduled_for_past`, `over_char_limit`, `unknown_accounts`, `media_error`) — fix the + field as described in the returned error message. +- **429** — you hit the rate limit (60/min) or your plan's monthly post quota. diff --git a/components/kadenzo/actions/schedule-post/schedule-post.mjs b/components/kadenzo/actions/schedule-post/schedule-post.mjs new file mode 100644 index 0000000000000..7264ad3c676ee --- /dev/null +++ b/components/kadenzo/actions/schedule-post/schedule-post.mjs @@ -0,0 +1,56 @@ +import { ConfigurationError } from "@pipedream/platform"; +import kadenzo from "../../kadenzo.app.mjs"; + +export default { + key: "kadenzo-schedule-post", + name: "Schedule a Post", + description: + "Schedule a social media post to one or more connected accounts at a future time. [See the documentation](https://studio.kadenzo.app/developers).", + version: "0.0.1", + type: "action", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: false, + }, + props: { + kadenzo, + accountIds: { + propDefinition: [kadenzo, "accountIds"], + }, + content: { + type: "string", + label: "Content", + description: "The post text. Optional only if you provide Media URLs.", + optional: true, + }, + scheduledFor: { + type: "string", + label: "Scheduled For", + description: + "When to publish, as an ISO 8601 timestamp that must be in the future — e.g. `2026-07-01T09:00:00Z`.", + }, + mediaUrls: { + type: "string[]", + label: "Media URLs", + description: + "Optional public image/video URLs to attach. Google Drive / Dropbox share links work when public; a direct URL is most reliable.", + optional: true, + }, + }, + async run({ $ }) { + if (!this.content && !this.mediaUrls?.length) { + throw new ConfigurationError("Provide Content, Media URLs, or both."); + } + const data = { + account_ids: this.accountIds, + scheduled_for: this.scheduledFor, + }; + if (this.content) data.content = this.content; + if (this.mediaUrls?.length) data.media_urls = this.mediaUrls; + + const response = await this.kadenzo.schedulePost({ $, data }); + $.export("$summary", `Scheduled post ${response.id} for ${response.scheduled_for}`); + return response; + }, +}; diff --git a/components/kadenzo/kadenzo.app.mjs b/components/kadenzo/kadenzo.app.mjs new file mode 100644 index 0000000000000..66c8a45994b01 --- /dev/null +++ b/components/kadenzo/kadenzo.app.mjs @@ -0,0 +1,49 @@ +import { axios } from "@pipedream/platform"; + +export default { + type: "app", + app: "kadenzo", + propDefinitions: { + accountIds: { + type: "string[]", + label: "Accounts", + description: "The connected social accounts to post to.", + async options() { + const { accounts = [] } = await this.listAccounts(); + return accounts + .filter((a) => a.is_active) + .map((a) => ({ + label: `${a.platform} — ${a.username}${a.label ? ` (${a.label})` : ""}`, + value: a.id, + })); + }, + }, + }, + methods: { + _baseUrl() { + return "https://studio.kadenzo.app/api/v1"; + }, + _headers() { + return { + Authorization: `Bearer ${this.$auth.api_key}`, + "Content-Type": "application/json", + }; + }, + _makeRequest({ $ = this, path, headers, ...opts }) { + return axios($, { + url: `${this._baseUrl()}${path}`, + headers: { + ...this._headers(), + ...headers, + }, + ...opts, + }); + }, + listAccounts($) { + return this._makeRequest({ $, path: "/accounts" }); + }, + schedulePost({ $, data }) { + return this._makeRequest({ $, method: "POST", path: "/posts", data }); + }, + }, +}; diff --git a/components/kadenzo/package.json b/components/kadenzo/package.json new file mode 100644 index 0000000000000..91d9efc246377 --- /dev/null +++ b/components/kadenzo/package.json @@ -0,0 +1,18 @@ +{ + "name": "@pipedream/kadenzo", + "version": "0.0.1", + "description": "Pipedream Components for Kadenzo", + "main": "kadenzo.app.mjs", + "keywords": [ + "pipedream", + "kadenzo" + ], + "homepage": "https://pipedream.com/apps/kadenzo", + "author": "Pipedream (https://pipedream.com/)", + "publishConfig": { + "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.0.3" + } +}