A Cloudflare Worker that navigates to a target URL, captures a screenshot of the page content, and posts the screenshot to Slack.
Please follow these steps to set up the project:
- Create a file named .dev.vars in the project root directory.
- 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
Run the following commands to add your secrets to the Workers configuration:
wrangler secret put TARGET_URL
wrangler secret put SLACK_TOKEN
After you've added the secrets, deploy the Worker with the following command:
wrangler deploy