I have several hundred emails, each in their own conversation (they are old emailed versions of posts from a blog which is no longer available online). I'd like to aggregate their content (i.e. message bodies) into one large document. I'm not too picky about the format but I guess a pdf would be nice. I can construct a search in gmail so that the only emails matching the search will be those that I want to aggregate.
Is there any way to easily do this? I'm open to writing something using the gmail API, but would obviously prefer a simple solution if that's possible.
Best Answer
The messages that are grouped in a conversation could be saved as a single file or forwarded.
The messages that are not part of a conversation or a large number of conversations, should use something else to be saved or integrated in a single file. Fortunately there a lot of tools and examples of Google Apps Scripts, but I don't know if there is one that to "the trick" in one step. I think that this will require two major steps.
Bear in mind that some file formats have their own caveats to managing large content, so instead of having one single file could be better to rely on the file management and indexing features of the operative system or services like Dropbox, Google Drive, OneDrive, among others.
For Gmail messages that are grouped in a conversation
From Print mail
This will show a "printable" version of the conversation. You could "print" them as PDF or save the resulting page in other formats.
From Forward messages
Other tools and Google Apps Script examples
IFTTT If labeled "drive" in Gmail then save to Google Drive.
(more could be be added later)