SquareWorks Automate
SquareWorks HomeSupportRelease Notes
  • Automate Documentation
  • Automate Features
    • Accounts Payable Dashboard
    • Advanced Vendor Onboarding
    • Invoice AI
    • Approval Automation
    • Real-Time 3-Way Match
    • Advanced Document Management
    • Advanced Check Printing
    • Payment Automation
    • Expense Accrual Automation
    • Vendor Request
    • Journal Reversal
  • Automate Configuration
    • Setting Up SquareWorks Automate
      • Automate Overview & Prerequisites
      • Install & Link Automate SuiteApp
      • Verify Password Policy & Setup
    • Advanced Vendor Onboarding
      • Installing and Updating the Bundle
      • Configuring Key Settings
      • Roles, Permissions, and Queues
      • Setting Up Onboarding Forms
      • Automation and Follow Ups
    • Advanced Document Management
      • Introduction and Initial Installation
      • Legacy and Standard Settings
      • Working with NetSuite File Cabinet and AWS S3 Storage
    • Accrual Automation
      • Enabling Accrual Automation
      • General Ledger Segmentation
      • Managing Included And Excluded Accounts
      • Bill Custom Date Field
      • Understanding Accrual Types
    • Invoice AI
      • Enabling Invoice AI
      • Advanced Invoice AI Settings
      • Configuring Tax and Freight Capture
      • Configuring Vendor Override Settings
      • Accessing Invoice AI Directions
      • Creating and Scoping New Directions
      • Whole-Invoice Directions: Translation & Page-Range Control
      • Custom Field Extraction with Directions
      • Accessing Invoice AI Rules
      • Creating a New Invoice AI Rule
    • Approval Automation
    • Real-Time 3-Way Match
      • Installing the 3-Way Match Bundle
      • Understanding 3-Way Match Settings
      • Enabling 3-Way Match and Defining Thresholds
      • Managing Variances, Payment Holds, and Overrides
      • Override Settings
    • Advanced Check Printing
    • Payment Automation
      • Implementation Check List
      • Verify Business Entities
    • Vendor Request
    • Journal Reversal
    • Impact of Subscription Cancellation
    • Configure Inbound Invoice Routing
  • Automate FAQs
    • Check Printing and Configuration
      • How can I reprint a check run?
      • How can I change a check number?
      • How can I add another bank account number from an existing bank to print checks?
      • Where does the address come from that’s printed on a check and how can it be changed?
    • ACH Setup and Timing
      • How do you connect to my bank to initiate ACH transactions?
      • Do I have to use a specific bank with Payment Automation?
      • How long does it take for ACH payments to reach a payee?
      • Why is my ACH payment not available for release?
    • ACH Troubleshooting and Reversals
      • What should I do if a payment fails?
      • How can I cancel a pending ACH payment?
      • How can I request an ACH reversal after the payment has processed?
      • Will the balance automatically transfer back to my account after an ACH payment is canceled?
    • Automate Email Handling
      • Why are emails not arriving at my vendor's inbox?
    • Invoice AI Setup and Configuration
      • How do I see the Automate Portlet on my home dashboard?
      • How do I get notified if someone sends in a non-supported attachment to the capture addess?
  • Automate Support
  • Upgrade Process
  • Release Notes
    • Automate 2025.1
    • Automate 2024.2
    • Automate 2024.1
    • Automate 2023.2
    • Automate 2023.1
    • Automate 2022.2
    • Legacy Editions
  • ⚠️Automate Platform Alerts
Powered by GitBook
On this page

Was this helpful?

  1. Automate Configuration

Configure Inbound Invoice Routing

Resolve Inbound Email Rejection from NetSuite Vendors

PreviousImpact of Subscription CancellationNextAutomate FAQs

Last updated 2 months ago

Was this helpful?

Customers using the SquareWorks Invoice Email Capture functionality may experience issues when invoices from Vendors also using NetSuite are sent. This is due to the configuration of NetSuite’s own Inbound Email plugin, designed to prevent infinite “looping” between two NetSuite instances.

To resolve this issue, users can configure their email client to forward the invoices to their NetSuite account. Vendors would then send invoices to this non-NetSuite account, which will then automatically forward the invoice to NetSuite, effectively creating an intermediary step to bypass the NetSuite plugin controls.

Configuring in Outlook:

Within Outlook, create a rule to automatically forward all emails received from a NetSuite account:

Note: Configure the rule to check for the X-NetSuite header (as shown above) so only messages originating from NetSuite get forwarded. This assumes that any non-NetSuite emails are already being handled via separate forwarding configurations.

Configuring in Gmail:

Gmail has a built-in automatic forwarding feature, but emails forwarded in this way will not appear in your NetSuite inbox if they originate from a NetSuite account. To ensure these emails are forwarded correctly, follow these steps:

  1. Setup email forwarding in Gmail

Verify that your Gmail inbox is already configured to forward all emails to your NetSuite inbound email address. If not setup, configure Gmail to forward email addresses to NetSuite before proceeding.

  1. Create a new Google Apps Script project:

Go to and create a new project. Name it “Forward NetSuite Emails”.

Replace the default code with the script below: Note: Update the email address in the script (netsuite-inbound-email@your-account.email.netsuite.com) to your actual NetSuite inbound email address.

function forwardNetSuiteEmails() { 

  var forwardAddress = "netsuite-inbound-email@your-account.email.netsuite.com"; 

  var forwardedLabel = GmailApp.getUserLabelByName("Forwarded") || GmailApp.createLabel("Forwarded"); 

  var threads = GmailApp.search("in:inbox newer_than:1d -label:Forwarded"); 

  threads.forEach(function(thread) { 

    thread.getMessages().forEach(function(message) { 

      if(message.getHeader("X-NetSuite")) { 

        var fromEmail = message.getFrom(); 

        var originalSubject = message.getSubject(); 

        var newSubject = originalSubject + " (from: " + fromEmail + ")"; 

        message.forward(forwardAddress, { subject: newSubject }); 

        forwardedLabel.addToThread(thread); 

      } 

    }); 

  }); 

} 
  1. Enable the Gmail API: In the Apps Script editor, click the + next to Services and add the Gmail API.

  2. Authorize the script:

    1. Click Run to test the script.

    2. When asked to authorize, click Review permissions, then select your account.

    3. If you see a warning about unverified apps, click Advanced and proceed with “Go to Forward NetSuite Emails (unsafe)”

    The script will search the Gmail inbox for messages from NetSuite in the past 24 hours, forward them to your NetSuite inbox address, and label them “Forwarded.” Any labeled emails will be ignored in subsequent runs.

  3. Set up a time-driven trigger:

    1. Open the Triggers page in the Apps Script editor.

    2. Click Add Trigger and choose:

      1. Choose which function to run: forwardNetSuiteEmails

      2. Choose which deployment should run: Head

      3. Select event source: Time-driven

      4. Select type of time based trigger: Hours timer

      5. Select minute interval: Every hour

      This trigger will run the script automatically on an hourly basis.

script.google.com