Skip to content

Instantly share code, notes, and snippets.

function searchAndReadPDFs() {
var threads = GmailApp.search("from:info@wolt.com has:attachment filename:pdf");
for (var thread of threads){
Logger.log(thread.getId());
var foundCodes = []; // TODO use Set
for (var message of thread.getMessages()){
for (var attachment of message.getAttachments()) {
Logger.log(message.getSubject());
Logger.log(message.getDate());
@ScDor
ScDor / whatsapp_group_imgs.py
Created April 8, 2020 14:52
whatsapp group picture extractor
import sqlite3
DB_FILE = r"PATH\TO\DB\FILE"
GROUP_ID = GROUP_ID \\ see messages.key_remote_jid, appears after the "@" sign
con = sqlite3.connect(DB_FILE)
with con:
cur = con.cursor()
image_paths = cur.execute(f"select file_path from message_media where "