Google Sheets email alert on Pinnacle odds drops
Answer: store your key in Script properties, call GET /v1/drops with UrlFetchApp, keep the drops you have already seen in a sheet, and send new ones to yourself with MailApp.sendEmail. A time-driven trigger every 5 minutes runs it. That is 288 requests a day, inside the Free plan's 1,000 (Free data is 30 s delayed).
Apps Script#
function dropAlert() {
const key = PropertiesService.getScriptProperties().getProperty('PINNFEED_KEY'); // ps_live_...
const url = 'https://pinnfeed.io/v1/drops?sport=soccer&minutes=5&min_pct=5&limit=20';
const res = UrlFetchApp.fetch(url, { headers: { 'x-api-key': key }, muteHttpExceptions: true });
if (res.getResponseCode() !== 200) { console.log(res.getContentText()); return; }
const drops = JSON.parse(res.getContentText()).drops;
const ss = SpreadsheetApp.getActive();
const sh = ss.getSheetByName('Drops') || ss.insertSheet('Drops');
const seen = new Set(sh.getRange('A:A').getValues().flat().filter(String));
const fresh = drops.filter(d => !seen.has(d.marketId + '|' + d.outcome + '|' + d.movedAt));
if (!fresh.length) return;
fresh.forEach(d => sh.appendRow([d.marketId + '|' + d.outcome + '|' + d.movedAt, d.home, d.away,
d.market, d.outcome, d.from, d.to, d.dropPct, d.movedAt]));
const body = fresh.map(d => `${d.home} v ${d.away}: ${d.market} ${d.outcome} ${d.from} -> ${d.to} (${d.dropPct}%)`).join('\n');
MailApp.sendEmail(Session.getActiveUser().getEmail(), `Pinnacle drops: ${fresh.length}`, body);
}
Then Triggers → Add trigger → dropAlert → Time-driven → Every 5 minutes. Change sport to one of your two Free sports.
Tune it#
- Raise
min_pctto get fewer, larger moves. - Add
league=to watch one competition (league ids). - Skip thin markets by looking each one up and requiring
maxStake >= 100. - Gmail has daily sending quotas for scripts; batch alerts into one mail, as above.
Plans#
Free works with a 30 s delay (2 sports, 1,000 requests/day). Hobby (€29/mo) is real-time REST. For instant push use the WebSocket on Builder (€99/mo). 3-day trial; a card is required and it is charged after day 3 unless you cancel. Other channels: Telegram, Slack, Discord via Cloudflare.
Educational content for adults (18+).
Related: dropping odds alerts via the API.
Questions people ask#
Why not IMPORTDATA?#
It cannot send the x-api-key header, and a key in a cell is visible to anyone with access to the sheet.
Will I get the same drop twice?#
The sheet keeps a key per drop (marketId|outcome|movedAt), so repeats are skipped.
Can it run every minute?#
Yes on Hobby and up; on Free that would be 1,440 requests a day, over the 1,000 limit.