Suitescript to create a folder under a parent folder in File Cabinet

The requirement was to create child folders under a previously decided parent folder in the NetSuite file cabinet. We should reuse the existing folders if a folder with the requested name already exists and no duplicate folders should be created. These folders can be used to store attachments related to records. Refer to the following… Continue reading Suitescript to create a folder under a parent folder in File Cabinet

Proposal for NetSuite – Google Drive Integration

Requirement The client is looking for a NetSuite – Google Drive integration to archive the attachments in NetSuite to Google Drive. All the files attached to  the NetSuite records and standalone files in the NetSuite file cabinet must be uploaded to Google Drive. PDF documents should be  generated for transactions and they should also be… Continue reading Proposal for NetSuite – Google Drive Integration

Google Drive API request to generate access token

Use the following request to generate a new access token for the Google Drive API: Request type: POST URI: ‘https://accounts.google.com/o/oauth2/token’ In the body section, choose ‘x-www-form-urlencoded’ “Request Body”:  {     client_id: {Your client ID here},     client_secret: {Your client secret value here},     refersh_token: {refersh token},     grant_type: refresh_token,  }

Google Drive API request to generate refresh token

Refresh tokens can be used to generate access tokens for API requests. Use the following steps: Step1: Generate access code You can create an access code through the Google OAuth 2.0 Playgrounds website. If you are doing this through browser URL with redirect link as ‘localhost’, you will get:  http://localhost/?state=state_parameter_passthrough_value&code={actual_code_here}&scope=https://www.googleapis.com/auth/drive.file Step2: Send API request via… Continue reading Google Drive API request to generate refresh token

Google Drive API request to create a new folder

Use the following request to create a new foder on the Google Drive: Request type: POST URI: ‘https://www.googleapis.com/drive/v3/files’ Headers: “Authorization”: `Bearer ${accessToken}` Use the access token generated using the access credentials “Content-Type”: “application/json” “Request Body”:  “{ “name”: “folderName”,     “mimeType”: “application/vnd.google-apps.folder”,     “parents”: [“{parentFolderID}”],  }” To get the folder ID of any folder in Google Drive easily, open… Continue reading Google Drive API request to create a new folder

How to generate Google Drive API credentials

You need an active Google account with Google Drive service as a prerequisite for generating Google Drive API credentials. First, register your Google account on the Google Cloud Platform. Navigate to ‘Google Cloud Paltform’ You might need to provide your Credit card details to complete the registration. Now, create a new Project from the menu.… Continue reading How to generate Google Drive API credentials

NetSuite-Portal Integration for posting data on converting pending donation to incoming fund R&A

Requirement Analyze the feasibility of a new script to send an API notification to the Donor portal when a ‘pending donation’ is converted to an ‘Incoming Fund’. Add a client reply with the estimated effort, queries, and details regarding the implementation plan. Implementation Plan A ‘user event’ script that triggers at the ‘afterSubmit’ entry point… Continue reading NetSuite-Portal Integration for posting data on converting pending donation to incoming fund R&A

Some useful Dropbox API requests

These are some Dropbox API requests that I have tested and found working: Get Access token POST https://api.dropbox.com/oauth2/token?grant_type=refresh_token&refresh_token=<REFRESH_TOKEN>&client_secret=<CLIENT_SECRET> Use the refresh token generated through the Dropbox API app. Since the refresh token has an expiry of up to a few months it can be reused to generate an access token. Get a temporary link to… Continue reading Some useful Dropbox API requests

How to test any API request from Edge browser

You can test most of the API requests from the edge browser itself using the ‘Network console’. This functionality is available in the latest versions of the Edge browser. This can be used instead of the ‘Postman’ application in case it is not available or not working. For this follow these steps: 1. Open the… Continue reading How to test any API request from Edge browser