Push data to other sheets in your workbook
ctx.sheet()
const employeesSheet = ctx.sheet("Employees");
await sheet.addRow(data);
await sheet.addRows(arrayOfData);
// Get employees for a company const employees = await services.company.getEmployees({ linkedinCompanyUrl: ctx.thisRow.get("LinkedIn URL"), options: { limit: 50 }, }); // Push each employee to the Employees sheet const employeesSheet = ctx.sheet("Employees"); await employeesSheet.addRows( employees.map((emp) => ({ company_id: ctx.rowId, name: emp.full_name, title: emp.job_title, linkedin: emp.websites_linkedin, })) ); return employees.length;
// Scrape job listings const jobs = await services.company.careers.scrapeJobs({ url: ctx.thisRow.get("Careers URL"), }); // Push to Jobs sheet await ctx.sheet("Jobs").addRows( jobs.map((job) => ({ company_id: ctx.rowId, title: job.title, location: job.location, })) ); return jobs.length;