-
attachments.downloadNodeStream()— A new convenience helper that returns a Node.jsReadablestream, making attachment downloads work cleanly withstream.pipeline(), file writes, S3 uploads, and HTTP response streaming. The existingattachments.download()continues to return a WebReadableStream<Uint8Array>for Fetch-native runtimes such as Cloudflare Workers (which already requiresnodejs_compat). Thedownload()JSDoc is also updated to accurately describe the Web Stream return type. See Download an attachment. -
fieldsquery parameter onmessages.send()—nylas.messages.send()now accepts an optionalqueryParams: { fields }argument. PassMessageFields.INCLUDE_HEADERSor the newMessageFields.INCLUDE_BASIC_HEADERSto receive aheadersarray ([{ name, value }]) on the returned message object. The query parameter is forwarded on both the JSON and multipart (large attachment) request paths. See Send a message.
Why this matters
Section titled “Why this matters”The v8 native Fetch migration moved Response.body to the Web Streams API, which is the right cross-runtime primitive but adds friction for Node.js apps that pipe attachment bytes into files, S3, or downstream HTTP responses. downloadNodeStream() gives you a Node-native path without changing the existing Web Stream API or introducing a new runtime requirement. And if you’ve needed to inspect message headers (such as Message-Id or threading headers) immediately after sending, the fields query parameter returns them on the send response so you don’t need a follow-up GET /messages/{id} call.