Skip to main content

JavaScript Imports

Import data from web APIs into Decipad using javascript.


Importing Data with JavaScript in a Notebook

  1. Begin by typing /integrations on an empty paragraph.
  2. Select Code from the integration options.
  3. Write your JavaScript code to fetch your data, then press Run to execute it.
  4. Utilize the preview tab to adjust data types if necessary.
  5. Click Insert to add the data into your notebook.

Once your integration is added to your notebook, you can use the refresh button to update the table with the latest data.

Integration Private Keys


Private keys provide secure access control for your code by restricting unauthorized users.

  1. To set up a new key:
    • Go to your workspace and click on "Integration Secrets". You can add a new value or remove old keys.
    • Alternatively, click on "Insert Secret" in the JavaScript code editor within your integrations panel.
  2. To reuse your private key:
    • Click on "Insert Secret" in the JavaScript code editor and select the desired secret. A line of code will be automatically added to your script.

Note: For security reasons, API secrets can only be used directly in a fetch() statement. You can't assign them to variables or use them arbitrarily.