WHAT THIS DOES
Turn Google Sheets, Airtable, or WhatsApp into a lightweight help desk. New/updated rows or short WhatsApp conversations flow into MOBLE → CRM → Tickets. The workflow validates input, optionally uses AI to calculate an SPI score (Status, Priority, Importance), then creates or updates a Ticket. Every run writes an entry to a Google Sheets Sync Log for auditing. (Airtable workflow reference.) (WhatsApp aggregation & reclassification flow.)
WORKFLOWS INCLUDED
- Google Sheets → MOBLE Tickets (.json)
- Airtable → MOBLE Tickets (.json) — includes Last Modified trigger and full SPI handling.
- WhatsApp → MOBLE Tickets (v2) (.json) — 2-minute conversation aggregation, SPI scoring, update+Enquiry path for existing Tickets.
SETUP
1) Create Your Sheets
- Make a Google Sheet from Tickets Source Sheet and keep the tab named Tickets. (Email required; First Name or Last Name required. Leave Status blank to let AI calculate SPI.)
- Make a second Google Sheet from MOBLE-Tickets-Sync-Log.xlsx with the tab named Sync Log. The workflows append rows with action, status code, MOBLE ID, SPI stamp, and timestamp.
2) Import the n8n Workflow(s)
- In n8n: Create Workflow → Import from File → choose one or more:
- Google Sheets → MOBLE Tickets (.json)
- Airtable → MOBLE Tickets (.json)
- WhatsApp → MOBLE Tickets v2 (.json)
- Leave each workflow Inactive until credentials are set.
3) Add Trigger Credentials
Google Sheets Trigger
- Open the When Row Added or Updated node → create/select Google Sheets OAuth2.
- Document: your Tickets sheet Sheet: Tickets.
Airtable Trigger
- Create/select Airtable Personal Access Token (or OAuth2).
- Base: your Tickets base Table: Tickets Trigger Field: Last Modified Time (required).
WhatsApp Webhook
- Add WhatsApp Cloud API credential (Meta Developer).
- Copy the workflow webhook URL into your Meta App (subscribe to “messages”). The workflow aggregates a short conversation (2-minute idle timeout) before sending to AI for SPI.
4) Add MOBLE API Credential
- In MOBLE: Settings → API → copy your key (
ak_…). - In each HTTP Request node (Check/Create/Update Ticket, and Enquiry for the WhatsApp flow) add a Header Auth credential:
- Name: Authorization
- Value: Bearer ak_XXXXXXXXXXXXXXXX
- Re-select this credential in all API nodes.
5) (Optional) Add OpenAI Credential
- If you want AI to calculate SPI when Status is blank, add an OpenAI credential to the AI node. (Model set to gpt-4o-mini in the artifacts.)
6) Configure the Sync Log Node
- Open the Log to Sync Log node → attach your Google Sheets OAuth2.
- Document: your Sync Log sheet Sheet: Sync Log.
- Columns are pre-mapped (Email/Action/Status Code/MOBLE ID/Airtable ID/SPI Stamp/SPI Source/Reasoning/Error/Timestamp for Sheets/Airtable; WhatsApp flow logs workflow name, trigger, counts, duration, and AI status).
7) Test, Then Activate
- In n8n click Execute Workflow (manual run).
- Add a test row/record with a valid email and a first or last name (leave Status blank to exercise AI SPI).
- For WhatsApp: send a short test conversation, wait ~2 minutes for aggregation, then check MOBLE Ticket and the Sync Log.
WHATSAPP WORKFLOW (OPTIONAL)
- Aggregates messages for 2 minutes of inactivity, builds a transcript, and calculates SPI.
- Create vs Update: if a Ticket exists (email derived as
{phone}@whatsapp.temp) it updates the Ticket and creates an Enquiry for the audit trail; else it creates a new Ticket. - Supports reclassification via SPI stamp (e.g., S-P-I-SL to route to Sales Leads).
SOURCE TABLE / SHEET COLUMNS
- Email — required; must be valid.
- First Name / Last Name — at least one required.
- Status, Priority, Importance — optional; if Status empty → AI calculates SPI; if set (even 0) → uses provided SPI.
- Other optional fields: Mobile, Company, Website, Issue, Resolution, Assigned To, Ticket Type, Category, Date Reported, Date Resolved, Tags, Source, Notes, Industry, Option 1-10.
REPORT: SYNC LOG (GOOGLE SHEETS)
- Sheets/Airtable flows: Email, Action (created/updated/validation_failed), Status Code, MOBLE ID, Airtable ID (if applicable), SPI Stamp/Source/Reasoning, Error, Timestamp.
- WhatsApp flow: Timestamp, Workflow, Trigger, Source ID (phone), Destination, Action (created or updated + enquiry), Status, SPI Stamp/Reasoning, Ticket ID, Enquiry ID, Message Count, Duration (sec), Error, AI Success.
VALIDATION & LOGIC
- Required: valid Email; First or Last Name present.
- AI SPI: runs only if Status is empty; otherwise manual SPI is respected.
- Create vs Update: API looks up by email; creates a new Ticket or updates the existing record (WhatsApp also writes an Enquiry on update).
- Reclassification (WhatsApp): S-P-I-GE/SL/PT to move to Enquiries/Leads/Tasks.
TROUBLESHOOTING
- Nothing syncing: Workflow must be Active; enable only one trigger per workflow.
- 401/403: Check Header Auth on all MOBLE API nodes → Authorization: Bearer ak_….
- Validation errors: Confirm Email format and that First or Last Name is present.
- No Sync Log rows: Verify Google Sheets OAuth, Document name, and the Sync Log tab.
- WhatsApp not firing: Confirm webhook in Meta dashboard, credentials, and allow the 2-minute aggregation window to elapse.
SECURITY: Restrict n8n access to trusted staff. Rotate MOBLE API keys regularly and revoke credentials when staff offboard. (Artifacts ship with sensible timeouts/retries and conservative defaults for SPI.)