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)curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
-H "Content-Type: application/json" \
-H "X-PD-Environment: production" \
-H "Authorization: Bearer {access_token}" \
-d '{
"external_user_id": "{external_user_id}",
"id": "slab-create-post",
"configured_props": {
"slab": { "authProvisionId": "apn_xxxxxxx" },
"title": "Title",
"content": "Content"
}
}'// accessToken: mint a short-lived token with the Connect SDK — see the MCP guide
const transport = new StreamableHTTPClientTransport(
new URL("https://remote.mcp.pipedream.net/v3"),
{
requestInit: {
headers: {
Authorization: `Bearer ${accessToken}`,
"x-pd-project-id": "{project_id}",
"x-pd-environment": "production",
"x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
"x-pd-app-slug": "slab",
},
},
},
)
const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)
const { tools } = await mcp.listTools()
// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
name: "slab-create-post",
arguments: {
title: "Title",
content: "Content",
},
})SCHEMA
Inputs
Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.
| 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
- Source
- View on GitHub ↗