Native B2B is a professional-grade Product Catalog and Request for Quote (RFQ) system for WordPress. Designed with a native-first, zero-bloat architecture, it provides a high-speed alternative for wholesale businesses and lead generation sites.
[ezls_gallery columns="4"] on any page to display your product grid.[ezls_inquiry_btn] on custom pages to trigger the RFQ popup.This integration uses a secure Google Apps Script to send inquiry data to your Google Sheet in real-time.
Part 1: Create the Google Sheet & Apps Script
B2B Inquiries).Time, ID, Product, Name, Email, Tel, IM, Message, Link.Extensions -> Apps Script.Paste Script Code: Delete any default code in the Code.gs file and paste the entire script below:
// Copyright (c) 2024 EEZZ.NET. All rights reserved.
// This script is provided for use with the “Native B2B” WordPress plugin.
const API_PASSWORD = “YOUR_SECRET_PASSWORD”;
const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
function doPost(e){try{if(!e||!e.postData||!e.postData.contents){throw new Error(“Invalid request: No data received.”)}const params=JSON.parse(e.postData.contents);if(params.AuthKey!==API_PASSWORD){return createJsonResponse({“status”:”error”,”message”:”Authentication failed.”})}const newRow=[params.Time||new Date(),params.ID||’N/A’,params.Product||’N/A’,params.Name||’N/A’,params.Email||’N/A’,params.Tel||’N/A’,params.IM||’N/A’,params.Message||’N/A’,params.Link||’N/A’];const lock=LockService.getScriptLock();lock.waitLock(30000);try{sheet.appendRow(newRow)}finally{lock.releaseLock()}return createJsonResponse({“status”:”success”})}catch(error){console.error(“Error processing request: “+error.toString());return createJsonResponse({“status”:”error”,”message”:”An internal error occurred: “+error.message})}}
function createJsonResponse(data){return ContentService.createTextOutput(JSON.stringify(data)).setMimeType(ContentService.MimeType.JSON)}
Set Password & Save: In the script, change "YOUR_SECRET_PASSWORD" to your own strong password and save the project.
Part 2: Deploy and Configure
Deploy -> New deployment. Select type Web app.Anyone. This is critical.Deploy, authorize the script (you may need to click “Advanced” -> “Go to…”), and copy the generated Web app URL.B2B Products -> Settings. Paste the Web app URL and your password into the Google Sheets section and save changes.This plugin connects to third-party services to provide notifications, data sync, and spam protection. No data is sent to these services unless you explicitly configure the corresponding credentials in the plugin settings.
Akismet Anti-Spam
Telegram Bot API
Slack (Incoming Webhook)
Discord (Webhook)
Feishu / Lark (Webhook)
Bark
ntfy
Google Sheets (via Apps Script Webhook)