I am trying to append a random image from Giphy in IFTTT, if PostImageUrl
is null.
let myImageURL = WordPress.anyNewPostWp.PostImageUrl;
let noImageURL = `http://ifttt.com/images/no_image_card.png`;
let myGifImageURL = Giphy.historyOfRandomGifBasedOnKeyword[0].ImageURL;
let wpPostContent = WordPress.anyNewPostWp.PostContent;
let msg = '<img src= myGifImageURL>'+ '<br>' + wpPostContent ;
if (myImageURL == noImageURL) {
Blogger.createPostBlogger.setBody(msg);
//Blogger.createPostBlogger.skip(`Skipping post as No image URL present`);
}
By defaulti if PostImageUrl
is null, IFTTT automaticaly append http://ifttt.com/images/no_image_card.png
in place of PostImageUrl
.
I am trying to set Blogger Post body with existing post content + Random Giphy Image.
Pl suggest.