0

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?

Prisoner
  • 49,922
  • 7
  • 53
  • 105

1 Answers1

1

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

enter image description here

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.

Prisoner
  • 49,922
  • 7
  • 53
  • 105