I would like for a user to be able to right click on Google Doc in their Drive, select "Open with" and click my app.
Following the tutorial, error occurs on step 10.
I've created the app, authorization, etc. In "Drive UI Integration" settings panel, I have to fill out the following fields:
In Default MIME Types, I've tried adding document, google-apps.document, application/vnd.google-apps.document. None of those work - it's either rejected when saving or does not seem to have any effect - i.e. "Open with" menu on Google Docs does not list my app. Other MIME types, such as pdf, image, folder work fine.
What is the problem here?
A bit more about the use case:
My app allows user to select a Google Doc from their Google Drive which then gets automatically shared with other team members (i.e. the app adds permissions to it). The flow goes like this: user authorizes the app to open files on their drive, then select the Google Doc through file picker. This returns fileId to the app which can then add necessary permissions to it.
Looking at the documentation on how to integrate Open with:
App-specific files are defined in the Default Mime Types and Default File Extensions fields when you configured a Drive integration. G Suite files are defined in the Secondary Mime Types and Secondary File Extensions fields when you configured a Drive integration.
Basically in your case you may want to edit a document but first you will need to convert it to your desired format (text/html, text/plain, application/pdf, etc).
For MIME types defined in the Secondary Mime Types field, the Drive UI displays a dialog asking the user what file type to convert the G Suite file to. For example, if you select a Google Doc in the Drive UI and Secondary Mime Types field suggests your app supports text/html, text/plain, or application/pdf, the Drive UI asks the user if they want to convert to HTML, Plain text, or PDF.
In this section there is an explanation on how you need to use the files.export.
Also it may be useful the following link with all the possible formats for every type of document.
TL;DR: For G Suite documents the mimeType goes in the Secondary field
Related
I have a custom entity where I am using the file type column in dataverse and I have a workflow that stores every file that is being uploaded to Azure blob, delete it from Dataverse and fill up the URL of the file in another column.
The user should be able to preview any document type that is being stored in Azure blob based on the file path of the form. Previewing the file should be in the canvas app and not inside model-driven.
In Azure Blob, we can only preview PDF and image files, and the canvas app only supports seeing those files.
However, when it comes to Word and Excel documents, users will not be able to preview the file and the only option will be to download the file to their local desktop since there is no API for Azure Blob that supports those formats.
In SharePoint we do have API's to preview documents such as word/excel/PPT etc.. (we can't use SharePoint in our requirements)
I am trying to find a way to allow the user to preview the above-mentioned document types within the canvas app.
Is there any 3rd party API we can extend in the canvas app that converts other doc types to PDF? I thought of creating a flow that calls an API and responds to power apps to preview the file.
Some helpful content that I found are based on SharePoint/Dataverse but my scenario is totally different where I am using Azure Blob that is:
https://www.youtube.com/watch?v=vqK29FWbLxU&t=221s
https://www.youtube.com/watch?v=GFfAkk3g1y8&t=3s
https://pcf.gallery/notes-attachment-file-preview/
Any help is highly appreciated.
In my webapp it can happen that a user imported an owned drive file through a copy-pasted link. At that point I already know the fileId from the link, but I need to ask the user to go through the picker in order to make that file available within the app (I'm using drive.file scope only).
I tried using the View.setQuery(string) api, but I'm not sure it can help.
Is it possible to set a query for a specific fileId? Is there some other way to achieve it?
In my CRM HTML-Webresource, I got to display E-Mail activities with it's images (saved as attachments) as HTML. I take the description attribute for that.
As I realized, at least in CRM-Online, every attachment-image has a WRPC-Token that I need for the correct file path to load it.
How can I get the token? Most of the solutions that I found are either old or don't work for my circumstances.
Can I fetch the token out of the given HTML?
This approach doesn't make sense to me,
Attachments are stored within a database behind a web service, they are not at a file path you can simply open.
WRPC-Token's are used in security, I'm not sure how it is relevant or could provide a file path.
I would suggest writing code to access the CRM web services, this will enable you to retrieve the attachment data. There is an example here Sample: Create, retrieve, update, and delete an email attachment.
I have been trying to create a link, you can say either as an hyperlink or a kind of automation that is like I have a template which I paste it to my Gmail message and send it out to my team.
When they receive my mail they just have to click the path mentioned in the template. When clicked I want the exact folder to be popped out for them instead of going through all the locations and then to the destination.
So my question is: Is there a way for me to give away the path a link, so that any shared user can click and open the exact folder at the same time in any number of computers?
Example: C:\Users\ketan\Pictures\a\”destination” - An hyperlink to these kind of URL's should take them to the “Destination” directly in one click
Handling such link is usually considering a security issue inside a web browser, as it can allow to discover arbitra.ry resource on the local machine/ local network. So having such link is usually discouraged.
if you are only considering local resource the file:// protocol handler would be sufficient, but in most can the link would be handled by the internet browser (link to a file would trigger a download from the local filesystem, link to a directory would display a file list of the directory), and not the file manager.
Mail client usually handle html links via the default web browser.
I set up the Realtime drive example shown here: https://developers.google.com/drive/realtime/realtime-quickstart
On this site: http://shuub.com
But the thing is, that when I access the link from a different browser (logged in a different Google account), it won't load the file.
All I need is to edit some plain text with another user, without needing to access a google account, it doesn't even need to be saved after closing the site. Is it possible?
Thanks for reading.
But the thing is, that when I access the link from a different browser
(logged in a different Google account), it won't load the file.
Probably you need to share the file with the other user first.
Open Google Drive in your Browser. If you did not modify the example code, your file should be located in the root folder. It's probably named "New Realtime Quickstart File". Right-click on the file and share it with the other user by adding his account to the list and granting all permissions.
All I need is to edit some plain text with another user, without
needing to access a google account, it doesn't even need to be saved
after closing the site. Is it possible?
The website you have linked is not reachable so I don't know what you want to do exactly.
Probably you could also use other and (in that use case without saving and login) simpler techniques like Mozillas TogetherJS (you can try it on jsfiddle.net) or you could use a tool like Etherpad.