Pinterest

Create pins, manage boards, and browse your Pinterest content.

Social mediaOAuth6 actionsAll integrations

On this page
  1. Connect
  2. Call it from a workflow
  3. Actions (6)
  4. createPin
  5. createBoard
  6. deletePin
  7. findBoardByName
  8. findPin
  9. updateBoard
  10. Details

Connect

Auth type: OAuth (oauth2). The connection holds the provider's OAuth tokens. They are sealed on the server and only opened when an action runs.

  • From your agent: integrations {action: "connect", piece, credentials, env} stores the credentials for dev, prod or all. Answers name the fields, never the values.
  • Or set the integration's project secrets with the secrets tool (SLACK_BOT_TOKEN, DISCORD_WEBHOOK_URL, TELEGRAM_BOT_TOKEN, TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN …): a call uses the connection, else those secrets. integrations {action: "catalog", piece} lists which ones work.
  • Try one action now with integrations {action: "call", piece, piece_action, input}. It really sends.

Call it from a workflow

step.ctx.integrations.invoke("pinterest", action, input) resolves with the provider's answer and rejects when Pinterest isn't connected or refuses. Wrap it in step.run so a retry sends once. See step.ctx. Its actions run through the integration runner, which the server's operator turns on: integrations {action: "catalog", piece: "pinterest"} says whether yours can call it.

Workflow
// workflows/notify.ts: call Pinterest when a booking is confirmed
import { on } from "@appbricx/workflows";

export const tellPinterest = on.transition("booking", "status", "confirmed", async (_event, step) => {
  // Recorded once: a retry doesn't send it twice. Rejects when Pinterest isn't connected.
  const output = await step.run("Pinterest", () =>
    step.ctx.integrations.invoke("pinterest", "createPin", {
      "board_id": "<board_id>",
      "title": "<title>",
      "media_source_type": "image_url",
      "media_url": "<media url>"
    }),
  );
  step.ctx.log("Pinterest answered", output);
});
Try it from your agent
{
  "name": "integrations",
  "arguments": {
    "project_id": "<project-id>",
    "action": "call",
    "piece": "pinterest",
    "piece_action": "createPin",
    "input": {
      "board_id": "<board_id>",
      "title": "<title>",
      "media_source_type": "image_url",
      "media_url": "<media url>"
    },
    "env": "dev"
  }
}
From another backend (connector proxy)
curl -X POST "$APP_ORIGIN/__appbricx/connector-proxy/pinterest/createPin" \
  -H "Authorization: Bearer $APP_KEY" \
  -H "content-type: application/json" \
  -d '{"props":{"board_id":"<board_id>","title":"<title>","media_source_type":"image_url","media_url":"<media url>"}}'

Actions

createPin

Create Pin. Upload an image or video to create a new Pin on a board.

InputTypeDescription
ad_account_idoptionalid (picked from your account)Ad account Id
board_idrequiredid (picked from your account)Board Id
board_section_idoptionalid (picked from your account)Board Section Id
titlerequiredtextThe title of the Pin (max 100 characters).
descriptionoptionallong textThe description of the Pin (max 800 characters).
media_source_typerequiredone of "image_url" | "image_base64" | "video_url"The type of media source for the Pin.
media_urlrequiredtextThe URL of the image or video to upload. Must be a valid URL.
linkoptionaltextThe destination URL that the Pin will link to when clicked.
dominant_coloroptionaltextThe dominant color of the Pin as a hex color code (e.g., "#6E7874").
alt_textoptionaltextAlternative text for accessibility and screen readers (max 500 characters).
parent_pin_idoptionaltextThe ID of the original Pin if this is a saved/repinned Pin.
sponsor_idoptionaltextThe sponsor account ID for paid partnership content. Available only to select users in closed beta.
product_tagsoptionalids (picked from your account)Select one or more options
noteoptionaltextA private note for this Pin that only you can see.
is_removableoptionalbooleanSet to true to create an ad-only Pin that can be easily removed.

createBoard

Create Board. Create a new Pinterest board for organizing Pins.

InputTypeDescription
ad_account_idoptionalid (picked from your account)Ad account Id
namerequiredtextThe name of the board (max 180 characters).
descriptionoptionallong textOptional description for your board.
privacyoptionalone of "PUBLIC" | "PROTECTED" | "SECRET"Board privacy setting (auto-set to "PROTECTED" for ad-only boards).
is_ads_onlyoptionalbooleanCreate an ad-only board that can only store promotional Pins. Note: Board name will become "Ad-only Pins" and privacy will be set to "PROTECTED".

deletePin

Delete Pin. Permanently delete a specific Pin.

InputTypeDescription
pin_idrequiredid (picked from your account)pin Id
ad_account_idoptionalid (picked from your account)Ad account Id

findBoardByName

Find Board by Name. Search for boards by name using Pinterest's search API.

InputTypeDescription
queryrequiredtextThe search term to find boards (required).
ad_account_idoptionalid (picked from your account)Ad account Id
bookmarkoptionaltextPagination bookmark from previous response.

findPin

Find Pin by Title/Keyword. Search for Pins using title, description, or keywords.

InputTypeDescription
ad_account_idoptionalid (picked from your account)Ad account Id
queryrequiredtextSearch terms for pin titles, descriptions, or tags. You can also search using comma-separated pin IDs.
bookmarkoptionaltextBookmark token from previous search results for pagination.
max_resultsoptionalnumberMaximum number of pins to return (useful for large result sets).

updateBoard

Update Board. Update a board's name, description, or privacy settings.

InputTypeDescription
board_idrequiredid (picked from your account)Board Id
ad_account_idoptionalid (picked from your account)Ad account Id
nameoptionaltextThe new name of the board (max 180 characters). Leave empty to keep current name.
descriptionoptionallong textThe new description of the board (max 500 characters). Leave empty to keep current description.
privacyoptionalone of "PUBLIC" | "PROTECTED" | "SECRET"Update board privacy setting. Leave empty to keep current setting.

Details

Id
pinterest
Category
Social media
Tags
social, visual, pins, boards, inspiration
Package
@activepieces/piece-pinterest@0.1.3
Runs
Through the integration runner