Create a post in Blogger with Google Apps Script

Required reading: ScriptApp#getOauthToken Blogger §post#insert UrlFetchApp#fetch Editing manifest#Setting explicit scopes Switch to standard GCP API Library Issue: Usage of asynchronous client side browser samples in the synchronous server side. Solution: It is possible to access Blogger api from Google apps script using UrlFetchApp Full OAuth flow can be bypassed using oauth token provided by ScriptApp … Read more

How to show tag literally in / tag?

Unfortunately it doesn’t work with HTML tags. <code> means “This is code”, <pre> means “White space in this markup is significant”. Neither means “The content of this element should not be treated as HTML”, so both work perfectly, even if they don’t mean what you want them to mean. Is there any way to show … Read more

How to get latest post id

If you just want to get data of the latest post, you can do : <div id=”title”></div> <div id=”content”></div> <script> function handleResponse(response) { var post = response.feed.entry[0]; document.getElementById(“title”).innerHTML += “<h1>” + post.title.$t + “</h1>”; document.getElementById(“content”).innerHTML += “<h1>” + post.content.$t + “</h1>”; } </script> <script src=”https://www.blogger.com/feeds/2057990476459552980/posts/default?alt=json-in-script&max-results=1&callback=handleResponse”></script> Updated: In order to get multiple posts, you can start … Read more