For anyone else searching, here is some code that gets the title from a webpage to populate a title field
// Define the table names
const urlTableName = "URLs";
let urlTable = base.getTable(urlTableName);
// Prompt the user to select the current link record
let record = await input.recordAsync('Pick a link record', urlTable);
// Check if a record was selected
if (!record) {
output.text("No record selected. Please select a record to run the script.");
} else {
const url = record.getCellValue('URL');
const response = await remoteFetchAsync(url + "/");
const text = await response.text();
const title = text.match(/<title>(.*?)<\/title>/)[1];
await urlTable.updateRecordAsync(record.id, {
'Title': title
});
console.log(`Updated record ${record.id} with title: ${title}`);
}