Scripts, scripts, scripts!

Is it possible to have a google script detect new email from gmail and import a csv to sheets from an attachment? I was using Zapier but after 6+ months my zap is suddenly now broken and I’m in need of a fix…FAST! Trying Integromat I think I was close but couldn’t quite get it.