2

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:

Email Content

Power Automate Flow MS Flow:

HTML to text content

HTML to Text

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

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

Vicky Yeh
  • 21
  • 1
  • 4
  • Welcome to SO @Vicky. Can you post the contents of the output of `html to text` action as well as the `Compose` action. The problem here could be the link being embedded in the button since it's being generated by Google ads automatically. – Jimit Vaghela Jun 21 '21 at 07:07
  • Also, once the output of the contents is verified, it'd be easy to break it down to the actual `link` that is required for you to download the file and then upload it to google drive. – Jimit Vaghela Jun 21 '21 at 07:36
  • Hi @JimitVaghela, thanks for asking. I've updated the information in the thread. Can you please take a look and let me know if you have any ideas? Thank you! – Vicky Yeh Jun 23 '21 at 01:25
  • Before we can proceed can we make it clear where are we downloading the file from the link, is it your local machine? Directly uploading the file to Google Drive would not be possible. – Jimit Vaghela Jun 25 '21 at 08:47

1 Answers1

1

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.

enter image description here

Gandalf
  • 2,399
  • 2
  • 15
  • 19
  • Thanks, Gandalf! I workaround the Power Automate functions these days and found a way to address my problem using a free feature called "Upload file from URL" to get the file content, and it works. I still appreciate your answer and feedback! – Vicky Yeh Jun 30 '21 at 15:56
  • 1
    @VickyYeh - It would be best if you upload your workaround as answer. Other people can benefit from both the approaches – Gandalf Jun 30 '21 at 16:05