View as Markdown
Slab icon

Slab ACTION

Create Post

Create a new post in Slab via the createPost GraphQL mutation, returning the full post object (e.g. {"id":"abc123","title":"Q3 Onboarding Guide","topics":[{"id":"abc12def","name":"Engineering"}]}). If Content is provided, the body is appended after creation via the updatePostContent mutation (the Slab schema does not accept content at creation time). Slab derives the displayed title from the first line of the post's content, so the appended text is inserted after the existing title line rather than replacing it — this preserves Title instead of overwriting it. NOTE: the returned content field reflects the pre-append snapshot (title line only) even though the append is applied — treat a non-error response as confirmation, not the returned content. New posts are published by default (set Published to false to leave it as an unpublished draft) — unpublished posts do not appear in Search Posts/List Posts results. Run List Topics to obtain a Topic ID to pass at creation. See the documentation.
  • Action
  • Writes data
  • API key
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's Slab account once, then configure and run Create Post from your backend or agent.

import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "slab-create-post",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    slab: { authProvisionId: "apn_xxxxxxx" },
    title: "Title",
    content: "Content",
  },
})

console.log(result)

SCHEMA

Inputs

Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.

Create Post inputs
Property Type Description
title Title string
Title for the new post, e.g. Q3 Engineering Onboarding Guide.
Optional
content Content string
Initial body text for the post, e.g. This guide covers environment setup, team norms, and key contacts.. Inserted as literal plain text (Markdown is not rendered) after the title line via the updatePostContent mutation.
Optional
topicId Topic ID string
Optional single Topic ID to place the new post under. Run List Topics first to obtain a valid ID. The schema accepts only one topicId at creation; use Add Topic To Post to add more.
Optional
templateId Template ID string
Optional ID of an existing Slab post to use as a template for the new post (e.g. abc123). Any post can serve as a template. Run List Posts first to obtain a valid post ID.
Optional
published Published boolean
Whether the new post should be published immediately (default true). Set to false to leave it as an unpublished draft, which won't appear in Search Posts/List Posts results until published via Update Post.
Optional

REFERENCE

Tool details

Behavior hints are published with the component in the Pipedream registry and surface as MCP tool annotations, so an agent can reason about a tool before it calls it.

Registry key
slab-create-post
Version
0.0.1
App
Slab
Authentication
API key
Read-only
No
Destructive
No
Open world
Yes