CONNECT APP
Build with Writer
Writer is generative AI purpose-built for business teams. World-class companies use Writer to unlock on-brand content at scale.
Artificial Intelligence (AI)
- API key
MCP
Give your agent Writer tools
Every Writer action is exposed as an MCP tool on Pipedream's remote server. Point a client at it with your end user's ID and Connect resolves that user's Writer account for each tool call — you store no tokens.
// 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": "writer",
},
},
},
)
const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)
const { tools } = await mcp.listTools()
// e.g. run Ask Knowledge Graph:
const result = await mcp.callTool({
name: "writer-ask-knowledge-graph",
arguments: {
graphIds: ["Graph IDs"],
question: "Question",
},
})# access_token: mint a short-lived token with the Connect SDK — see the MCP guide
headers = {
"Authorization": f"Bearer {access_token}",
"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": "writer",
}
async with streamablehttp_client("https://remote.mcp.pipedream.net/v3", headers=headers) as (read, write, _):
async with ClientSession(read, write) as session:
await session.initialize()
tools = await session.list_tools()
# e.g. run Ask Knowledge Graph:
result = await session.call_tool("writer-ask-knowledge-graph", {
"graphIds": ["Graph IDs"],
"question": "Question",
})API PROXY
Call the Writer API directly
For an endpoint with no pre-built tool, the Connect proxy forwards your request to the Writer API with the connected user's credentials attached. You store no tokens and write no refresh logic.
const resp = await pd.proxy.get({
externalUserId: "{external_user_id}", // any stable ID for this user in your system
accountId: "apn_xxxxxxx",
url: "https://api.writer.com/v1/models",
})
// Any allowed Writer endpoint works here. Pipedream attaches the
// connected account's credentials to the outgoing request.# The path segment is the target URL, URL-safe base64 encoded:
# https://api.writer.com/v1/models
curl "https://api.pipedream.com/v1/connect/{project_id}/proxy/aHR0cHM6Ly9hcGkud3JpdGVyLmNvbS92MS9tb2RlbHM?external_user_id={external_user_id}&account_id=apn_xxxxxxx" \
-H "Authorization: Bearer {access_token}" \
-H "x-pd-environment: production"SDK
Run Writer actions from your backend
Connect a user's Writer account once, then run Ask Knowledge Graph on their behalf from your own code — TypeScript, Python, or plain HTTP.
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: "writer-ask-knowledge-graph",
externalUserId: "{external_user_id}", // any stable ID for this user in your system
configuredProps: {
writer: { authProvisionId: "apn_xxxxxxx" },
graphIds: ["Graph IDs"],
question: "Question",
},
})from pipedream import Pipedream
pd = Pipedream(
client_id="{oauth_client_id}",
client_secret="{oauth_client_secret}",
project_id="{project_id}",
project_environment="production",
)
result = pd.actions.run(
id="writer-ask-knowledge-graph",
external_user_id="{external_user_id}", # any stable ID for this user in your system
configured_props={
"writer": {"authProvisionId": "apn_xxxxxxx"},
"graphIds": ["Graph IDs"],
"question": "Question",
},
)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": "writer-ask-knowledge-graph",
"configured_props": {
"writer": { "authProvisionId": "apn_xxxxxxx" },
"graphIds": ["Graph IDs"],
"question": "Question"
}
}'TOOLS
Writer actions
On-demand operations your product or agent can configure and run on behalf of a connected user.
-
Ask Knowledge Graph
actionAsk a natural-language question grounded in one or more of your Writer Knowledge Graphs (RAG). Returns an answer with its sources. Use List Knowledge Graphs first to resolve the graphid(s) you want to query. For free-form generation not grounded in your documents, use Send Prompt instead. Example: call withgraphIds=["a1b2..."]andquestion="What are the park hours?"-> returns{ question, answer, sources, references }. If a graph has no relevant content it returns a graceful 'no relevant information' answer rather than an error. See the documentationRead-onlyv0.0.2 -
Get Application
actionGet a single no-code application (agent) by its application id, including its input schema — theinputsarray, where each entry'sidis an input field name that Run Application must supply a value for (it is NOT the application's id). Use List Applications first to find the application'sid, then call this before Run Application so you know the input fieldids (names) the agent expects. Example: call withapplicationId="3f9c..."-> returns{ id, name, type, status, inputs: [{ id, name, ... }], created_at, updated_at }, where eachinputs[].idis an input field name such as"topic". See the documentationRead-onlyv0.0.2 -
List Applications
actionList the no-code applications (agents) in your Writer workspace. Use this to see which saved agents exist and to resolve an agent'sid, then call Get Application to inspect its inputs and Run Application to run it. Handles an empty workspace gracefully (returns an empty list). Auto-paginates up to 200 applications. Example: to list the content-generation agents and see just their names, call withtype="generation"andfields=["name"]-> returns records like{ id: "...", name: "Blog Writer" }. See the documentationRead-onlyv0.0.2 -
List Knowledge Graphs
actionList the Knowledge Graphs in your Writer workspace. Knowledge Graphs are the retrieval (RAG) sources you can query. Use this to find a graph by name/topic and resolve itsid, then pass the id(s) to Ask Knowledge Graph to ask a grounded question. Auto-paginates up to 200 graphs. Example: to get just the names of your graphs, call withfields=["name"]-> returns records like{ id: "...", name: "Isla Nublar Field Guide" }. See the documentationRead-onlyv0.0.2 -
List Models
actionList the AI models available in your Writer account (Palmyra family plus any external models). Use this to discover valid model ids and to recommend a model for a task, then pass the chosenidto Send Prompt as itsmodel. Example: call with no parameters -> returns models such as{ id: "palmyra-x5", name: "Palmyra X5" },{ id: "palmyra-x4", name: "Palmyra X4" }, and any others enabled for the account.palmyra-x5is the recommended general-purpose model (creative writing included); pick a different id from the returned list only for a specialized need. See the documentationRead-onlyv0.0.2 -
Run Application
actionRun a saved no-code application (agent) with the inputs it expects and return the generated content. Discover the agent'sidwith List Applications, then call Get Application to see the input fieldids (names) it requires before running. Provideinputsas a JSON array of{ id, value }objects, where eachidis an input field name from the application's schema (not the application id) andvalueis an array of strings (one entry per value for that field). Example: call withapplicationId="3f9c..."andinputs=[{ "id": "topic", "value": ["Velociraptor exhibit"] }, { "id": "tone", "value": ["exciting"] }](here"topic"and"tone"are input field names) -> returns the agent's generated content. See the documentationWritev0.0.2 -
Send Prompt
actionGenerate text with Writer's chat completion API. Use this whenever the user asks you to write, draft, compose, generate, rewrite, summarize, translate, or brainstorm any text with Writer — subject lines, announcements, welcome messages, poems, copy, headlines, translations, and similar. Route these requests through Writer (which applies the team's models) rather than answering from your own knowledge. Pass the conversation asmessages; optionally choose amodel(defaults topalmyra-x5, a strong general-purpose model — creative writing included). Use List Models to discover other model ids available to the account. For questions grounded in your team's own documents, use Ask Knowledge Graph instead. Example: to draft a welcome message, call withmessages=[{ "role": "user", "content": "Draft a 2-sentence welcome message for new visitors." }]andmodel="palmyra-x5"-> returns an OpenAI-shaped response whosechoices[0].message.contentholds the generated text. See the documentationWritev1.0.1
No Writer triggers are available yet.
- App slug
- writer
- Authentication
- API key
- Categories
- Artificial Intelligence (AI)
- Actions
- 7
- Triggers
- 0
- API proxy
- Available