gpt-4.1-mini-2025-04-14· OpenAI
WildChat-4.8M (AI2)
Write the script code for app scripty in google sheet for checking urls in 2nd column…
- User
Write the script code for app scripty in google sheet for checking urls in 2nd column and write the status in 3rd column for each url
- Assistant
Certainly! Here's a Google Apps Script that will check URLs in the 2nd column of your active sheet and write the HTTP status code result in the 3rd column for each corresponding row.
How it works:
- It reads all URLs from column B starting from row 2 (assuming row 1 is header).
- For each URL, it makes an HTTP GET request.
- It writes the HTTP response code (like 200, 404 etc.) into column C of the same row.
- If any error occurs (e.g., invalid URL, timeout), it writes "ERROR".