Read an attachment. Word (.doc/.docx), RTF, HTML, ODT and PDF, plus text formats like .csv/.json/.ics, come back as plain text. Images (PNG, JPEG, GIF, WebP, HEIC, TIFF) come back as an image you can see directly, converted and downscaled when needed, so there is no need to save them first. Get mail_id and attachment_id from get_email's attachments list, where extractable tells you in advance whether this will work. For anything else (.xlsx, .pptx, archives) use save_attachment and open the file with your own tools. An attachment Mail has not downloaded yet is fetched first, in the background (up to a minute); if it is still downloading after that, the error says so and the same call can be retried.