Google DoubleClick - Dynamic creative - refreshing data - double-click

I have a Google DoubleClick account and I have linked it up to a google sheet.
The problem I am having is after updating the google sheet I dont see the copy updated in the advert.
I also don't know the difference between 'transformed content' and 'element' and if I need to transform after every change.
The doubleclick documentation is terrible.

In order to update the data in your feed here's what you can do:
Process:
*If your feed has already been published you will need to create a draft of the feed
see picture - create draft
Go To the Manage Data Step (#2) and you can Retransform your data source (this goes to your original source and refreshes the data)
see picture - retransform
Once the Retransform has occurred you can republish the feed if it's already been published or go back to testing if not.
If you're using Google Web Deisgner you will probably need to relink your Schema if any columns or fields have changed.
Why this is necessary:
When you set up a sheet and provide it to the dynamic feed DoubleClick copies the data in your sheet and caches it on their ad servers. If you change something in the sheet it will not be reflected on their servers until you Retransform the sheet.
You really shouldn't need to mess around in the Transformed Content and Element tabs as far as I have run into.
If you need to add columns or remove columns from your sheet be aware that you will have to remove the feed, save and then add it again as new content to get them to show up.
BE AWARE THAT REMOVING COLUMNS ON A PUBLISHED FEED WILL BREAK ADS THAT ARE ALREADY RUNNING - If you need to remove a column it's better to start a new feed IMO.

Related

Can I use Google Apps Script to intelligently add page/column breaks based on how much space appended text will take up in a Google Doc?

I wrote a custom script that takes Google Sheet data and formats it to generate a Google Doc. The sheet data updates automatically and I have to periodically generate a new report for client use. (Overall this relatively seamless -- it has saved me a huge amount of time!)
Unfortunately, I always have to manually format the report afterward, adding column breaks to make sure individual records appear continuously without wrapping to the next column or page. Is there a way to have the script do this for me? So far as I've found, Apps Script doesn't have a way to "figure out" where on the page the cursor is or determine how much room is left before the bottom of the page.
As per Rubén's confirmation in the comments, there is no built-in feature to do what you want. But alternatively, there is a way to do what you want.
This answer shows that similar idea. You can have certain string/keywords that are placed within your source that can define where you would insert your break.
I'm not entirely sure how your data looks and it is hard to provide an exact answer. But if there is a pattern to your data in sheets and you can preemptively define where you can insert your column break, then that can be doable.
Basically, you will need to design how your data is being read (or even modify it) and format it into the document.
If you can provide a sample data and an expected output, then maybe users here can provide you a specific answer that will cater to your exact needs.

Disable Spreadsheet copy - Google Sheets

I would like to allow users to use my spreadsheet but not copy it as it contains intellectual property. I tried going to sharing settings and disabling:
Editors can change permissions and share
Viewers and commenters can see the option to download, print, and copy
But the sheet can still be copied. Ideas?
Unfortunately, it is not possible to disable copy / download for editors.
You can only do that for commenters and viewers.
As a workaround, I would advice you to keep your sensitive information into one master file and then importrange or copy via a script the shareable information into another file. So even if they copy or download the latter your sensitive information won't be copied / downloaded.
Related questions:
How to disable copy/ download access for editors in google sheets
Prevent editors from downloading the file
Disable download & Copy to Option in Google Spreadsheet
I think the simplest solution would be to copy and paste from the master file the range of values you want to share with the other document. In this scenario the editors of the other document won't have access to neither the code nor the full data of the master file since the latter won't be shared with them.
The copy and paste part can be done automatically via a script and a trigger mechanism to update the data automatically so you won't have to do anything manually and the master file won't be exposed to any user.
There isn't any sure way to hide your data. Once something is published on the internet, you should consider it saved on many devices all over the world. Consider some ways to get hidden spreadsheet data
Attack scenarios:
By far the easiest way is CTRLC and CTRLV(Copy and Paste)
Editor menu options: File->Copy and File->Export
Once your file id is visible, any editor or even viewer with access to the file can easily copy the file itself through
Url manipulation: Adding /copy at the end instead of /edit
google-drive-api: File:get and File:copy
google-sheets-api: Useful to directly get data as json
google-vizualization-api: Can get data as html,csv or json(google query). See endpoints
Screenshot and use OCR(Optical character recognition)
View source code in the browser and directly copy the table
web-scraping Simulate browser using selenium
Hiding data:
Data may be hidden from naive users. Data cannot be hidden from users, who know the basics of how the web works.
Add ?rm=minimal to url, when sharing the sheets file. This hides all menu options.See here
Frame the edior in a iframe in your own website and use css to hide the top portion of the web page.
Hiding Logic:
You may still be able to hide logic of your code.
IMPORTRANGE: This is a very basic and easy way to hide your logic. But there are limitations and any editor can access any part of your master spreadsheet.
You can implement a IMPORTRANGE like logic using custom functions and webapps. This gives more control over the connector and secures your master spreadsheet much better than IMPORTRANGE. Here,
Two web apps are created, each associated with a spreadsheet(Master and client).
You use two KEYs to communicate between them. One for access and other for encryption.
Once access is verified, the data from master spreadsheet is encrypted and sent back to the custom function. Simultaneously the encryption key is posted to the client webapp.
The key here is the Master/Server webapp posts the encryption key only to the published client web app link. So, no other sheet or anything else can intercept the key or decrypt the data. Furthermore, a random key is generated for each access.
Another option is to let go off the spreadsheet completely and use a single webapp to show the data. This hides the logic in server scripts and linked spreadsheets.
Comment thoughts:
Create a script onOpen to kill sheets if the file is wrong?
onOpen cannot post data anywhere without the new copy owner permission. It's not possible to kill sheets. But data can be erased.
/**
* Deletes all sheets on the copy, if a copy is made
*/
const onOpen = () => {
const ss = SpreadsheetApp.getActive();
const id = ss.getId();
const sheets = ss.getSheets();
ss.insertSheet(sheets.length);//insert a blank sheet at the end
if (id !== '###Original ID###') sheets.forEach(s => ss.deleteSheet(s));//will fail at the last sheet(doesn't matter)
};
But editor can modify the original script before making a copy. And a revision of the original spreadsheet will still be available. The new owner can revert to the original version, use api endpoints mentioned above to get the data. Also mobile apps don't support onOpen. New owners can simply use mobile versions to access data.
Use formula web-app to notify file owner, ?
Possible, but data is already copied and there's no specific information that can be used to accurately identify the new owner. You maybe able to get locale information though.

Navigation in published Google Sheets

I need to publish a report I have in Google Sheets, but since the report is very big, with many sheets and tables, I have hyperlinks set up for easy navigation, that take you to ranges in other sheets.
When I publish the sheet, the hyperlinks stop working (they take you to the first sheet in a new browser tab). I also tried with a script to change the pages with a button, but the button is not clickable in the published page.
Thanks for any tips you might have.
EDIT:
I've prepared a test sheet to see if I find a solution for this. This is a link with permissions to edit:
https://docs.google.com/spreadsheets/d/1ZGw_6WjrkcNKdFvS8gIG46gEMfMuw7ex86SR9C7qXTU/edit?usp=sharing
And this would be the published version:
https://docs.google.com/spreadsheets/d/e/2PACX-1vTa8JDNMzwdvk87kCvbjJXYgK2RGiKy503eJn6eEjxbyU8oIsuvuKTNXCM6yRP16KXrnD9yvLV3J488/pubhtml
This actually works in Excel, I can embed the report and the hyperlinks still work fine, but I have everything else in Google Sheets, so I'd like to find a workaround.
You need to use proper query parameters. The sheet id, gid must be set to navigate properly. You cannot use rangeid. You can however use range.
/pubhtml?chrome=false&gid=[YOUR_SHEET_ID]&range=A1:B1
You can get your sheet id by visiting your sheet(tab) in your spreadsheet (edit version) and inspecting the url.
Your published sheet probably retains the original #gid (which is Google's sheet ID used for local links). This will fail because it is linked to a Spreadsheet that is inaccessible to the new report. Please check if this is the case (you'll see in the links you've created). I can understand that you won't want to share the original reports but you can set up a small test Spreadsheet with a few linked sheet ranges to test the process - please share that.

File search in csv in uipath

I'm trying to figure out a way to search in a google csv (list of names) if a name is present.
Is it possible in uipath?
According to my research, it may fall into the web recorder and the use the module to read csv?
Here is what I tried again:
In the main screen, I created a sequence.
Open a browser to a url like this
"https://docs.google.com/spreadsheets/d/xyzz/edit#gid=0"
Added a "Navigate to" the above URL again.
Then selected "Data Scraping".
Click on the first row of google sheet.
Then to create a pattern I clicked on next row. It couldn't find a pattern.
So I'm stuck on the final 6th position. I tried downloading and working on the csv as an alternative. But I would rather want it on the google sheet in the browser.
Am I going in the right direction?
Another way is:
to download Google GSuite set of activities from Google GSuite.
Place it under Packages folder in your UiPath installation folder and load it via Manage Packages option in Design Mode.
Use GSuite Application Scope (you need to fill your ClientID and ClientSecret for your account)
Use activity Find Files and Folders to search for the file that you want by name. You will get the file ID (in your case the SpreadSheetID) as output
Use a Read Range activity placing the output from step 3 to get the contents of spreadsheet as DataTable
Use your pattern to search through DataTable for the desired result.
Activities are shown as per below (Highlighted are the ones to use)-(Notification on the second Image is due to the fact that ClientID and ClientSecret are mandatory and i left them empty):
Hope you will find these information useful

How to provide a static link to a Google Doc that is unique to each user

This doesn't feel like a unique problem, but I can't find an existing solution.
Background:
I am building a course in an LMS. I can insert links, but they are static links and each user will see the same link.
As part of this course, there is a Google Doc study guide that the students should be filling out (and sharing with their instructor).
I was wondering about which is the most viable solution:
1. When joining the course, use Google (Drive API or Apps Script (?)) to create an instance of the file (presumably by either copying an existing one or using a named template) with the appropriate sharing permissions (the learner and their instructor would both be able to see the files). There would be no link to the file within the course, just instructions on how to access their already created file.
2. Have some sort of handler so that I could insert a static link to this handler into the course; the handler would check if the user was logged into Google Drive, if the file existed it would open it, and if it didn't exist it would create it (using similar technique to above). This would have the benefit of being able to insert the same link anywhere and the student could immediately go to their specific and personalized Google doc.
Any other suggestion or existing solution out there?
Much obliged,
David
Both would need the same code that makes personalized copies. The only difference is the moment where you create them.
2 is better because it has less chances of failing since you create at most one copy at a time, and is also more practical to the user.
The 1 option needs to make bulk copies and those take time (drive api to make copy is slow) and script could timeout or reach some quota.
going with 1, one way is to have a single webapp published as owner which receives the drive file ID as a url parameter. on start, the app figures if the copy has already been done (by finding the file by title or by using script or user properties).
if the file isnt created yet, create a copy and share it with the user. then display a link to the file in the webapp. note that the script wont be able to open the file automatically, thus you need to show it as an anchor for the user to click.
to clarify, with this way the user always makes two clicks. once from your CMS and once in your webapp.