Posts

Showing posts from July, 2018

Google Spreadsheet automate Cell Clear and add Cell Value on Open event

Image
This is a continuation of my post  http://itskhembot.blogspot.com/2018/07/populate-google-spreadsheet-cells-with.html  , since I want it to update cell API data value on Open (or on hour basis, which you can set on triggers) I know it will be useful too on other circumstances. If you've followed my previous post you'll know where to add the script in Tools > Script Editor Now this time we will add new scripts, first one would be the clearSheet function: function cleanSheet() {   var sheet = SpreadsheetApp.getActiveSheet();   sheet.getRange('A:C').clearContent(); } I'm clearing A to C columns only since I only have data on those columns, you can put your desired range on it. Append the above code to our existing ImportJSON script Save. Now we will add triggers On the same window, click Edit > All your triggers It will popup a window for the triggers, click add if you have no triggers yet Next set trigger with event From Spreads...

Populate Google Spreadsheet cells with JSON API data, conversion tutorial

Image
For this tutorial we will populate Google Spreadsheets cells with API data, target columns and rows on it. First check the archived page for the ImportJSON documentation at  https://rawgit.com/bradjasper/ImportJSON/master/archive/blog.fastfedora.com/projects/import-json.html Next open up the latest version of ImportJSON script found at this repo link  https://github.com/bradjasper/ImportJSON Open ImportJSON.gs, click raw > copy the whole script Now on google spreadsheet, create new spreadsheet or open existing one which you'll populate data with Click Tools > Script Editor It will popup a new tab/window, delete the default script inside Then paste the ImportJSON code you've copied from the repo Save and name the project Now back to the spreadsheet click cell A1, from the documentation we know how to call the function ImportJSON I'll be using this sample JSON API link  https://api.github.com/users/hadley/repos on ...

GSuite not receiving Wordpress/Godaddy Contact Form emails [FIX]

Image
I've encountered this problem and what was puzzling was that yahoo and normal gmail were working properly. Reinstalled contact forms/updated plugins/set everyone option for email in Gsuite admin and none of them worked, finally I've checked a solution for the Godaddy CPanel setup stuff and here are the steps Login to your GoDaddy CPANEL Under Email group find MX Entry Click on it, it will load another screen Now by default, it is set to Local Mail Exchanger, click Remote Mail Exchanger > Click Change Test your contact forms and GSuite email. Everything should forward and work properly now!

Converting JSON API returned data into 2016 SQL table rows

Image
To start the setup you must have the 2016 version of SQL Server(or higher version) Create the table beforehand along w/ desired columns(sample columns added) Fetch API data w/ POSTMAN chrome extension tool or simply use your API fetching custom app to retrieve the data(browser will do too) In SQL Server 2016 create new query to your db > table Copy > Paste the following script DECLARE @json NVARCHAR(MAX) SET @json = N'[<json>]' INSERT INTO <table> SELECT * FROM OPENJSON ( @json ) WITH ( <fields> ) where <json> is the returned data from POSTMAN/browser, <table> is the SQL table to which you want the data to be added, <fields> would be the matching fields we add from JSON to SQL column an example for this with exact sample values would be: DECLARE @json NVARCHAR(MAX) SET @json = N'[ { "Order": { "Number":"SO43659", "Date":"2011-05-31...