Laboratorio · da rifare a casa
Come costruirsi, da soli e gratis, un foglio che ogni lunedì mattina va a leggere i portali dei bandi, tiene solo quello che riguarda gli under 35 e prepara una mail di riepilogo. Dieci passi, tre quarti d'ora, nessuna riga di codice da scrivere.
Tutto il progetto vive dentro un solo Foglio Google. Non c'è nessun server, nessun sito da comprare, niente da installare sul computer: se un giorno vuoi buttare via tutto, butti via il foglio e non resta niente in giro.
La chiave di chi te l'ha data, la sua sveglia, i suoi destinatari. È giusto così: da adesso il radar è tuo, gira sul tuo account e consuma la tua quota, non quella di un altro.
Hai un Foglio Google aperto, sul tuo Drive, che si chiama Radar opportunità. Se hai fatto la copia, in basso vedi già tre linguette: FONTI, OPPORTUNITÀ, LOG.
Gemini è il modello che legge le pagine dei bandi e ne tira fuori le opportunità. Per farlo lavorare per te serve una chiave: una lunga sequenza di lettere e numeri che dice «questa richiesta arriva da me». È gratuita entro un certo numero di richieste al giorno — molte più di quante ne farà il radar.
Le chiavi nuove non somigliano a quelle vecchie: va bene lo stesso. Se invece ti compare una richiesta di carta di credito, sei finito sulla console a pagamento di Google Cloud: torna indietro e usa l'indirizzo qui sopra, che è quello di AI Studio.
Quella chiave è come la password del citofono: chi ce l'ha può fare richieste a tuo nome, e consumare la tua quota. Non incollarla in una chat, non mandarla per mail, non scriverla dentro il codice. Al passo 5 la metti in un posto dove resta al sicuro anche se il foglio lo dai a qualcun altro.
Salta questo passo se hai fatto la copia del foglio pronto: il programma ce l'hai già. Serve solo a chi è partito da un foglio vuoto.
Dentro ogni Foglio Google c'è un editor di programmi che quasi nessuno sa che esiste. Si chiama Apps Script, è gratis, ed è lì che vivrà il radar. Sono due copia-incolla.
Pannello (senza scrivere .html).Pannello, con la P maiuscola: è l'unico che il programma cerca per nome. Se lo chiami diversamente, il menu funziona ma le impostazioni non si aprono.
Nella colonna di sinistra vedi due file, Codice.gs e Pannello.html, e in alto non c'è più scritto «Modifiche non salvate». Nessuna conferma, nessun errore: il programma non è ancora partito, quindi non può dirti niente.
Da qui in poi non tocchi più il codice: tutto quello che serve sta in un menu, dentro il foglio.
Google non ha revisionato questo programma — e non lo farà: la revisione serve alle app che si pubblicano per migliaia di sconosciuti. Questo è un programma che tu hai messo nel tuo account e che gira solo sul tuo foglio. Quel messaggio dice esattamente questo, con parole che sembrano peggiori di quello che sono.
Quello che invece vale la pena leggere è l'elenco dei permessi: scrivere in questo foglio, uscire in rete per leggere i portali, creare bozze in Gmail. Non c'è il permesso di inviare: la mail resta ferma finché non la mandi tu. Se un giorno accenderai l'invio automatico, Google ti chiederà un permesso in più — ed è giusto che te lo chieda.
Compare l'avviso «Foglio pronto» e in basso trovi le tre linguette FONTI, OPPORTUNITÀ, LOG, con le intestazioni blu, la prima riga bloccata e la tendina sì / no sulla colonna C.
Un pannello laterale con tutto quello che si può cambiare senza programmare. È anche il posto dove la chiave sta al sicuro: non finisce nel foglio, quindi non viaggia con le copie.
Se invece dice che il modello non esiste, sceglilo dalla tendina — i nomi cambiano ogni pochi mesi e non sono gli stessi per tutte le chiavi. Se dice che la quota è esaurita, la chiave è buona: sta solo chiedendo di aspettare.
Regole aggiuntive è il posto in cui il radar diventa tuo: ci scrivi in italiano cosa tenere e cosa no — «tieni solo ciò che riguarda il Vallo di Diano», «scarta i corsi a pagamento». Una regola alla volta, e si riprova: due insieme non dicono quale ha funzionato. Le regole nate da un errore che hai visto valgono dieci volte quelle pensate a tavolino.
È il passo che decide la qualità di tutto il resto. Il radar non gira per tutto internet: guarda solo le pagine che gli dai tu. È il suo limite più importante, e va detto ad alta voce ogni volta che lo mostri a qualcuno — se una fonte manca, non la vede.
FONTI. Trovi già qualche riga d'esempio: tienile o cancellale.sì dalla tendina, D una nota per ricordarti perché l'hai messa.Il radar legge la pagina così com'è: non esegue i programmi che il sito fa girare nel browser. Questo taglia fuori gran parte dei portali pubblici, che l'elenco dei bandi lo costruiscono proprio così — per il radar quelle pagine sono vuote, e infatti risponde, correttamente, che non c'è niente.
Due regole: mai le home (servono le pagine di elenco avvisi) e provare prima di fidarsi. Una fonte che non risponde lo scrive nel registro; una che risponde con soli menu sembra funzionare e non porta mai niente.
Provate il 2 agosto 2026 — funzionano
| Fonte | Indirizzo | Esito della prova |
|---|---|---|
| Giovani2030 | giovani2030.it/bandi-e-opportunita/ | 8 opportunità con scadenze vere |
| Politiche Giovanili | politichegiovanili.gov.it/comunicazione/avvisi-e-bandi/ | 1 bando, scadenza corretta |
| Agenzia Giovani | agenziagiovani.it | 8 fra corsi e call europee |
| Eurodesk | eurodesk.it/notizie | 8 voci |
| Cliclavoro | cliclavoro.gov.it | risponde bene |
Provate — non funzionano così come sono
| Indirizzo | Perché no |
|---|---|
| bandi.sviluppocampania.it | risponde «JavaScript non è abilitato»: senza browser la pagina non esiste |
| portale-giovani.regione.campania.it | poche centinaia di battute di soli menu |
| le home dei portali | sono vetrine: i contenuti stanno nelle pagine interne |
È la pagina avvisi del tuo Comune. Nessun portale nazionale la contiene, ed è esattamente il motivo per cui questo strumento ha senso in un ufficio piccolo: fa il lavoro che nessun altro sta facendo per il tuo territorio.
Prima a secco, per sapere quanto costerebbe; poi davvero.
OPPORTUNITÀ, poi LOG.Se dice nessuna riga nuova, non è un guasto: nel registro c'è scritto perché. Spesso vuol dire che le pagine non sono cambiate dall'ultima volta — ed è una buona notizia, perché quel controllo è gratis.
Prima si scarta tutto quello che si può scartare gratis, e solo su quel che resta si spende: le pagine troppo corte o senza una sola parola da bando non arrivano al modello; le pagine identiche al giro precedente nemmeno — è il risparmio più grosso, perché un portale pubblica ogni due settimane e il radar passa ogni lunedì. Poi c'è un tetto duro di richieste per giro: quando si raggiunge, il giro si chiude in ordine e le fonti rimaste si leggeranno la volta dopo. Meglio un giro incompleto che una quota bruciata a metà.
È il passo che nessuno salta. Non serve a fidarsi del radar: serve a sapere quanto fidarsi, che è una cosa diversa e più utile.
OPPORTUNITÀ e apri il Link in colonna G.da verificare a quello che vuoi: ok, segnalata, scartata. Quella colonna la scrive sempre una persona, mai il programma.LOG, poi aggiungi una regola nel pannello (Regole aggiuntive) e rilancia.Se un dato non è scritto per esteso nella pagina, la casella resta vuota. Non lo deduce, non lo stima, non lo ricava dal contesto. Una casella vuota si nota; una data sbagliata no.
Le pagine di elenco raccontano poco: spesso avrai titolo e scadenza, e il resto vuoto. È normale — il dettaglio sta nella pagina del singolo bando, che il radar per ora non apre.
Non entrano: se la data c'è ed è passata, la riga viene scartata e lo scarto finisce nel registro. Ma solo quando la data è scritta e leggibile: «prossimamente» o «fino a esaurimento fondi» vogliono dire non lo sappiamo, e allora la riga resta. Per togliere vale la stessa regola che vale per aggiungere: non si inventa niente.
Il radar prepara. Non spedisce. È la riga di codice che conta più di tutte le altre messe insieme.
Perché è ciò che rende questo strumento adottabile da un ufficio pubblico. Un agente che manda email da solo, di notte, con scadenze che nessuno ha controllato, è un problema nuovo — e la prima cosa che farebbe togliere di mano lo strumento. Nel pannello c'è un interruttore per l'invio automatico: è spento, e chi lo accende si prende quella responsabilità. Ogni invio automatico resta scritto nel registro.
È questo passo a trasformare un programma in un agente: da qui in poi lavora quando tu non ci sei.
Compare «Da adesso parte da solo ogni lunedì verso le 8, anche a computer spento». Da 🛰️ Radar → Diagnostica vedi in ogni momento se la sveglia è accesa e com'è andato l'ultimo giro.
Prima cosa, sempre: 🛰️ Radar → Diagnostica. Controlla fogli, chiave, fonti, destinatari, sveglia e ultimo giro nell'ordine in cui le cose accadono, e dice a che punto si è rotto.
| Sintomo | Che cosa è successo |
|---|---|
| «Manca il foglio…» | una linguetta è stata rinominata: Prepara il foglio la rimette |
| «Manca la chiave di Gemini» | hai copiato il foglio da qualcun altro: la chiave non viaggia con le copie, mettine una tua |
| «chiave rifiutata» | chiave sbagliata o cancellata da AI Studio |
| «il modello non esiste» | scegli il modello dalla tendina: i nomi cambiano ogni pochi mesi e non sono uguali per tutte le chiavi |
| «quota esaurita» | finite le richieste gratuite di oggi: riprende al prossimo giro. Se capita spesso, scegli un modello lite |
| «risposta troncata» | alza lunghezza massima della risposta nelle impostazioni avanzate |
| «il portale ha risposto 403» | quel sito non si lascia leggere dai programmi: è un dato interessante, non un fallimento. Cerca un'altra pagina o toglila |
| nessuna riga, nessun errore | guarda il LOG: quasi sempre è «pagina identica al giro scorso». Per forzare: Fai rileggere tutte le pagine |
OPPORTUNITÀ: il programma scrive contando le posizioni.FONTI: senza almeno un indirizzo, il riepilogo non può essere intestato a nessuno.Tutto il programma è pubblico, con licenza MIT: si legge, si copia, si modifica, si porta nel proprio Comune. Sta qui — github.com/logika-studio/radar-opportunita.
Nel codice non c'è nessuna chiave e nessun indirizzo email, ed è giusto che resti così. La chiave sta nelle proprietà del progetto (ci va dal pannello, passo 5) e gli indirizzi nella colonna E del foglio FONTI (passo 6). Vuol dire che questo codice lo puoi dare a chiunque per intero, senza toglierne niente — ed è esattamente quello che stiamo facendo.
Per installarlo bastano due file — è la cartella installazione-rapida/, che li impacchetta —, ma il programma vero è diviso in sette, e la divisione non è tecnica: segue l'ordine in cui le cose accadono.
| File | Che cosa fa |
|---|---|
| 00-Configurazione | i valori di partenza — età, modello, tetto delle richieste, giorno della sveglia. Non si toccano dal codice: si cambiano dal pannello, e il codice resta com'è. |
| 01-Fonti | va a prendere le pagine e le riduce a testo. È il pezzo che dipende da cose che non controlli: quando un sito cambia veste, è qui che si rompe — e per questo ogni errore finisce nel LOG invece di fermare il giro. Qui stanno anche i due filtri che risparmiano. |
| 02-Gemini | il cuore: le istruzioni che il modello legge prima di ogni pagina, la forma della risposta, i ritentativi educati, lo scarto dei bandi già scaduti. È l'unico punto che spende. |
| 03-Foglio | scrive le righe e il registro. Poche righe, nessuna intelligenza: deve solo mettere le cose nella colonna giusta. |
| 04-Radar | il giro completo, la bozza, l'invio, la sveglia. Si legge dall'alto come uno schema. |
| 05-Menu | il menu 🛰️ Radar: è ciò che ha trasformato «apri l'editor ed esegui una funzione» in «scegli una voce». |
| 06-Preparazione | crea le tre linguette con le intestazioni giuste, e la diagnostica. |
| Pannello.html | il pannello delle impostazioni. |
I commenti sono in italiano, discorsivi, e spiegano perché una riga è fatta in quel modo — non cosa fa: quello si vede. È una scelta: questo programma nasce da un laboratorio pubblico, e il codice è parte di ciò che si insegna. Chi lo apre fra un anno, magari senza saper programmare, deve poterci capire qualcosa.
L'ordine dei controlli, nel giro, è la parte più importante di tutte: prima si scarta gratis tutto quello che si può scartare, e solo su quel che resta si spende una richiesta. Ogni riga che viene prima della chiamata al modello è una riga che fa risparmiare.
Fascia d'età, modello, giorno e ora della sveglia, tetto delle richieste, quanta parte di ogni pagina leggere, e soprattutto le regole aggiuntive — «tieni solo ciò che riguarda il Vallo di Diano», «scarta i corsi a pagamento». Tutto dal pannello. Nel codice si mette mano solo per cambiare come lavora, non cosa cerca.
In 04-Radar c'è createDraft: crea la bozza. Sostituirla con l'invio diretto fa partire email da sole, di notte, con scadenze che nessuno ha controllato. È la cosa che rende oggi questo strumento adottabile da un ufficio pubblico — e la prima che glielo farebbe togliere di mano.
Se lo migliori, le cose più utili da rimandare indietro sono tre: fonti che funzionano (pagine di elenco avvisi che rispondono senza JavaScript, soprattutto comunali), regole nate da un errore che hai visto davvero, e i casi in cui ha sbagliato — quelli valgono più di tutto: il registro di un radar acceso da mesi è un dato raro su quanto sono affidabili questi strumenti dentro un ufficio pubblico.
Workshop · how to rebuild it at home
How to build yourself, alone and for free, a sheet that every Monday morning reads the public-call portals, keeps only what concerns under-35s and drafts a digest email. Ten steps, three quarters of an hour, not a single line of code to write.
The whole project lives inside a single Google Sheet. No server, no website to buy, nothing to install on your computer: if one day you want to throw it all away, you throw away the sheet and nothing is left behind.
The key of whoever gave it to you, their schedule, their recipients. And rightly so: from now on the radar is yours, it runs on your account and uses your quota, not someone else's.
You have a Google Sheet open, on your Drive, called Radar opportunità. If you made the copy, at the bottom you already see three tabs: FONTI, OPPORTUNITÀ, LOG.
Gemini is the model that reads the pages and pulls the opportunities out of them. To make it work for you, you need a key: a long sequence of letters and numbers saying «this request comes from me». It is free within a certain number of requests a day — many more than the radar will ever make.
New keys don't look like the old ones: that's fine. If instead you are asked for a credit card, you ended up on Google Cloud's paid console: go back and use the address above, which is AI Studio.
That key is like the password to your front door: whoever has it can make requests in your name and burn your quota. Don't paste it into a chat, don't email it, don't write it inside the code. At step 5 you'll put it somewhere safe — somewhere that stays behind even if you hand the sheet to someone else.
Skip this step if you copied the ready-made sheet: you already have the program. This is only for those starting from an empty one.
Inside every Google Sheet there is a code editor almost nobody knows about. It is called Apps Script, it is free, and that is where the radar will live. It's two copy-pastes.
Pannello (without typing .html).Pannello, capital P: it is the only one the program looks up by name. Call it anything else and the menu still works, but the settings panel won't open.
In the left column you see two files, Codice.gs and Pannello.html, and «Unsaved changes» is gone from the top. No confirmation, no error: the program hasn't run yet, so it has nothing to tell you.
From here on you never touch the code again: everything you need is in a menu, inside the sheet.
Google hasn't reviewed this program — and it won't: review is for apps published to thousands of strangers. This is a program you put in your account, running only on your sheet. That message says exactly this, with words that sound worse than they are.
What is worth reading is the list of permissions: write in this sheet, reach the internet to read the portals, create drafts in Gmail. There is no permission to send: the email stays put until you send it yourself. If one day you turn on automatic sending, Google will ask for one more permission — and it is right that it does.
You get the notice «Foglio pronto» and at the bottom you find the three tabs FONTI, OPPORTUNITÀ, LOG, with blue headers, the first row frozen and the sì / no dropdown on column C.
A side panel with everything you can change without programming. It is also where the key stays safe: it never touches the sheet, so it never travels with the copies.
If it says the model doesn't exist, pick one from the dropdown — names change every few months and are not the same for every key. If it says the quota is exhausted, the key is good: it's just asking you to wait.
Regole aggiuntive (extra rules) is where the radar becomes yours: write in plain language what to keep and what to drop — «keep only what concerns the Vallo di Diano», «drop paid courses». One rule at a time, then try again: two at once won't tell you which one worked. Rules born from a mistake you actually saw are worth ten times the ones imagined at a desk.
This step decides the quality of everything else. The radar doesn't roam the internet: it only looks at the pages you give it. That is its most important limit, and it should be said out loud every time you show it to someone — if a source is missing, it doesn't see it.
FONTI tab. A few example rows are already there: keep them or delete them.sì from the dropdown, D a note to remind you why you added it.The radar reads the page as it is: it does not run the programs the site executes in your browser. That rules out most public-administration portals, which build their list of calls exactly that way — to the radar those pages are empty, and it correctly answers that there is nothing there.
Two rules: never the home pages (you want the list of notices pages) and test before trusting. A source that doesn't answer writes it in the log; one that answers with menus only looks fine and never brings anything.
Tested on 2 August 2026 — these work
| Source | Address | Test result |
|---|---|---|
| Giovani2030 | giovani2030.it/bandi-e-opportunita/ | 8 opportunities with real deadlines |
| Politiche Giovanili | politichegiovanili.gov.it/comunicazione/avvisi-e-bandi/ | 1 call, correct deadline |
| Agenzia Giovani | agenziagiovani.it | 8 training courses and European calls |
| Eurodesk | eurodesk.it/notizie | 8 items |
| Cliclavoro | cliclavoro.gov.it | answers well |
Tested — these don't work as they are
| Address | Why not |
|---|---|
| bandi.sviluppocampania.it | answers «JavaScript is not enabled»: without a browser the page doesn't exist |
| portale-giovani.regione.campania.it | a few hundred characters of menus only |
| portal home pages | they are shop windows: the content lives in the inner pages |
It is your own municipality's notices page. No national portal contains it, and that is exactly why this tool makes sense in a small office: it does the work nobody else is doing for your area.
Dry first, to know what it would cost; then for real.
OPPORTUNITÀ tab, then LOG.If it says no new rows, nothing is broken: the log says why. Most often it means the pages haven't changed since last time — and that is good news, because that check is free.
First everything that can be discarded for free is discarded, and only on what is left does it spend: pages too short or without a single word suggesting a call never reach the model; pages identical to the previous run don't either — that's the biggest saving, because a portal publishes every couple of weeks while the radar comes by every Monday. Then there is a hard cap of requests per run: once reached, the run closes tidily and the remaining sources are read next time. Better an incomplete run than a quota burnt halfway.
This is the step nobody skips. It isn't there to make you trust the radar: it is there to tell you how much to trust it, which is a different and far more useful thing.
OPPORTUNITÀ and open the Link in column G.da verificare to whatever you want: ok, segnalata, scartata. That column is always written by a person, never by the program.LOG, then add a rule in the panel (Regole aggiuntive) and run again.If a value isn't written out in the page, the cell stays empty. It doesn't infer it, doesn't estimate it, doesn't derive it from context. An empty cell gets noticed; a wrong deadline does not.
List pages say little: you will often get title and deadline and nothing else. That is normal — the detail lives in the individual call's page, which the radar does not open, for now.
They don't get in: if the date is there and it has passed, the row is discarded and the discard goes into the log. But only when the date is written and readable: «prossimamente» or «while funds last» mean we don't know, and then the row stays. For removing, the same rule applies as for adding: nothing is made up.
The radar prepares. It does not send. That is the line of code that matters more than all the others put together.
Because that is what makes this tool adoptable by a public office. An agent sending emails on its own, at night, with deadlines nobody checked, is a brand-new problem — and the first reason someone would take the tool away. The panel has a switch for automatic sending: it is off, and whoever turns it on takes that responsibility. Every automatic send is written in the log.
This is the step that turns a program into an agent: from here on it works when you are not there.
You read «From now on it runs by itself every Monday around 8, even with your computer off». From 🛰️ Radar → Diagnostica you can always see whether the alarm is on and how the last run went.
First thing, always: 🛰️ Radar → Diagnostica. It checks tabs, key, sources, recipients, alarm and last run in the order things actually happen, and tells you where it broke.
| Symptom | What happened |
|---|---|
| «Manca il foglio…» | a tab was renamed: Prepara il foglio puts it back |
| «Manca la chiave di Gemini» | you copied the sheet from someone: the key never travels with copies, add your own |
| «chiave rifiutata» | wrong key, or deleted from AI Studio |
| «il modello non esiste» | pick the model from the dropdown: names change every few months and differ per key |
| «quota esaurita» | today's free requests are gone: it resumes next run. If it happens often, choose a lite model |
| «risposta troncata» | raise lunghezza massima della risposta in the advanced settings |
| «il portale ha risposto 403» | that site won't let programs read it: an interesting fact, not a failure. Find another page or drop it |
| no rows, no errors | look at the LOG: almost always «page identical to last run». To force it: Fai rileggere tutte le pagine |
OPPORTUNITÀ: the program writes by counting positions.FONTI: without at least one address, the digest cannot be addressed to anyone.The whole program is public, under an MIT licence: read it, copy it, change it, take it to your own town hall. It lives here — github.com/logika-studio/radar-opportunita.
The code contains no key and no email address, and it should stay that way. The key lives in the project properties (you put it there from the panel, step 5) and the addresses in column E of the FONTI tab (step 6). Which means you can hand this code to anyone, whole, without removing anything — and that is exactly what we are doing.
Installing it takes two files — that's the installazione-rapida/ folder, which packs them — but the real program is split into seven, and the split is not technical: it follows the order in which things happen.
| File | What it does |
|---|---|
| 00-Configurazione | the starting values — age range, model, request cap, alarm day. You never change them in the code: you change them from the panel, and the code stays as it is. |
| 01-Fonti | fetches the pages and reduces them to text. It's the part that depends on things you don't control: when a site changes its skin, this is where it breaks — which is why every error goes into the LOG instead of stopping the run. The two free filters live here too. |
| 02-Gemini | the heart: the instructions the model reads before every page, the shape of the answer, the polite retries, the discarding of expired calls. The only part that spends. |
| 03-Foglio | writes the rows and the log. Few lines, no intelligence: it only has to put things in the right column. |
| 04-Radar | the full run, the draft, the sending, the alarm. It reads top to bottom like a diagram. |
| 05-Menu | the 🛰️ Radar menu: what turned «open the editor and run a function» into «pick an item». |
| 06-Preparazione | creates the three tabs with the right headers, and the diagnostics. |
| Pannello.html | the settings panel. |
The comments are in Italian, discursive, and they explain why a line is the way it is — not what it does: that you can see. It is a choice: this program comes out of a public workshop, and the code is part of what is being taught. Whoever opens it a year from now, perhaps without knowing how to program, should be able to make sense of it.
The order of the checks inside the run is the most important part of all: first discard for free everything that can be discarded, and only on what is left spend a request. Every line that comes before the call to the model is a line that saves money.
Age range, model, day and hour of the run, request cap, how much of each page to read, and above all the extra rules — «keep only what concerns the Vallo di Diano», «drop paid courses». All from the panel. You go into the code only to change how it works, not what it looks for.
In 04-Radar there is createDraft: it creates the draft. Replacing it with direct sending makes emails leave on their own, at night, with deadlines nobody checked. It is what makes this tool adoptable by a public office today — and the first thing that would get it taken away.
If you improve it, the three most useful things to send back are: sources that work (list-of-notices pages that answer without JavaScript, municipal ones above all), rules born from a mistake you actually saw, and the cases where it got it wrong — those are worth most of all: the log of a radar running for months is rare evidence of how reliable these tools really are inside a public office.