I'm getting attached PDF to invoice in Zoho books. I will use GET request (using invokeUrl or postUrl functions). I'm getting result already in Postman:
https://gyazo.com/e3a74ff1e5051928ddb162c0e01dbdd8
I'm getting content of PDF in binary format. But I'm stumbling what to do the next. I need to put this pdf now to any shared resource: Zoho Workdrive, Google disk, dropbox etc. I don't know how to do this in Deluge easier. It should be sharable resource (everyone should have access to this link and can download it).
I'm looking for documentation of Zoho API, found a lot examples in other languages like JS. Expect to find optimal (easy and fast as possible) solution in Deluge.
downloadFile = invokeurl
[
url :"https://books.zoho.com/api/v3/invoices/3675398000000085014/attachment"
type :GET
connection:"invoicescom"
];
info "downLoadFile = " + downloadFile;
uploadResponse = zoho.workdrive.uploadFile(downloadFile,"xxxxxxxxx","book1.pdf",FALSE,"workdrivecon");
info "uploadResp = " + uploadResponse;
Related
Using the SharePoint REST API, I can download a file from a Document Library no issue. But now I want to download an Attachment from a List.
I can find my list, and I can list my Attachments with the SP or Graph API no issue. example: https://learn.microsoft.com/en-us/graph/api/listitem-list?view=graph-rest-1.0&tabs=http or a /_api/web/lists/getbytitle('ListName')/items(1)/AttachmentFiles give me a nice list of my Attachment URLs, but not the file itself.
If I try a GET with Authorization on the URL I get a 401. But If I just paste the URL in a browser it downloads.
I have seen its possible with SP Powershell, but I am not able to use that in this solution.
I am not able to find a API to download it. Is this possible?
Bonus points if I can just get it as a Base64 string.
You have to loop on the attachments and append /$value to retrieve the data.
You can find more details in Microsoft documentation: https://learn.microsoft.com/en-us/sharepoint/dev/sp-add-ins/working-with-folders-and-files-with-rest#working-with-files-attached-to-list-items-by-using-rest
GET https://{site_url}/_api/web/lists/getbytitle('{list_title}')/items({item_id})/AttachmentFiles('{file_name}')/$value
Authorization: "Bearer " + accessToken
Accept: "application/json;odata=verbose"
I'm trying to use a logicapp to get the content of an email and post it to slack. By content I mean:
the body of the email and other elements like From:, Subject:
any attachment in the email (which usually are binary like PDF, Excel, image)
the email itself saved in a blob as .eml file
Slack chat.postMessage API works without any problem to send any text element. This API has some attachment argument but doesn't seemto be designed or binary files (or not for files at all, only strings)
I've tried slack files.upload one but couldn't figure out the syntax, especially the syntax using a regular HTTP POST. Could find examples online using curl, Python, JS and C# SDK but I don't know how to translate them to HTTP POST just like I do with chat.PostMessage
I've tried the API on SOAP UI, using file as argument as per the documentation, and I've used it in different sections: in the header, in the body, and using the Attachment Tab, none of the work and always the same error message : no_file_data
Unfortuatelly slack documentation lacks of details. Here's what it says about files.upload:
You must provide either a file or content parameter.
The content of the file can either be posted using an enctype of multipart/form-data (with the file parameter named file), in the usual way that files are uploaded via the browser, or the content of the file can be sent as a POST var called content. The latter should be used for creating a "file" from a long message/paste and forces "editable" mode.
In both cases, the type of data in the file will be intuited from the
filename and the magic bytes in the file, for supported formats.
I could use alternatives like just saving the attachments in blobs and use Azure functions to send the file, but I want to understand what's the limitations before changing the method.
Any clue?
I am completely new to Power Automate and have seen similar questions and posts about this topic, but most are addressed by inserting an HTML step at the end, which means it requires a paid version of Power Automate. I'm wondering if it's possible to build a flow with the free version.
If not, I'm also wondering if anyone has ideas on addressing my issue. I receive a CSV report via a URL in the email that sending from Google Ads every day. After I click the "view report" button, it directs me to a webpage and downloads a CSV file automatically. Eventually, I want to download the report and upload it to my Google drive.
I'm attaching the screenshot of the email content if it helps:
Power Automate Flow
HTML to text content
Initialization variable:
Name: startIndex
Type: Integer
indexOf(outputs('Html_to_text')?['body'],'VIEW REPORT')
Initialization variable2:
Name: endIndex
Type: Integer
add(indexOf(outputs('Html_to_text')?['body'],'Learn'),6)
Initialization variable:
Name: url
Type: String
substring(outputs('Html_to_text')?['body'],variables('startIndex'),sub(variables('endIndex'),variables('startIndex')))
Current output in plain text:
VIEW REPORT
[https://urldefense.com/v3/https://notifications.google.com/g/p/AD-FnEz5EAv3CG8aF4CNNPTSIlfZcRG3FiDbia5D0gDCbGwjg0TEhpi3mu5v36iTQxQV0vEUa9-y8NSJNJ8NZFN3HTw9wXaUatKQNt2zVCy6b_8WEfl18LisbGN-N45qaQlRQLNlXIaaeoeN7y2ryAni3ewe9RF1LgBaUwVeV184HMAT3wV6Wazp6m4K9EFNXJMubGCgsiR4bKsSjHYT1n0GUP922CyEqHvuieXoOJcg_zxAajq6NJ8mLrGFpXNzbzuf-Rkxt7K6U41i2sv23k8NjbyJggZzjmYlDCJxMi0Yfrhtp9nv4tHHWHYhmFoDrGlCUBpLIlU1OejCAAPh5b528dfwLEnuJiPZD2jbzSqi2xc0pni5azu6X5ovfYwwt1tOEhE6WMh-skqEAKPZsojJXlsR_1wEo6rjIzkZSPH1PlHZ6hOEf9NSIRsFyOSltCzFMciuSwZ2W9ElpCHJHY7HFtbscgtyCYkwIGF0ul5ZFd1X2TU10n-mNspwbm-nIYnVLU9lkAYwo7hLuIXk0jEYeB_5oBRht8dVRcdxtTe_hdAlP1V6fe5XPiAP7iKMKI1LecsdKdatHhY-Rpfj0ug;!!MOA0!LtG7zavxLCLQxJx_IASs8WS58E9Vyh6h007Aak8KErrQEibrffJ-7nMH43ah2***z9lJsRE$]
Learn
You can't do this with free connectors but this can be achieved via HTTP connector which is a premium connector.
Coming to you situation, i am assuming that you are able to get the actual csv file url (sometimes another url redirect you to actual file url).
Now you simply need to make an HTTP call from Power Automate flow and then create file using OneDrive for Business connector. See my code below, i have used a publicly available csv file to download and i am saving it to a folder in OneDrive directly.
On my photography website, I am storing photos on Amazon S3. To actually display them on the website, I am using signed URLs. This means that image URLs expire. Only the web application itself is able to generate valid image file URLs.
An example URL would look like this:
http://media.jungledragon.com/images/1849/21346_small.JPG?AWSAccessKeyId=05GMT0V3GWVNE7GGM1R2&Expires=1411603210&Signature=9MMO3zEXECtvB0w%2FuMEN8obt1ow%3D
Note that by the time you read this, that URL may have already expired. That's ok, the question is about the format.
Whilst the above URL format works fine on the website, it breaks XML files. The reason for this is the & character, which should be escaped.
For example, I'm trying to implement Windows 8.1 live tiles for the website, which you can link to an RSS feed. My RSS feed is here:
http://www.jungledragon.com/all/rss/promoted
That feed will work in most RSS readers, however, the Windows 8 tile builder (http://www.buildmypinnedsite.com/en) is particularly strict about the XML being valid. Here you can see the error it throws on said feed:
http://notifications.buildmypinnedsite.com/?feed=http://www.jungledragon.com/all/rss/promoted&id=1
Now, my simple thinking was to encode the & that are part of the signed URLs, by & or &. Whilst that may make the XML valid, unfortunately S3 does not accept & to be encoded. When used like that, the image will no longer load.
I'm wondering whether I am in a circular problem that cannot be solved?
I have had many similar problems with RSS feeds. XML documents should always use & (or an equivalent like & or &). If a reader is not capable of extracting the URL properly, then the reader is the culprit, not you. But I can tell you that reader programmers will disagree with you.
If you are a programmer, you could fix the problem by having a redirect, but that's a bit of work. So you'd retrieve the URL from S3, save that in your database and create a URL on your website such as http://www.jungledragon.com/images/123 and link the S3 URL with your images/123 page. Now when someone goes to page images/123, you retrieve the URL you saved from your S3 server.
Actually, if the URL http://www.jungledragon.com/images/123 is a reference to your image, you can get the S3 URL at that time and do the redirect on the fly!
I've been trying to find an answer for this for a while and I have not come across something that explains whether it is possible or not:
I have a bunch of documents in Google Docs and I'm retrieving the list of them using gdata library. I have tried a bunch of different ways to display/open just a single one when I select one from the list but I have not been able to find what kind of request to do or url to send with the request.
The files are public and the share settings are set to public but they won't show up.
Can anyone help me out figure out how to open a Google Docs document (any file format) either in an UIWebView or in the native app?
EDIT Ok, I think there was a bit of confusion as to this question. I have a list of documents from a user's feed in which I store the resourceID of the documents in my database. These documents are public and therefore should be allowed to be opened and viewed by others. Say another user comes in and wants to view documents from another person. I call the resourceID into the viewer url and it still says it needs authorization. I figured, since the document is public, a user that has not logged in (therefore no auth token) should be able to view the document still. Just like google docs works?
The DocsSampleWindowController included with the Objective-C library includes a method that shows how to open a document using its HTML link:
- (IBAction)viewSelectedDocClicked:(id)sender {
NSURL *docURL = [[[self selectedDoc] HTMLLink] URL];
if (docURL) {
[[NSWorkspace sharedWorkspace] openURL:docURL];
}
}
I have no idea about Objective-C but I can tell you in general terms..
Just send an authenticated request at the below uri:
Be sure to replace YourDocument'sResourceID with the resource ID of the document that you want to read..
https://docs.google.com/feeds/download/documents/export/Export?id=**YourDocument'sResourceID**&exportFormat=txt&format=txt
you can also play with the variable format in the above uri.. txt gives you the simple text and no styles..