in Education by
I am developing an addon for Gmail using AppsScript. One of the use cases of my addon is to retrieve the Gdrive linked documents which are in the e-mail. Requirement: Fetch email along with linked Gdrive attachments (>25MB) using GMailApp service (API documentation). Need clarification: I tried following approaches: GMailMessage.getAttachments() API which returns only the gmail attachments (<25MB) along with inline images. Parsing the email to retrieve the links and fileIds from them. Is there any other API methods which I can use to achieve my use case? Thanks in advance. JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
Links to Google Drive attachments are included in the source of the email. You can retrieve the raw content of the message using getRawContents(), and then parse it to search for Google Drive links. Working example: var thread = GmailApp.getInboxThreads(0,1)[0]; // Get first thread in inbox var message = thread.getMessages()[0]; // Get first message var htmlContent = message.getRawContent(); Logger.log(htmlContent); // Log contents of the body var regex = /<(https[^>]*)>/g var results = htmlContent.match(regex); // Log each attachment link for (var i = 0; i < results.length; i++) { Logger.log(results[i]); } Raw content of an email:

Related questions

0 votes
    I have an email template that I would like to launch from within the case using a Link/Button. I see the ... Any help you be great Select the correct answer from above options...
asked Jan 30, 2022 in Education by JackTerrance
0 votes
    The syntax for retrieving specific elements from an XML document is ______________. (1)XMLSchema (2)XQuery (3)XPath...
asked Apr 23, 2021 in Technology by JackTerrance
0 votes
    The syntax for retrieving specific elements from an XML document is __________. (1)XML Schema (2)XQuery (3)XPath...
asked Apr 22, 2021 in Technology by JackTerrance
0 votes
    In order to reduce the overhead in retrieving the records from the storage space we use (a) Logs ( ... Answers, Database Interview Questions and Answers for Freshers and Experience...
asked Oct 11, 2021 in Education by JackTerrance
0 votes
    I'm relatively new to Swift and Firebase, so I'm not very familiar with the intricacies of how ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 5, 2022 in Education by JackTerrance
0 votes
    Which term describes an operating system distribution specifically designed to run the entire machine from an optical disc ... drive? Select the correct answer from above options...
asked Dec 29, 2021 in Education by JackTerrance
0 votes
    On my website I am trying to program a feature, similar to facebook and twitters timeline, where a user ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 3, 2022 in Education by JackTerrance
0 votes
    On my website I am trying to program a feature, similar to facebook and twitters timeline, where a user ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 2, 2022 in Education by JackTerrance
0 votes
    Which is the next step after retrieving the content in chunks? (a) Paint DOM elements (b) Parse ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 23, 2021 in Education by JackTerrance
0 votes
    It takes effort to copy files and directories from a USB drive or OneDrive to the local drive, work with and ... or a remote system? Select the correct answer from above options...
asked Dec 10, 2021 in Education by JackTerrance
0 votes
    I have to download images to my iOS apps local file system and read them back. On my simulator I ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 6, 2022 in Education by JackTerrance
0 votes
    A __________ is a program running on the server machine, which accepts requests from a Web ... Fundamentals in division Database Programming Techniques of Database Management...
asked Oct 10, 2021 in Education by JackTerrance
...