{{ __('More / Integrations / Google Sheets') }}
{{ __('Sync your') }} {{ __('Google Sheet') }} with a {{ \App\Models\SystemSetting::get('app_name', config('app.name', 'WaDesk')) }} shop
@if ($user->sheets_api_key_hash) API key active @endif
@if (session('status'))
{{ session('status') }}
@endif @if (session('sheets_key_once'))
{{ __('Copy this now — shown once') }}

⚠ Save it somewhere safe. We can't show it again — only the last 8 characters will be visible in your account after this page reloads.

@endif {{-- Big hero --}}
{{ __('Workspace add-on') }}

{{ __('Edit your shop in a') }} {{ __('Google Sheet') }}.

{{ __('Manage products like you manage any spreadsheet. Add a row, tweak a price, drop in an image URL — then click "Sync to :brand" in the add-on sidebar and your storefront updates instantly.', ['brand' => brand_name()]) }}

{{-- Steps --}}
{{-- Step 1 --}}
1
{{ __('Install the add-on') }}

{{ __('Two ways to get the add-on into your Sheet:') }}

{{-- Option A: marketplace (live once we publish) --}}
{{ __('Option A') }} {{ __('From Google Workspace Marketplace') }} {{ __('Pending publish') }}

{{ __('The recommended way once the add-on is live on the Marketplace. Until then, use Option B below.') }}

Open Marketplace
{{-- Option B: paste files into script.google.com --}}
{{ __('Option B') }} {{ __('Upload to Apps Script manually') }} {{ __('Works now') }}

{{ __('Copy these 3 files into a new Apps Script project at') }} {{ __('script.google.com') }}. {{ __('Code.gs') }} is pre-configured to call THIS {{ \App\Models\SystemSetting::get('app_name', config('app.name', 'WaDesk')) }} instance — no manual URL edits needed.

@foreach ($fileMeta as $name => $meta) @php $kbSize = $meta['exists'] ? number_format($meta['size'] / 1024, 1) . ' KB' : '—'; @endphp
@if (str_ends_with($name, '.json')) @elseif (str_ends_with($name, '.html')) @else @endif
{{ $name }}
{{ $meta['desc'] }} · {{ $kbSize }}
@if ($meta['exists']) Download @else {{ __('missing on server') }} @endif
@endforeach
{{ __('How to paste them in') }}
  1. {{ __('Open') }} {{ __('script.google.com') }}{{ __('New project') }}
  2. {{ __('Rename it') }} {{ __(':brand WhatsApp Shop', ['brand' => brand_name()]) }}
  3. {{ __('Project Settings') }} → tick {{ __('Show appsscript.json manifest file in editor') }}
  4. {{ __('Back in editor: click') }} {{ __('appsscript.json') }} → paste contents
  5. {{ __('Click') }} {{ __('Code.gs') }} → replace with contents above
  6. {{ __('Click') }} + next to "Files" → {{ __('HTML') }} 3 times → name them {{ __('Dialog') }}, {{ __('Settings') }}, {{ __('Help') }} (no extension) → paste each file's contents
  7. {{ __('Ctrl+S') }}{{ __('Deploy') }}{{ __('Test deployments') }} → select {{ __('Editor add-on') }} (NOT Workspace add-on) → {{ __('Install') }}
  8. {{ __('Open any Google Sheet →') }} {{ __('Extensions') }}{{ __(':brand WhatsApp Shop', ['brand' => brand_name()]) }}{{ __('Create shop') }}
{{-- Step 2 --}}
@if ($user->sheets_api_key_hash) @else 2 @endif
{{ __('Generate your API key') }}

{{ __('The add-on needs an API key to know which :app workspace to sync to. Keep this key private — anyone with it can update your shop.', ['app' => \App\Models\SystemSetting::get('app_name', config('app.name', 'WaDesk'))]) }}

@if ($user->sheets_api_key_hash)
{{ __('Current key') }}
wsn_live_••••••••{{ $user->sheets_api_key_suffix }}
{{ __('Last used') }}
@if ($user->sheets_api_key_last_used_at) {{ $user->sheets_api_key_last_used_at->diffForHumans() }} @else {{ __('never') }} @endif
@csrf
@csrf
@else
@csrf
@endif
{{-- Step 3 --}}
3
{{ __('Open the add-on in a Sheet') }}

{{ __('Open any Google Sheet →') }} {{ __('Extensions') }}{{ __(':brand WhatsApp Shop', ['brand' => brand_name()]) }}{{ __('Open') }}. Paste your API key. Done — the sidebar lists your existing shops and lets you create new ones from sheet rows.

{{ __('Required sheet columns') }}
@foreach ([ 'Product Name' => 'Spring Tee', 'Category' => 'Apparel', 'Description' => 'Soft 100% cotton', 'Image URL' => 'https://…', 'Price' => '999', 'SKU' => 'ST-001', 'Stock' => '20', 'Active' => 'Y / N', ] as $col => $eg)
{{ $col }} {{ $eg }}
@endforeach
{{-- Step 4 (sync) --}}
4
{{ __('Sync to :brand', ['brand' => brand_name()]) }}

{{ __('Click') }} {{ __('Sync to :brand', ['brand' => brand_name()]) }} in the sidebar. The add-on uploads your rows and your storefront is live in 2 seconds. Re-sync any time the sheet changes.

{{-- Side rail --}}
{{-- ===== File viewer modal ===== --}}