简体   繁体   中英

DialogFlow Fulfillment

I want to add a the library rss-to-json to my fulfillment to convert news from a website in rss format to json format. Is this possible?

Yes. You can treat this just like most other npm managed library.

If you are managing the code on your own machine and then deploying it to some cloud environment (such as firebase cloud functions), then you can install it with npm as usual with

npm install rss-to-json --save

If you're using Dialogflow's inline code editor, then you need to add this manually to the package.json file in the editor. To do this,

  • Make sure you've selected the "Fulfillment" left navigation and enabled on the inline code editor
  • Select the package.json tab that is right above the editor
  • Scroll the editor down and add the line to the "dependencies" section
  • When you're done, make sure you click the "Deploy" button

在此处输入图片说明

You should also make sure that you are using an upgraded Firebase plan , since the default "Spark" plan can only access servers on Google's network.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM