メインコンテンツにスキップ

theblop

The Big List of Protests - An AI-assisted Protest Flyer parser and event aggregator

AI Summary

Event Flyer Parser

Provides a workflow that reads event-flyer images arriving in Gmail, extracts structured details with AI, and records them in Google Sheets automatically.

Target Users

Intermediate GAS users such as community or non-profit organisers who currently aggregate emailed event information manually.

Problems Solved

Manually typing event data from image flyers attached to emails is time-consuming and error-prone.

Tags

Main Features

1
End-to-end automation from email to sheet

A GAS script periodically monitors Gmail, stores images to Drive, calls Runpod-hosted AI for parsing, and writes the results to Sheets in one pipeline.

2
Async job handling to bypass GAS time limits

Uses a Jobs sheet and polling triggers so long AI inference on Runpod can finish without hitting the 6-minute GAS execution limit.

3
Single-step OCR + structured extraction

A MiniCPM multimodal model with few-shot examples and a system prompt performs OCR and outputs JSON fields in the same call.

Usage Examples

One-click flyer processing

The snippet below assumes all script properties (Sheet IDs, Drive folder ID, Runpod endpoint, API key) are already set. Running it manually will ingest emails and create an AI job in one go.

/**
 * One-click entry point.
 *   1. Scan unread emails and log them to RawData
 *   2. Submit unprocessed rows to Runpod for AI parsing
 */
function runOnce() {
  // Ingest unread emails and append to RawData
  processEmails();
  
  // Launch AI jobs for rows still marked "false"
  launchRunPodJobs();
  
  // pollRunPodJobs is scheduled automatically inside launchRunPodJobs()
}

Save this in the Apps Script editor and execute it. Image flyers attached to unread Gmail messages are stored to Drive, a Runpod job is created, and the parsed event data will later appear in the Processed sheet automatically.