FaizBlog LogoFaizBlog
Back to all articles
Google Apps ScriptQR CodeGoogle SheetsOtomatisasiGenerator

Cara Generate QR Code Otomatis dari Google Sheets (Gratis, Tanpa Add-on)

Panduan lengkap bikin QR Code massal dari Google Sheets pakai Apps Script. Cocok untuk absensi, menu restoran, tiket event, dan katalog produk.

AI Insights

Generate a summary and suggested tags for this post.

Butuh QR Code untuk absensi, menu restoran, tiket event, atau link produk? Kalau kamu masih generate satu per satu di website online, itu buang waktu — apalagi kalau butuh ratusan QR sekaligus.

Solusinya: Google Apps Script + Google Sheets — cukup isi kolom data, jalankan script, semua QR muncul otomatis. Gratis, tanpa add-on, tanpa batas.

QR Code vs URL biasa

Kenapa QR Code Populer?

KebutuhanKenapa QR Cocok
Berbagi link panjangTidak perlu ketik URL manual
Absensi karyawanScan cepat pakai HP
Menu restoranTanpa sentuh, higienis
Tiket eventVerifikasi instan di pintu masuk
Katalog produkDetail lengkap dari kemasan kecil

Alur Generate QR Otomatis

Alur generate QR

Cukup 3 langkah:

  1. Isi data di Google Sheets (nama + link).
  2. Run script dari menu Apps Script.
  3. QR muncul otomatis di kolom sebelah.

Langkah 1: Struktur Sheets

Buat sheet bernama "Data QR" dengan kolom:

ABC
NamaLinkQR Code
Websitehttps://faizblog.id(otomatis)
Instagramhttps://instagram.com/faizblog(otomatis)
Menu Cafehttps://cafe.id/menu(otomatis)

Langkah 2: Script Generator QR

Buka Extensions → Apps Script → paste:

function generateQR() {
  const sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Data QR");
  const data = sheet.getDataRange().getValues();

  for (let i = 1; i < data.length; i++) {
    const [nama, link, existing] = data[i];
    if (!link || existing) continue;

    const url = `https://api.qrserver.com/v1/create-qr-code/?size=300x300&data=${encodeURIComponent(link)}`;
    const formula = `=IMAGE("${url}", 4, 200, 200)`;
    sheet.getRange(i + 1, 3).setFormula(formula);
  }
}

Klik Save → Run. Semua QR muncul di kolom C sebagai gambar (bukan link).

Contoh Pemakaian Nyata

Contoh pemakaian QR

QR Code bisa dipakai untuk:

  • Absensi karyawan — tiap karyawan punya QR unik, scan saat masuk-pulang.
  • Menu restoran — customer scan QR di meja, langsung lihat menu.
  • Tiket event — panitia scan QR di pintu, verifikasi cepat.
  • Link produk — QR di kemasan mengarah ke halaman produk.

Alternatif: QR dengan Logo di Tengah

Kalau mau QR bermerk (ada logo perusahaan di tengah), pakai API alternatif:

const url = `https://quickchart.io/qr?text=${encodeURIComponent(link)}&size=300&centerImageUrl=${encodeURIComponent("https://faizblog.id/logo.png")}`;

Simpan QR sebagai File di Google Drive

Kalau butuh QR untuk dicetak (bukan sekadar tampil di Sheets), simpan sebagai file PNG:

function simpanQRkeDrive() {
  const folder = DriveApp.getFolderById("ID_FOLDER_DRIVE");
  const sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Data QR");
  const data = sheet.getDataRange().getValues();

  for (let i = 1; i < data.length; i++) {
    const [nama, link] = data[i];
    if (!link) continue;

    const url = `https://api.qrserver.com/v1/create-qr-code/?size=500x500&data=${encodeURIComponent(link)}`;
    const blob = UrlFetchApp.fetch(url).getBlob().setName(`QR-${nama}.png`);
    folder.createFile(blob);
  }
}

Setelah Run, semua QR tersimpan di folder Drive dengan nama QR-Website.png, QR-Instagram.png, dst.

Tips Membuat QR yang Enak Discan

  • Ukuran minimal 2x2 cm kalau dicetak — kurang dari itu susah discan.
  • Kontras tinggi — hindari QR warna pucat, tetap gunakan hitam di atas putih.
  • Jangan modifikasi tengah > 30% kalau pakai logo — bisa gagal decode.
  • Test dulu sebelum cetak massal — scan pakai 2-3 aplikasi berbeda.
  • Sertakan URL text di bawah QR — backup kalau QR rusak atau tidak terbaca.

Kesimpulan

Bikin QR sendiri di Google Sheets hemat waktu, gratis, dan bisa untuk ratusan sekaligus:

  • ✅ Tanpa add-on atau tool berbayar
  • ✅ Bisa langsung tampil di Sheets atau download PNG
  • ✅ Cocok untuk absensi, menu, tiket, katalog
  • ✅ Bisa custom dengan logo brand

Kombinasikan dengan script mail merge — kamu bisa kirim QR unik per karyawan via email otomatis. Praktis! 📱