Posts

Showing posts from May, 2021

How to Use PayPal Subscriptions API with Node.js

Our Google add-on store uses PayPal Subscriptions with Digital Goods to process recurring payments and the invoices are sent to customers through Document Studio . There are two steps. Customers makes the payment and completes the order on our website. PayPal sends a BILLING.SUBSCRIPTION.ACTIVATED webhook to a serverless function. The function (running on Firebase, Google Cloud) verifies the subscription and checks if the status is active. It invokes the Apps Script API to complete the order. The cloud function was previously using the official PayPal SDK for Node.js but it has been recently deprecated and no longer supports the new PayPal subscriptions API endpoints. Migrating from the PayPal Node SDK to your own solution is relatively simple and involves two steps: 1. Get the PayPal Access Token const { default : axios } = require ( "axios" ) ; const getPayPalAccessToken = async ( ) => { const client_id = "PayPal Client ID goes here

How to Add a Watermark in Google Documents

Image
Microsoft Word includes a useful “Insert Watermark” feature to help you easily add your brand’s logo image or a text stamp that fades behind the content of every page in the document. A company’s policy may require employees to add watermarks to indicate if any document is in draft stage or if the document is confidential and not meant for external distribution. Insert Watermarks in Google Docs Unlike Microsoft Word, there’s no built-in support for Watermarks in Google Docs but there’s a simple workaround - create a faded image with the text of your watermark and place that image behind the text of your document pages. Here’s how: 1. Create the watermark stamp Launch MS Paint on your computer and create a simple watermark image in landscape mode with dark gray text. Please use a bold font like Impact with large font size as the large image can always be resized inside Google Docs but not vice-versa. I’ve also added some ready-to-use image stamps on Canva and Imgur . 2.

The Best Extensions for Google Chrome

Image
Here’s a comprehensive list of the best extensions for Google Chrome that will help you do more and also enhance your web browsing experience. The Best Google Chrome extensions Vimium C — Browse the web, interact with web pages, navigate browser history using keyboard shortcuts. Inspired by Vim commands . Fika - Read pages in a Kindle-style clean layout with beautiful typography while hiding the distracting parts. PushBullet — Easily transfer web page links, text notes, or push photos and files from the computer to your phone and vice-versa. OneTab — Save all your open tabs in a group and duplicate your session anytime later with a click. Gmail Sender Icons - Quickly identify the sending domain of an email in Gmail without opening the message. Bubble Cursor - The add-on makes it easy for you to click on links that are too small to select with your mouse or for typing inside input boxes. Picture in Picture - Watch YouTube videos in an always-on-top floating window w

How to Use Notion with Gmail and Google Sheets using Apps Script

Image
Notion, my absolute favorite tool for storing all sorts of things from web pages to code snippets to recipes, just got better. They’ve released a public API and that essentially means it will be a lot easier for developer to talk to their Notion workspace from external apps. For instance, you can write create a document in Google Docs and export it to Notion while staying inside Docs. Google Sheets users can pull content from Notion database into their spreadsheet. Any new submissions in Google Forms can be directly saved to Notion. Save Gmail Messages in Notion I have put together a Gmail add-on that makes it easy for you to save email messages, or any other text content, from Gmail to your Notion workspace with a click. Here’s how the app works. Step 1: Connect Gmail to Notion Step 2: Allow Access to Notion pages - if you have multiple databases in your Notion workspace, you have an option to grant access to select databases and the rest will be inaccessible to the externa

Create React App with Multiple Entry Points

Image
The Create React App frameworks lets you easily build single page applications but it doesn’t support multiple entry points. To give you an example, if a website outputs separate home pages for mobile and desktop clients, the pages could be sharing some common React components between them, and it may thus not be practical to build two completely separate React applications. Also see: Bundle React App with Gulp CRA doesn’t support multiple entry points but there are couple of ways to solve this problem. Option 1 Eject from the Create React App using the npm run eject command and update the entry inside webpack.config.js file to include multiple entry points. Option 2 Use an alternate build tool like Vite.js that includes support for multiple entry points out of the box. Option 3 Use the rewired app - it lets you easily make changes and small tweaks to the default Webpack configuration without ejecting the app. Option 4 Use REACT_APP environment variables to specify the t

Google Sheets - Find Values in One Column that are Missing in Another Column

Image
A small business maintains their staff roster in a simple Google Sheet - the column A of the sheet contains a list of all employee names and column B contains a list of employees who have been assigned to a project. The immediate task is to identify staff members who are part of the organization but have not been assigned any project yet. In other words, the manager needs to figure out all employee names from column A who are not preset in column B. There are two ways to solve this problem - visually and through formulas. Using Visual Formatting The first option would be to highlight cells in column A that are missing in column B. Inside the Google Sheet, go to the Format menu and choose conditional formatting. Here select A2:A for the range field, choose Custom Formula from the Format Cells If dropdown and paste the formula: =COUNTIF(B$2:B, A2)=0 The COUNTIF function will essentially count the occurrence of each item in Column A against the range of cells in Column B.

Get Email Alerts When COVID-19 Vaccines Become Available Near You

Image
India is currently in the midst of a second wave of the Coronavirus and this one is far more devastating than what we have seen last year. The country is reporting close to 400,000+ new cases every day but the actual count of daily infections could be much higher. The COVID-19 vaccination program in India was earlier available to people above 45 years of age but starting today (May 1), anyone above the age of 18 years is eligible for Covid-19 vaccination. COVID-19 Vaccines Near Me The government’s official website - cowin.gov.in - has a useful search section that allows you see the nearby vaccination centers in your city or zip code. You’ll also know how many vaccine doses are available at a specific center and the earliest date when the next batch of vaccine stocks are due. Based on this public data, I have developed an open-source vaccine tracker that will monitor the vaccine availability near you and will send email alerts as stocks become available. The source code of the