API connection from Smartsheets to R

Hi, I am attempting to connect Smartsheets to R. I have tried to use the SMARTSHEETR package but having issues with the code and loading a sheet. Has anyone has success with this and could share their code? Thank you

Answers

  • Hi @DLove

    If none of our other members have connected to R using the API, you may want to try posting in the Stack Overflow developer Community to see if someone there has tried this before.

    Cheers,
    Genevieve

    Need more help? 👀 | Help and Learning Center

    こんにちは (Konnichiwa), Hallo, Hola, Bonjour, Olá, Ciao! 👋 | Global Discussions

  • Thomas T
    Thomas T
    edited 10/18/24

    Hi @DLove

    I recently had success with the smartsheetr package in R when also trying to research this topic. I am only needing to pull (or get) data from various sheets, but it has worked for me. You will need to get a Smartsheet API Token in order for the package to work. Cole Johanson (the smartsheetr developer) also has documentation on github how to use the token. However, I would recommend saving the token to your .Renviron file so you don't have to save your token key with any scripts you run.

    You can get to your .Renviron file with

    file.edit("~/.Renviron")

    and save your token within the file as

    SMARTSHEET_API_TOKEN='<your key here>'

    Then it should be just a matter of running which ever smartsheetr function you need, such as

    smartsheetr::ss_list_sheets()

    Best of luck