Automatically Sync Plerdy Emails to Google Sheets

Andrew Chornyy - 001
Andrew Chornyy

CEO Plerdy — expert in SEO&CRO with over 14 years of experience.

Stay on top of your email data effortlessly by syncing Plerdy directly to Google Sheets. Follow these simple steps to set up automatic email updates every five minutes.

What You Need:

  • A Google Account with access to Google Sheets.
  • A Plerdy Account with API access (ensure you have your API Key, User ID, and Form ID).

Step 1: Get the Google Sheets Template

To make the setup easier, we’ve created a Google Sheets template with all the necessary configurations. Click the link below to make your own copy:

🔗 Copy the Plerdy Email Sync Template

Automatically Sync Plerdy Emails to Google Sheets - 0001

After clicking the link, you’ll be prompted to make a copy of the spreadsheet. Click “Make a copy” to add it to your Google Drive.

Step 2: Enter Your Plerdy Credentials

You should in your Plerdy account, follow: Popups > API integration > Webhooks

Automatically Sync Plerdy Emails to Google Sheets - 0002

  1. Open the “Settings” Sheet:
    • Locate the sheet named “Settings” within your spreadsheet.
  2. Input Your API Details:
    • API_KEY: Enter your Plerdy API Key in cell A2.
    • USER_ID: Enter your User ID in cell B2.
    • FORM_ID: Enter your Form ID in cell C2.

Automatically Sync Plerdy Emails to Google Sheets - 0003

Make sure all your credentials are accurate to ensure successful synchronization.

Step 3: Authorize the Script

  1. Access Apps Script:
    • In your Google Sheet, go to Extensions > Apps Script.
  2. Authorize Permissions:
    • Upon opening, you’ll need to authorize the script to access your Google Sheets and make external requests.
    • Click Run on the main function.
    • Follow the prompts to grant the necessary permissions.

This step is crucial for the script to function correctly.

Step 4: Set Up Automatic Updates

  1. Create a Trigger:
    • In the Apps Script editor, select the createFiveMinuteTrigger function from the dropdown menu. The number of allowed requests to read emails is 1 email per minute.
    • Click the Run button (▶️) to set up a trigger that runs every five minutes.
  2. Confirm the Trigger:
    • Go back to your Google Sheet.
    • Navigate to Extensions > Apps Script.
    • Click on the Triggers icon (🔔) in the left sidebar.
    • Ensure there’s a trigger set to run the main function every five minutes.

Your sheet will now automatically update with new emails every five minutes.

Step 5: Verify the Setup

  1. Initial Sync:
    • Run the main function manually by selecting it and clicking Run.
    • Check the “Emails” sheet to ensure data is populated correctly.
  2. Automatic Updates:
    • Wait for five minutes and verify that new data appears in the “Emails” sheet.
    • Repeat this to confirm consistent syncing.

Managing Your Triggers

  • To Stop Automatic Updates:
    • Open the Apps Script editor.
    • Click on the Triggers icon (🔔).
    • Delete the trigger associated with the main function.
  • To Change the Update Frequency:
    • Modify the createFiveMinuteTrigger function in the script if you prefer a different interval.

Additional Tips:

  • Check Your Quotas:
    • Google Apps Script has daily quotas. Running a script every five minutes can reach up to 288 executions per day. Ensure your Google account type supports this frequency. Free accounts typically have lower quotas compared to Google Workspace accounts.
  • Handle Errors Gracefully:
    • The script includes logging to help you troubleshoot. Regularly check Logs (View > Logs) in the Apps Script editor for any errors or issues.
  • Keep Your API Credentials Safe:
    • Ensure that your API_KEY, USER_ID, and FORM_ID are kept secure and not shared publicly.

Troubleshooting:

  • No Data in Emails Sheet:
    • Check the Logs in Apps Script for any errors.
    • Ensure your API credentials in the Settings sheet are correct.
  • Trigger Not Working:
    • Verify that the trigger is correctly set up in the Triggers section.
    • Make sure you have granted all necessary permissions to the script.
  • Exceeded Quotas:
    • If you receive quota-related errors, consider upgrading to a Google Workspace account or reducing the frequency of the triggers.

Was this helpful?