Skip to main content

Any good idea how to import CSV via Sendgrid email attachment and update model/database columns.

Rails • Asked by Daniel Chapman

Basically receive incoming daily emails, with CSV attachment, then importing the CSV rows to your desired model/database.

Anyone done this before?

Thanks for any input.


Should be pretty straightforward with https://github.com/thoughtbot/griddler

Readme there is pretty clear too!


Thanks, ill check it out.


Be sure to add any questions if you have any!


Daniel I'm with Jack and recommend you use Griddler for inbound email. I currently use it to capture attachments on inbound emails and store them to S3.

Process the email, check for a filetype of CSV (or against name etc.) then process as a normal CSV import. Ruby supports this natively or you can use the smarter-csv gem.


Login or Create An Account to join the conversation.

Subscribe to the newsletter

Join 22,346+ developers who get early access to new screencasts, articles, guides, updates, and more.

    By clicking this button, you agree to the GoRails Terms of Service and Privacy Policy.

    More of a social being? We're also on Twitter and YouTube.