Last active
July 28, 2023 01:49
-
-
Save katydorjee/9bb4a6fb4ee46ffe981c4220e7c3efca to your computer and use it in GitHub Desktop.
Dropbox - SFMC CloudPage Consume content from Dropbox
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h1 style="text-align: center;">Debug mode: ON 🟢</h1><br> | |
<script runat='server'> | |
Platform.Load('Core','1'); | |
try{ | |
</script> | |
%%=TreatAsContent(HTTPGet('https://dl.dropbox.com/s/dropbox_file_Id/fileName.html'))=%% | |
<script runat='server'> | |
}catch (ex){ | |
Write(Stringify(ex)); | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There has been an update in the Dropbox shared URL pattern. The new pattern includes a security key in the query string, which also needs to be added to the Ampscript, as demonstrated below.
URL: https://www.dropbox.com/scl/fi/dropbox_file_Id/fileName.html?rlkey=keyInQueryString&dl=0
Sample code:
%%=TreatAsContent(HTTPGet('https://dl.dropbox.com/s/dropbox_file_Id/fileName.html?dl=0&rlkey=keyInQueryString'))=%%