How can I save 100 payloads to a file then send that file via http

Basically, I want to save msg.payloads to a file and then send that file over HTTP? (have http code etc)

Plus I want to do this continuously. Batch messages via file

Which bits don't you know how to do?