Questions tagged [googlesheets4]

Access Google Sheets using the Sheets API V4

googlesheets4 provides an R interface to Google Sheets via the Sheets API v4. It is a reboot of an earlier package called googlesheets.

82 questions
1
vote
1 answer

gs4_auth() can't get Google credentials in an interactive session

After updating to R 4.2.1, I'm getting the following error when running a sheet_write() command Error in gs4_auth(): ! Can't get Google credentials. ℹ Are you running googlesheets4 in a non-interactive session? Consider: • Call gs4_deauth() to…
1
vote
1 answer

Change the Default Access Permission of a Google Sheets made with googlesheets4 with R

I would like to change the default permissions of a google sheets file to anyone with the link can read weekly_fight <- googlesheets4::gs4_create( paste0( two_weeks_ago_monday, "-", two_weeks_ago_sunday, "/", …
Andrea
  • 105
  • 10
1
vote
0 answers

R Shiny App only writing too Google Sheet when ran locally, not on shinyapps.io

I have created an app in R shiny app to model how users choose which products to buy. The app records how users interact with it, primarily which buttons they click when choosing between two purchases (with multiple possible combinations). It saves…
1
vote
0 answers

Upload an image from disk to Google sheets through API (preferably googlesheets4 package)

I want to upload an image to existing Google spreadsheets through Google's API. However, I a) haven#t been able to figure out how nor b) if there's even a more or less "easy" way of doing it. Among others, I looked e.g. at: Insert image into Google…
deschen
  • 10,012
  • 3
  • 27
  • 50
1
vote
0 answers

Using RStudio to read/write to google sheets and send emails non-interactively

So I have written a code that reads data from google sheets. Depending on what is in that data, it sends an email using information from the data. Then, it will write back the newly formatted data back to google sheets. While this all works when I…
1
vote
0 answers

Reading a Google Sheet

I have a Google Sheet with several embedded links to other Google Sheets. Is it possible to read in all these sheets together?
Shannon
  • 125
  • 7
1
vote
0 answers

How do I connect to a google sheet via googlesheets4 (r package) with a json oauth file?

I need to connect to a google sheet in a non-interactive way. I've read the documentation here, here, and here and have done the following: Created a google cloud account and project Created a service account, and added the resulting email address…
cskn
  • 99
  • 9
1
vote
0 answers

Non-interactive authorization with R/googlesheets4 + Rshiny using a service account token

I'm at a loss, I cannot figure out how to get non-interactive authorization working from the vignette found here. To me it seems it should be as simple as passing the path to the service account json file to gs4_auth(), and this does work in…
Karl Johnson
  • 111
  • 1
  • 7
1
vote
2 answers

Multi-user authentication for googlesheets on an app deployed to shinyapps.io

I have an interactive shiny app which wants to read and write to a user's own Google Drive account. It is using gs4_create, gs4_find and range_read from packages googlesheets4 and googledrive. When run locally, I get a prompt like this on first…
1
vote
0 answers

R package in Dockerfile: couldn't find package 'tidyverse/googlesheets4'

I managed to install the following package on my local RStudio session: install.packages("devtools") devtools::install_github("tidyverse/googlesheets4") I am now trying to install it directly in the Dockerfile of my RStudio session on my…
ML_Enthousiast
  • 1,147
  • 1
  • 15
  • 39
1
vote
0 answers

How to retain authorization with googlesheets4 as it always assumes I'm in a non interactive session and won't write my output to sheets?

I am unable to (1) automate reports that I'm trying to export to directly to google sheets & (2), even when I go through manually the warning (see below) does not believe it's an interactive session even after I restart my session or terminate R and…
1
vote
0 answers

Twitter stream disconnects prematurely with R package rtweet

I am trying to download a live stream of tweets using the r package {rtweet}. Seems when I use hashtags that are not popular I get the following message: Streaming tweets for 600 seconds... The stream disconnected prematurely. Reconnecting... When…
mdb_ftl
  • 423
  • 2
  • 14
1
vote
1 answer

Shiny app with multiple input modules that creates the same output

I have an Shiny app where the users upload data to be processed. The user can choose a data source (like a file or a connection to a cloud service like google sheets). The number of types of data sources will increase in future. My plan was to make…
0
votes
0 answers

R cron job cannot edit googlesheet - authorization issue

I have a cron job which edits a googlesheet using functions range_clear and sheet_write from the googlesheets4 package. Here is how i set up the permissions: library(googlesheets4) # Set authentication token to be stored in a folder called…
Romain
  • 171
  • 11
0
votes
1 answer

How do you create a repeating pattern of dates split into different parts of the day? Google Sheets

I want to create a pattern of dates along a column. But these dates need to be split into different time-parts, for example: 07/02 5:00 07/02 10:00 07/03 5:00 07/02 10:00 I am honestly completely lost... Any help would be appreciated.
TDAWG
  • 11
  • 1