Skip to content

Instantly share code, notes, and snippets.

@zuzannamj
Created March 16, 2020 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zuzannamj/3d7f1f5ebd00e8cd903fb7581389bead to your computer and use it in GitHub Desktop.
Save zuzannamj/3d7f1f5ebd00e8cd903fb7581389bead to your computer and use it in GitHub Desktop.
var createAsset = HTTP.Post(requestUrl, contentType, Stringify(jsonBody), headerNames, headerValues);
//stringify response
var respo = createAsset.Response.toString();
//parse JSON
var res = Platform.Function.ParseJSON(respo);
//get the image url
var imgURL = res.fileProperties.publishedURL;
//initiate your data extension
var myDE = DataExtension.Init("{{external key of the data extension}}");
//add a new row with url to a data extensions
myDE.Rows.Add({ URLcolumn: imgURL });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment