blck-snwmn / schedule-notifier

A Cloudflare Worker that posts screenshots of the target page to Slack.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

schedule-notifier

CodeQL

A Cloudflare Worker that navigates to a target URL, captures a screenshot of the page content, and posts the screenshot to Slack.

Setting(for Local)

Please follow these steps to set up the project:

  1. Create a file named .dev.vars in the project root directory.
  2. Write the following key-value pairs in the .dev.vars file:
TARGET_URL=<Your_Target_URL>
SLACK_TOKEN=<Your_Slack_Bearer_Token>

Replace

  • <Your_Target_URL> with the URL you want to capture a screenshot of
  • <Your_Slack_Bearer_Token> with the bearer token for the Slack file upload API

Setting

Run the following commands to add your secrets to the Workers configuration:

wrangler secret put TARGET_URL
wrangler secret put SLACK_TOKEN

Deploy

After you've added the secrets, deploy the Worker with the following command:

wrangler deploy

About

A Cloudflare Worker that posts screenshots of the target page to Slack.


Languages

Language:TypeScript 100.0%