-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Add Kadenzo app + Schedule a Post action #21256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
jors7
wants to merge
2
commits into
PipedreamHQ:master
Choose a base branch
from
jors7:add-kadenzo-app
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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. |
56 changes: 56 additions & 0 deletions
56
components/kadenzo/actions/schedule-post/schedule-post.mjs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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, | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
| }, | ||
| 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; | ||
| }, | ||
| }; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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 }); | ||
| }, | ||
| }, | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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 <support@pipedream.com> (https://pipedream.com/)", | ||
| "publishConfig": { | ||
| "access": "public" | ||
| }, | ||
| "dependencies": { | ||
| "@pipedream/platform": "^3.0.3" | ||
| } | ||
| } |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.