Hi all, sharing a workflow that emails me when a company’s directors or officers buy its stock on the open market. Insider sales happen all the time for taxes or scheduled plans; open-market buys are much rarer, so I want to see them quickly.
What it does
- Schedule trigger every weekday at 8:00, plus a manual trigger for testing
- A Set node holds the watchlist, a 14-day lookback, a minimum trade value and the email addresses
- One HTTP Request per ticker to the Equibles insider-transactions endpoint (Header Auth, purchases only)
- A Code node keeps rows flagged as open-market trades above the minimum, so grants and option exercises never show up as buys
- Remove Duplicates (items seen in previous executions) drops anything already emailed
- One HTML table, largest purchase first, sent over SMTP. Nothing new means no email.
The part that took a few tries
The lookback overlaps between runs on purpose, because insiders have two business days to report and some filings come in late. So the same trade comes back every day for two weeks, and the dedupe key has to stay stable across runs. I join ticker, insider name, trade date, shares and price into one key.
On a test run it caught three Pfizer purchases worth $2,960,110 in one email, skipped a made-up ticker without failing the run (the HTTP node continues on error), and a second run sent nothing.
Template: Email new insider stock purchases from your watchlist with Equibles and SMTP | n8n workflow template
It needs an Equibles API key; the free plan allows 100 requests a day and each run uses one per ticker. I work on Equibles, so happy to answer questions about the data too. Feedback on the dedupe approach very welcome.