how to Share a Google Sheet via API - google-sheets-api

I am trying to share a Sheet, not the hole Spreadsheet, using Sheets API, via Make (former Integromat).
I tried via Google Drive, but it shares the hole Spreadsheet. CanĀ“t especify a single Sheet.

Related

I insert an image in Google Sheets as a blob rather than link it with a URL

I want to insert a blob object (.jpg image) with Google Sheets API.
Does Google Sheets API allow for blobs inside the spreadsheet's cells?
I know that inserting the image directly into the spreadsheet by hand without using API is possible.
In the current stage, unfortunately, the image blob cannot be directly put into Google Spreadsheet using Sheets API. So, it is required to use the workarounds. In this answer, I would like to propose the 2 workarounds for achieving your goal.
Pattern 1:
In this pattern, IMAGE of the built-in function of Google Spreadsheet is used. The flow is as follows.
Upload the image to Google Drive using Drive API.
Share publicly the uploaded image using Drive API and receive the URL of the image.
Put a function of =IMAGE("URL") to a cell using Sheets API.
By this flow, your goal is achieved. If you can know the direct link of the image, you can directly use only the 3rd flow of the above flow.
Pattern 2:
In this pattern, the image is inserted into the Spreadsheet using Web Apps created by Google Apps Script.
Upload the image to Google Drive using Web Apps.
Put the image blob into the Spreadsheet using Web Apps.
By this flow, your goal is achieved.
References:
IMAGE
Web Apps

how to use google sheet with whapi.io

I want to use https://whapi.io/api/send with google Sheets but documentation on their website is very little.
If someone has developed sheet to send messages via https://whapi.io/api/send it would be helpful

Importing a spreadsheet from our website to our users Google Sheets account

I'm trying to figure out a simple way to allow the users of our website to press a button to import a spreadsheet (which is created dynamically in code within the website) into their Google Sheet drive.
Right now I'm currently I've setup a button that allows users to log in to their Google Account with the scope set to "https://www.googleapis.com/auth/drive.file". However, it's asking our users for way too much personal information for our taste, which we don't need at all.
Is there any other simpler way to do this without accessing personal information? I've noticed that when you log into Google Analytics and export data there it's just a simple Import button and you get your data immediately. That's exactly what I'm be looking for.
Thanks in advance.
Best and simpliest way is to give them the link to the spreadsheet with copy at the end
https://docs.google.com/spreadsheets/d/xxxxxxxidxxxxxxxxx/copy

Unhide/Show column using Google Sheet API

I found the Google Sheet Java API to hide columns, but I couldn't find any API to unhide/show a hidden column. The only way I could figure out till now is using Apps Script. Can you please help with the corresponding Java API?

Is there a way to allow users to access Google Sheets without manually signing in?

I have set up a Google Apps Script that validates data that is entered into various Google Sheets files. I am looking for a way to allow users to access those Google Sheets files without making them sign in manually.
There are various onEdit() triggers set up that monitor these Sheets files and apply formatting to cells when data input errors occur. I'm doing validation with Google Apps Scripts because the errors are determined through non-straightforward business logic which makes Sheets' built-in data validation insufficient. The triggers are set up by a standalone Google Apps Script project. This setup means I cannot simply share a link to the Google Sheets file and have people edit it anonymously and have the data checked and cells formatted, because the scripts require more permissions than are necessary for anonymous editing.
I've looked briefly at some Google Auth API docs, but I'm not a security or web dev by trade so it's a bit confusing.
I'm looking for a solution where the user could click on a link to a Sheets file and automatically be redirected to the Sheets file and be signed in to a Google account that is managed by me, and which already has permission to access that Sheets file (this way they won't be editing these files with their personal accounts). The link would be on a Drupal site that users would have already signed into using Drupal's built-in sign-in functionality, in case that makes a difference.
You can write a stand-alone script and build a trigger yourself:
ScriptApp.newTrigger('Edit')
.forSpreadsheet('THE_SPREADSHEET_ID')
.onEdit()
.create();
function Edit()
{
//does not necessary need to be the same spreadsheet
SpreadsheetApp.openById('THE_SPREADSHEET_ID').getActiveSheet().getRange('A20').setValue('it worked');
}
If you set the sharing permission for the spreadsheet to "Anyone with the link can edit", every user (including anonymous) editing the spreadsheet will cause the trigger to run. Just make sure that after writing the script you run it once manually, after this it will run automatically on every edit.