Zapier and the KnowledgeOwl API

You can use KnowledgeOwl's API with Zapier to integrate your knowledge base with other applications. For more information on KnowledgeOwl’s API, refer to API.

Prerequisites

  • KnowledgeOwl account - sign up or log in
  • Zapier account  - sign up or log in. Note that you can test Zaps, including premium functionality, on the free tier, but you need a paid plan to use Webhooks by Zapier in a live Zap.
  • Recommended: a test knowledge base, or test section, so you can try out your Zaps without affecting live documentation or real data.
  • For the tutorial: a Google account.

Quickstart

The basic steps to use Zapier with KnowledgeOwl’s API are:

  1. Log in to Zapier and create a new Zap, using Webhooks by Zapier in the action step to call the API.
  2. Log in to KnowledgeOwl and create a new API key for your knowledge base: How to generate an API key
  3. Refer to KnowledgeOwl’s API documentation to get the URL endpoint and information about the required data.
  4. In Zapier, enter the URL endpoint, select JSON as the payload type, map the data from your data source (this could be an email, for example) to the data structure required by the API, and enter the API key and a dummy password as authentication.

Tutorial

This section provides a step by step tutorial of a possible use case for the Zapier and KnowledgeOwl API integration. In this example, you will catch every new email sent to a Gmail inbox, and use them to create a new article.

  1. Send an email to the Gmail address that you want to use for article creation. For this tutorial, you can use any Gmail address, but if you plan to use this workflow live, you should create a dedicated Gmail account: this example will create an article from every email received in the inbox. 
  2. Log in to Zapier. You can create a Zap in the Dashboard, but it is clearer to see the options in the Zap editor. Select Zaps > Create Zap to open the editor.
  3. In Name your zap, give your Zap a meaningful name, such as “KnowledgeOwl tutorial”.
  4. In Choose App & Event, search for and select "Gmail". Zaper displays a list of events you can listen for.
  5. Select New Email Matching Search.
    Screenshot of the Zap after selecting Gmail as the App and New Email Matching Search as the Trigger Event
  6. Select CONTINUE.
  7. Zapier prompts you to sign in to Gmail with your Google account. Sign in, and give Zapier the permissions it asks for.
  8. Select CONTINUE.
  9. You can now customize which emails Zapier uses to create articles. In Search String, enter "in:inbox". This ensures Zapier ignores any emails sent from the account.
    Screenshot of the Zap after adding "in:inbox" as the email search string
  10. Select CONTINUE.
  11. Select Test trigger.
  12. Zapier loads the newest email. If this is not the test email you sent, browse for and select the correct email.
  13. Select CONTINUE.
  14. In the Choose App & Event section, search for and select "Webhooks by Zapier". 
  15. In Action Event, select POST.
  16. Select CONTINUE. Zapier displays the API call configuration form.
  17. In URL, enter "https://app.knowledgeowl.com/api/head/article.json". This is the article creation API endpoint.
  18. In Payload Type, select JSON.
  19. In Data, set up the data you want to send from Gmail to KnowledgeOwl. This data must be in the form of key-value pairs. The key is the name used by the KnowledgeOwl API, and the values are either entered directly in Zapier or come from the email. Refer to Articles Endpoint: Create and Article for information on all the available fields. For this tutorial, enter the following:
    • project_id: enter your knowledge base ID. You can get this from the URL of your knowledge base editor. Log in to KnowledgeOwl, and select the knowledge base you want to use. KnowledgeOwl opens the Articles page. Look at the URL. It ends in a long string of numbers and letters. This is the ID.
    • status: enter "draft".
    • url_hash: browse the data available from the email, and select ID. This ensures a unique URL.
    • name: browse the data from the email, and select Subject.
    • current_version: browse the data from the email, and select Body Plain.
  20. Animated gif of the actions described in this step
  21. In Basic Auth, enter your API key and a dummy password, in this format:
    key | password
  22. Select CONTINUE.
  23. Select TEST & CONTINUE. When Zapier displays a success message, go to your knowledge base. There should be a new draft article at the top level of your content.
    Screenshot of the KnowledgeOwl Articles page, with a new draft article at the top of the content list


More use cases

The tutorial described how to get data from an email and use it to create an article. You can use the KnowledgeOwl API and Webhooks by Zapier for lots of other things. Here are a few ideas.

Log comments

Linus wants to log all comments on articles for further analysis and sharing. He sets up a Zap that uses the KnowledgeOwl API to get a list of all comments using the List Comments endpoint, then outputs them to a spreadsheet using Zapier's Google Sheets integration.

Autogenerate a newsletter

Linus wants to automatically update his readers about new content. He sets up a Zap that uses the List Articles endpoint of the KnowledgeOwl API to get a list of his most recently created articles, then send them as a newsletter with the MailChimp integration.