SmartSheet API - Node.js SDK addRowUrlAttachment

Options

What is the request body syntax when using the addRowUrlAttachment method in the Node SDK? The API documentation only shows an example using the addRowFileAttachment method.

Answers

  • Lee Joramo
    Lee Joramo ✭✭✭✭✭✭
    Options

    I have only uploaded file attachments via the API, and not used Links. And I am not on a system where I can test this, but my reading of the documents say that you would need to specify the attachmentType and maybe the fileName

    // Set options
     var options = {
      sheetId: 1696803624483716,
      rowId: 1049041355358596,
    "url": "https://example.com/my/myDocument.pdf", "attachmentType": "LINK", fileName: "myDocument.pdf" }; // Attach file to row smartsheet.sheets.addRowFileAttachment(options) .then(function(attachment) { console.log(attachment); }) .catch(function(error) { console.log(error); });

    If you are linking to files hosted in one of the specified services, you would need to alter the attachmentType. Dropbox would be "attachmentType": "DROPBOX"

  • Josh Rosenfeld
    Options

    That unfortunately doesn't work. I simply want to know what the arguments are for the addRowUrlAttachment method. "url" doesn't work because it alters the API URL route itself.

  • Isaac A.
    Isaac A. Employee Admin
    Options

    Hi @Josh Rosenfeld!

    Currently, Smartsheet Support does not handle SDK-related inquiries. If you’ve tested and found an issue with the SDK, please report it on the relevant GitHub page. You can access the links to these pages in our API documentation here: Smartsheet API Documentation.

    Should you not get a response from the Community, consider checking out StackOverflow to connect with other developers to get more help.


    Cheers,

    Isaac.