This GitHub Actions workflow fetches the latest JPY to EUR exchange rate every Monday at midnight (UTC) and sends an email notification if the rate falls below a specified threshold.
- Fetches the JPY to EUR exchange rate from ExchangeRate-API.
- Logs the exchange rate and compares it to the previous value.
- Sends an email alert if the rate is below the set threshold.
Go to Settings β Secrets and variables β Actions β New repository secret, and add:
| Secret Name | Description |
|---|---|
EXCHANGE_API_KEY |
API key for exchange rate service (if needed) |
SMTP_USER |
Your SMTP email address |
SMTP_PASSWORD |
Your SMTP email password (or app password) |
SMTP_SERVER |
SMTP server address (e.g., smtp.gmail.com) |
SMTP_PORT |
SMTP port (e.g., 587 for TLS) |
RECIPIENT_EMAIL |
The email address to receive alerts |
PRICE_THRESHOLD |
The exchange rate threshold for alerts (e.g., 0.0065) |
You can also run the workflow manually:
- Go to Actions in your GitHub repository.
- Select Weekly JPY to EUR Rate Check.
- Click Run workflow.
The R script requires:
httrjsonliteemayili
These are automatically installed when the workflow runs.
- Exchange rates are logged in
exchange_rate_log.txt. - To debug, check the GitHub Actions logs under Actions β Workflow Runs.
- If the exchange rate falls below the threshold, an email is sent.
- The email includes the current rate and percentage change from the last logged value.
- β Add more exchange rate APIs for redundancy.
- β Improve email formatting.
- π Store logs in a more structured format (e.g., CSV or database).
This project is open-source under the MIT License.