Help Center

PDF add-on in Aivo Studio

 About

The PDF node allows you to add a  PDF file in the conversation that can be viewed and downloaded later by the agentbot user.

How to use this node?

If the PDF node is being used, only the URL address of the file should be added to the  URL  field.

This URL resource must have the extension .pdf  or  .PDF.

Please note that embedded file viewers are not accepted, for example, a pdf file stored in Google Drive.

In addition, this  URL field could be loaded with a  parameter  from the integration variables. To do this,

you must fill the URL field with the following notation  {{my_parameter}}. This will insert the value that

contains  'my_parameter' inside the complement.

For example, we are going to insert the value of 'file_url' to the URL field of the PDF node

`msg.file_url = "https://aivo-assets.s3.amazonaws.com/files/fb00ebd74931aa43a873497545c40334/15783183385e133a02d1c38.pdf";

return msg;`

Another way to use this plugin is to build a Function Node with the corresponding structure:

`[

  {

    "action": "file",

    "param": "https://aivo-assets.s3.amazonaws.com/files/fb00ebd74931aa43a873497545c40334/15783183385e133a02d1c38.pdf"

  }

]`

Next, the value of the PDF file must be saved in a variable and then inserted into the complement structure.

Finally, we initialize an empty payload variable and assign the complete structure of the complement to it.

`msg.fileUrl = "https://aivo-assets.s3.amazonaws.com/files/fb00ebd74931aa43a873497545c40334/15783183385e133a02d1c38.pdf";

const complementsButtons = [

    {

        action: "file",

        param: msg.fileUrl

    },

]

msg.payload = {};

msg.payload = {

    answer: "Ready! : thumbsup: There I sent you your last unique account summary",

    answer_clean: "Ready! : thumbsup: There I sent you your last unique account summary",

    complements: complementsButtons

};

return msg;`

How to test it?

An inject node must be placed before the PDF node. The latter must contain the URL in the corresponding field.

undefined

Download the flow by clicking on this link.

This website stores cookies on your computer. These cookies are used to collect information about how you interact with our website and allow us to remember you. We use this information in order to improve and customize your browsing experience and for analytics and metrics about our visitors both on this website and other media. To find out more about the cookies we use, see our Privacy Policy.

If you decline, your information won’t be tracked when you visit this website. A single cookie will be used in your browser to remember your preference not to be tracked.