Where Technology Speaks

How ToTechnology

Import PayPal Transactions into Google Sheets

What is PayPal?

PayPal is an online payment system that allows individuals and businesses to transfer funds electronically. A PayPal transaction refers to the process of sending or receiving money through the PayPal platform.

To initiate a PayPal transaction, the sender first needs to have a PayPal account and link it to a bank account, credit card, or debit card. They then enter the recipient’s email address or mobile number, the amount of money they want to send, and any notes or instructions. Once the transaction is confirmed, the funds are deducted from the sender’s PayPal account and transferred to the recipient’s account.

PayPal transactions can be used for a variety of purposes, including online shopping, sending money to friends and family, paying bills, and accepting payments for goods and services. PayPal charges a fee for some transactions, depending on the type of account and the nature of the transaction.

How to Import PayPal Transactions into Google Sheets?

To import PayPal transactions into Google Sheets, you can use a tool called “ImportJSON” which is a custom function for Google Sheets that allows you to import JSON data from APIs and other sources directly into your spreadsheet.

Read Also: Auto-Download Podcast to Google Drive with Google Sheets

Steps To import PayPal transactions into Google Sheets :

  1. Open your Google Sheets and select the cell where you want to import your PayPal transactions.
  2. Go to the “Tools” menu, and click on “Script Editor” to open the script editor.
  3. In the script editor, copy and paste the following code:

(here the code we have used is PHP)


 * Imports all the transactions from PayPal for the given date range


 * @param {string} start_date The start date of the transaction range (format: yyyy-mm-dd)

 * @param {string} end_date The end date of the transaction range (format: yyyy-mm-dd)

 * @param {string} email The email address associated with your PayPal account

 * @param {string} password The password for your PayPal account

 * @return The transactions as a JSON object

 * @customfunction


function IMPORT_PAYPAL_TRANSACTIONS(start_date, end_date, email, password) {

  var url = ‘’ + start_date + ‘&end_date=’ + end_date + ‘&email=’ + email + ‘&password=’ + password;

  var result = UrlFetchApp.fetch(url);

  var content = result.getContentText();

  var json = JSON.parse(content);

  return json;


  • Save the script and go back to your Google Sheets. In the cell where you want to import your PayPal transactions, type the following formula:


Replace “start_date” and “end_date” with the date range you want to import (in yyyy-mm-dd format), and “email” and “password” with your PayPal account credentials.

  • Press enter and wait for the transactions to be imported. The transactions will appear as a JSON object, which you can then manipulate using Google Sheets’ built-in functions.

Note that this method may not work if PayPal changes its API, so it’s always a good idea to test it periodically and make sure it’s still working. Additionally, it’s important to keep your PayPal credentials secure and not share them with anyone.

Thamaraiselvan Boopathi

Blog About the Latest Technology, Product-Reviews, and How To Do Things? More About Gaming

One thought on “Import PayPal Transactions into Google Sheets

Comments are closed.