๐Ÿ”Œ Pipedream Integration

Updated today

โ€ข

3 min read

Pipedream is a workflow automation platform for developers. You can connect Perfect Wiki to Pipedream today with the Perfect Wiki Public API, using either the no-code Send any HTTP Request action or a Node.js code step. Typical uses: "when a new employee is added in the HR system, create their onboarding page", or "answer incoming questions from our knowledgebase."


Step 1. Get an API token

  1. Open the Perfect Wiki administration panel.
  2. Find the knowledgebase you want Pipedream to work with.
  3. Open the API Access section and click Generate API Key.
  4. Copy the token right away. It is shown only once.

Each token works with one knowledgebase. Full details are in ๐Ÿ”Œ Perfect Wiki Public API.

Step 2. Save the token as an environment variable

In Pipedream, open Settings โ†’ Environment Variables and add a variable named PERFECT_WIKI_TOKEN with your token as the value. This keeps the token out of your workflow steps.

Step 3a. No code: "Send any HTTP Request"

  1. Add a step and choose HTTP / Webhook โ†’ Send any HTTP Request.
  2. Set the method and URL from the table below.
  3. Open the Authorization Type dropdown, choose Bearer Token and enter {{process.env.PERFECT_WIKI_TOKEN}}.
  4. For POST requests, add a JSON body.
What you want to doMethodURL
List pagesGEThttps://api.perfectwiki.xyz/api/public-api/v1/knowledgebase
Read a pageGEThttps://api.perfectwiki.xyz/api/public-api/v1/page/PAGE_ID
Create a pagePOSThttps://api.perfectwiki.xyz/api/public-api/v1/page
Update a pagePOSThttps://api.perfectwiki.xyz/api/public-api/v1/page/PAGE_ID
Delete a pageDELETEhttps://api.perfectwiki.xyz/api/public-api/v1/page/PAGE_ID
Ask a question (AI answer)POSThttps://api.perfectwiki.xyz/api/public-api/v1/knowledgebase/query

Page content must be HTML, not Markdown. Example body for creating an onboarding page from an HTTP trigger:

{
  "title": "Welcome, {{steps.trigger.event.body.firstName}} {{steps.trigger.event.body.lastName}}",
  "content": "<p>Start date: {{steps.trigger.event.body.startDate}}</p>",
  "tags": ["onboarding"],
  "parentId": "ONBOARDING_PARENT_PAGE_ID"
}

The response contains the new page ID in page.id, which later steps can use to update the page or share its link.

Step 3b. Node.js code step

If you prefer code, add a Node.js step:

export default defineComponent({
  async run({ steps, $ }) {
    const hire = steps.trigger.event.body;

    const res = await fetch("https://api.perfectwiki.xyz/api/public-api/v1/page", {
      method: "POST",
      headers: {
        Authorization: `Bearer ${process.env.PERFECT_WIKI_TOKEN}`,
        "Content-Type": "application/json",
      },
      body: JSON.stringify({
        title: `Welcome, ${hire.firstName} ${hire.lastName}`,
        content: `<p>Start date: ${hire.startDate}</p>`,
        tags: ["onboarding"],
      }),
    });

    if (!res.ok) throw new Error(`Perfect Wiki API error ${res.status}: ${await res.text()}`);
    return await res.json(); // { page: { id: "..." }, ... }
  },
});

To get an AI answer instead, send { "q": "your question" } to /public-api/v1/knowledgebase/query. The answer is in aiBotResponse.response, and links to the source pages are in aiBotResponse.relatedPages. Each call counts as an AI request on your plan.


FAQ

Can I use the Perfect Wiki MCP server from Pipedream?

Not as a ready-made step. Pipedream's MCP features make Pipedream's own apps available to AI assistants; they don't add an MCP client step to workflows. Use the Public API as described above. To use Perfect Wiki from an AI assistant, connect the assistant directly to the ๐Ÿ”Œ Perfect Wiki MCP Server.

Is there a dedicated Perfect Wiki app in Pipedream?

Not yet. If you'd like one, let us know at docs.perfectwiki.com/feedback.

Can a workflow start when a page is created or changed?

Perfect Wiki doesn't send webhooks yet. To react to changes, use a Schedule trigger that lists pages on a regular interval and compares the results.

Are there rate limits?

Yes: 10 requests per second and 60 per minute for each token. In a loop, add a short delay between requests. A 429 error means you hit the limit; wait and retry.

I'm getting a 401 error.

Check that the PERFECT_WIKI_TOKEN environment variable is set, and that the token hasn't been regenerated since you copied it.

I'm getting a 402 error.

If the code is TRIAL_EXPIRED, your free trial has ended and API access is paused until your organization picks a paid plan. If you only get 402 from the AI query endpoint, you've used this month's AI query allowance; the other endpoints keep working.

Which other automation tools work with Perfect Wiki?

Zapier, Power Automate, n8n, Make and Activepieces.

Need help?

If something doesn't work as expected, contact support.

Was this page helpful?