Skip to main content
Skip table of contents

How to link knowledge base attachments inside an FAQ answer

Last updated: 17 December 2022

Knowledge base articles allow you to attach an associated file (e.g. a PDF).

In this example, we surface an article’s attachment inside an FAQ answer.

Step 1: Create an FAQ

Go to Knowledge → FAQs.

Click create + FAQ in the top right. 

Name your FAQ, assign any relevant tags and write three example questions.

For your answer, pick a message type that allows action buttons:

  • Action

  • General

  • Carousel

Click Advanced settings. 

Select Imported content from the Data type area.

Choose the specific piece of content using the Import dropdown. 

Choose a specific page within that content using the Section dropdown. 

Click Save, you've now told your chatbot to show a specific page of imported content to your users.

Write a brief answer for your FAQ in the Message area. 

Add a file button by clicking + Add File.

In the first field, give your button a label (e.g. Download)

In the second field, use the attachment variable {{}}.

Hit Save.

What is the 0 in {{}}?

The zero represents ‘the first file’ that matches the variable. If your knowledge base has five files associated with the article, the variable above will return the first file.

If you need to return multiple files, you can add up to five Files buttons on your action message.

If you need to return not the first but the second file associated to the article, you should use {{}}. Third would be 2, fourth would be 3, and so on.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.