To schedule a daily task in Webflow that runs a script and avoid CORS-related issues, you'll need to use an external server or automation tool since Webflow itself doesn't support backend scripting or cron jobs.
1. Host Your Script on an External Server
- Deploy your custom script (Node.js, Python, etc.) on a service like Render, Vercel, Netlify, or AWS Lambda.
- Make sure your server sends proper CORS headers (e.g.,
Access-Control-Allow-Origin: * or your Webflow domain specifically) if the script will be called from the browser.
2. Schedule the Task Using a Third-Party Cron Service
Use a cron job scheduler that supports HTTPS requests to call your script once daily:
- Free options: cron-job.org, EasyCron, or GitHub Actions (for scheduled workflows).
- Set up a request: Configure it to send a GET or POST request to your hosted script's endpoint every 24 hours.
3. Avoid Running Scripts from Webflow to Circumvent CORS
- Webflow runs scripts client-side (in the browser), which triggers CORS restrictions when making cross-origin requests.
- Always handle sensitive operations or API requests server-side to avoid exposing keys and fighting against browser CORS policies.
4. Optional: Use Webflow Logic (Beta) or Make.com for Low-Code Options
- Webflow Logic (if available in your plan) doesn’t support scheduled triggers yet.
- Alternative: Use Make.com (formerly Integromat) to create a recurring scenario that runs daily and calls your external script or Webflow API (like CMS updates).
Summary
Schedule the task externally using cron-job.org or Make.com to call a script hosted on a server like Vercel. By keeping the scripting server-side and including proper CORS headers, you sidestep CORS blocks while automating daily tasks with Webflow.