Egnyte Extension Setup Guide

You can add a custom field extension for Egnyte in your stack that allows you to fetch the files stored in your Egnyte account and display them into a field in your Content Type. Subsequently, while creating entries, you can select one or more files as the input value for the field.

This step-by-step guide explains how to create an Egnyte custom field extension for your content types in Contentstack. The steps performed are as follows:

  1. Add the ‘Egnyte’ custom field extension to your stack
  2. Use your custom field

Step 1 - Add the ‘Egnyte’ custom field extension to your stack

  1. Go to Settings > Extensions. Click on the ‘+ Add Extension’ button on the top-right corner and select ‘Create new’.
    Create New Extension.png
  2. Click on 'Custom Field'.
  3. On the configuration page, enter details in the fields as given below:
    • Title: Provide a suitable title. For example, ‘Egnyte’.
    • Field Data Type: Select the data type in which the input data of the field should be saved in Contentstack. Select ‘JSON’ in this case.
    • Multiple: Select this checkbox if you want to enable multiple inputs for the field.
    • Hosting Method: Select ‘Hosted By Contentstack’. As soon as you do this, you will see the ‘Extension Source Code’ field below.
    • Extension Source Code: Enter the source code for the custom field. You can find the source code for the Egnyte custom field here.
    • Config Parameter: Enter the access token that you received while creating your developer account in Egnyte, as shown in the example below:
      {
          "access_token": "www2hhhwdd96ggcchgghhhh6"
      }
      To retrieve your access token, refer the Egnyte API documentation.
  4. Click on ‘Save’. This will create your custom field.

Now, let’s understand how you can start using this custom field in your content type.

Step 2 - Use your custom field

To use your custom field, you need to follow the steps given below:

  1. Create a content type by clicking on the ‘+ New Content Type’. Enter the required details for the content type and click on ‘Create and Add fields’.
    Create Content Type.png
    This takes you to the ‘Content Type Builder’ page where you can add the required fields.
  2. Add the ‘Custom’ field to your content type. Click on ‘Choose existing Extension’ to select the custom field you added in the previous step.
    Add Custom Field.png
  3. Select 'Egnyte' from the dropdown and set the other properties of your custom field.
    Egnyte dropdown.png
  4. Click on ‘Update’.
    Update button.png
  5. After adding other relevant fields in your Content Type, click on ‘Save and Close’.

This will create your Content Type. Now you can use the custom field while creating an entry for this Content Type as shown below:

Egnyte Extension Demo.png

Was this article helpful?
top-arrow