Idea
Build an n8n workflow that runs daily, fetches the credit score of a watchlist of companies from Openapi, and sends a Slack alert if any score drops below a threshold.
Pseudocode for the PHP side
use Openapi\Client;
$client = new Client($token);
$watchlist = ['IT01234567890', 'IT09876543210'];
foreach ($watchlist as $vatNumber) {
$score = json_decode(
$client->get('https://risk.openapi.com/IT-creditscore', ['cf' => $vatNumber]),
true
);
if ($score['value'] < 40) {
// trigger Slack webhook from n8n
yield ['cf' => $vatNumber, 'score' => $score['value'], 'alert' => true];
}
}
n8n workflow sketch
Cron (daily 8am) → HTTP Request (PHP proxy) → IF score < 40 → Slack message
Open questions
- Is there a way to subscribe to score changes via webhook instead of polling?
- What is the recommended polling interval to avoid burning API credits?
- Would an official n8n workflow template JSON be something the project could ship in
examples/n8n/?
Idea
Build an n8n workflow that runs daily, fetches the credit score of a watchlist of companies from Openapi, and sends a Slack alert if any score drops below a threshold.
Pseudocode for the PHP side
n8n workflow sketch
Open questions
examples/n8n/?