<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>oauth Archives | ZappySys Blog</title>
	<atom:link href="https://zappysys.com/blog/tag/oauth/feed/" rel="self" type="application/rss+xml" />
	<link>https://zappysys.com/blog/tag/oauth/</link>
	<description>SSIS / ODBC Drivers / API Connectors for JSON, XML, Azure, Amazon AWS, Salesforce, MongoDB and more</description>
	<lastBuildDate>Wed, 21 Jan 2026 22:44:44 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.4.4</generator>

<image>
	<url>https://zappysys.com/blog/wp-content/uploads/2023/01/cropped-zappysys-symbol-large-32x32.png</url>
	<title>oauth Archives | ZappySys Blog</title>
	<link>https://zappysys.com/blog/tag/oauth/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>How to call NetSuite RESTlet API in SSIS / ODBC</title>
		<link>https://zappysys.com/blog/call-netsuite-restlet-ssis-odbc/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Mon, 23 May 2022 21:18:19 +0000</pubDate>
				<category><![CDATA[ODBC PowerPack]]></category>
		<category><![CDATA[REST API]]></category>
		<category><![CDATA[REST API Integration]]></category>
		<category><![CDATA[SSIS OAuth Connection]]></category>
		<category><![CDATA[SSIS REST API Task]]></category>
		<category><![CDATA[NetSuite]]></category>
		<category><![CDATA[oauth]]></category>
		<category><![CDATA[oauth1]]></category>
		<category><![CDATA[oauth2]]></category>
		<category><![CDATA[rest api]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=9657</guid>

					<description><![CDATA[<p>Introduction In our previous post we saw how to read API data in SSIS. This post we will cover how to call NetSuite RESTlet to read / write data in SSIS or ODBC Apps. For demo purpose we will use SSIS PowerPack REST API Task but concepts and many UI elements remain same for ODBC [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/call-netsuite-restlet-ssis-odbc/">How to call NetSuite RESTlet API in SSIS / ODBC</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2022/05/netsuite-logo.png"><img loading="lazy" decoding="async" class=" wp-image-9658 alignleft" src="https://zappysys.com/blog/wp-content/uploads/2022/05/netsuite-logo.png" alt="" width="144" height="114" srcset="https://zappysys.com/blog/wp-content/uploads/2022/05/netsuite-logo.png 309w, https://zappysys.com/blog/wp-content/uploads/2022/05/netsuite-logo-300x238.png 300w" sizes="(max-width: 144px) 100vw, 144px" /></a>In our previous post we saw how to <a href="https://zappysys.com/blog/ssis-read-api-data-load-sql-table/">read API data in SSIS</a>. This post we will cover how to call <a href="https://docs.oracle.com/en/cloud/saas/netsuite/ns-online-help/section_N2979684.html">NetSuite RESTlet</a> to read / write data in SSIS or ODBC Apps. For demo purpose we will use <a href="https://zappysys.com/products/ssis-powerpack/ssis-rest-api-web-service-task/">SSIS PowerPack REST API Task</a> but concepts and many UI elements remain same for <a href="https://zappysys.com/products/odbc-powerpack/odbc-json-rest-api-driver/">ODBC JSON Driver</a> too. This article assumes you know how to write Netsuite RESTlet and you have obtained Credentials to call RESTlet from extranal app.</p>
<h2></h2>
<h2></h2>
<h2>What is NetSuite RESTlets</h2>
<p>NetSuite added a really nice feature to expose business data and workflows as API by writing Javascript functions which they call it <strong>RESTlets</strong>. You can secure and customize these restlets as per your need.</p>
<p>You can automate CRUD (Create /Read / Write / Delete) operations in NetSuite by writing special functions in JavaScript and expose those functions as API URL which can be called by any external Systems (i.e. SSIS Packages , ODBC Apps like Power BI, Informatica, SSRS).</p>
<p>RESTlet can be secured few ways such as OAuth 1.0 and OAuth 2.0 authentication. We will cover both approach briefly in this article. You can choose any one as per your need</p>
<div class="content_block" id="custom_post_widget-2523"><h2><span id="Prerequisites">Prerequisites</span></h2>
Before we perform the steps listed in this article, you will need to make sure the following prerequisites are met:
<ol style="margin-left: 1.5em;">
 	<li><abbr title="SQL Server Integration Services">SSIS</abbr> designer installed. Sometimes it is referred to as <abbr title="Business Intelligence Development Studio">BIDS</abbr> or <abbr title="SQL Server Data Tools">SSDT</abbr> (<a href="https://docs.microsoft.com/en-us/sql/ssdt/download-sql-server-data-tools-ssdt" target="_blank" rel="noopener">download it from the Microsoft site</a>).</li>
 	<li>Basic knowledge of SSIS package development using <em>Microsoft SQL Server Integration Services</em>.</li>
 	<li>Make sure <span style="text-decoration: underline;"><a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">ZappySys SSIS PowerPack</a></span> is installed (<a href="https://zappysys.com/products/ssis-powerpack/download/" target="_blank" rel="noopener">download it</a>, if you haven't already).</li>
 	<li>(<em>Optional step</em>)<em>.</em> <a href="https://zappysys.zendesk.com/hc/en-us/articles/360035974593" target="_blank" rel="noopener">Read this article</a>, if you are planning to deploy packages to a server and schedule their execution later.</li>
</ol></div>
<h2>Creating NetSuite RESTlet / Obtain OAuth Credentials (Client ID and Secret)</h2>
<p>Below video shows how to obtain necessary credentials to call Netsuites API (RESTlet).</p>
<p>At mark 4:30 seconds it will show you How to use OAuth 2.0 for calling RESTlet</p>
<a href="https://zappysys.com/blog/call-netsuite-restlet-ssis-odbc/"><img decoding="async" src="https://zappysys.com/blog/wp-content/plugins/wp-youtube-lyte/lyteCache.php?origThumbUrl=%2F%2Fi.ytimg.com%2Fvi%2FMAOMQp5dh0U%2Fhqdefault.jpg" alt="YouTube Video"></a><br /><br /></p>
<p>&nbsp;</p>
<h2>Create NetSuite RESTlet Connection</h2>
<p>There are few ways to authenticate NetSuite RESTlet. If you are using ZappySys Products then it makes it super easy to use either approach. Lets look at both approaches.</p>
<h3>Using OAuth 2.0 (Recommended)</h3>
<p>As per above video if you obtained Client ID and Secret for OAuth 2.0 you can follow below steps to configure OAuth connection to call RESTlet.</p>
<p>What you need to use OAuth 2.0.</p>
<ul>
<li>Your Account ID (it goes in URL)</li>
<li>Your Client ID and Secret (Obtained from Netsuite Portal) &#8211; See above video Mark 04:30</li>
<li>Register Redirect URL in NetSuite portal (we recommend you use <strong>https://zappysys.com/oauth</strong> as call back Url for Automatic Code extraction)</li>
</ul>
<p><strong>Steps to configure OAuth Connection</strong></p>
<ol>
<li>Right click on Connection Panel and choose Choose &#8220;New Connection..&#8221;. Select <strong>ZS-OAUTH</strong> type<br />
<strong><strong><br />
</strong></strong></p>
<div id="attachment_1569" style="width: 687px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-oauth-create-new-connection.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-1569" class="size-full wp-image-1569" src="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-oauth-create-new-connection.png" alt="Create new SSIS OAuth API Connection Manager" width="677" height="220" srcset="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-oauth-create-new-connection.png 677w, https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-oauth-create-new-connection-300x97.png 300w" sizes="(max-width: 677px) 100vw, 677px" /></a><p id="caption-attachment-1569" class="wp-caption-text">Create new SSIS OAuth API Connection Manager</p></div>
<p>&nbsp;</p>
<p>&nbsp;</li>
<li> Enter following things<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
<strong>On General Tab<br />
</strong>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
ClientID and Secret: <strong>&lt;get it from NetSuite&gt;</strong><br />
Authorization URL: <strong>https://&lt;accountID&gt;.</strong><a href="http://app.netsuite.com/app/login/oauth2/authorize.nl" target="_blank" rel="noopener noreferrer"><strong>app.netsuite.com/app/login/oauth2/authorize.nl</strong></a><br />
Token URL: <strong>https://&lt;accountID&gt;.suitetalk.api.netsuite.com/services/rest/auth/oauth2/v1/token<br />
</strong>Scope: <strong><strong><strong>restlet</strong></strong></strong></p>
<div id="attachment_9660" style="width: 642px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2022/05/netsuite-oauth2-api-connection.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9660" class="size-full wp-image-9660" src="https://zappysys.com/blog/wp-content/uploads/2022/05/netsuite-oauth2-api-connection.png" alt="Configure NetSuite OAuth 2.0 Connection for API call" width="632" height="418" srcset="https://zappysys.com/blog/wp-content/uploads/2022/05/netsuite-oauth2-api-connection.png 632w, https://zappysys.com/blog/wp-content/uploads/2022/05/netsuite-oauth2-api-connection-300x198.png 300w" sizes="(max-width: 632px) 100vw, 632px" /></a><p id="caption-attachment-9660" class="wp-caption-text">Configure NetSuite OAuth 2.0 Connection for API call</p></div>
<p>&nbsp;</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
<strong>On Advanced Tab<br />
</strong>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
Callback / Redirect URL:  <strong>https://zappysys.com/oauth </strong> (this must be entered same way in NetSuite Portal)</p>
<div id="attachment_9659" style="width: 563px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2022/05/oauth2-connection-callback-redirect-url.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9659" class="size-full wp-image-9659" src="https://zappysys.com/blog/wp-content/uploads/2022/05/oauth2-connection-callback-redirect-url.png" alt="OAuth2 Connection - Callback / Redirect URL" width="553" height="201" srcset="https://zappysys.com/blog/wp-content/uploads/2022/05/oauth2-connection-callback-redirect-url.png 553w, https://zappysys.com/blog/wp-content/uploads/2022/05/oauth2-connection-callback-redirect-url-300x109.png 300w" sizes="(max-width: 553px) 100vw, 553px" /></a><p id="caption-attachment-9659" class="wp-caption-text">OAuth2 Connection &#8211; Callback / Redirect URL</p></div></li>
<li>Now go back to General Tab and click <strong>Generate Token</strong> button</li>
<li>Follow login screen and try to finish the flow. At the end it will generate Tokens and populate on UI</li>
<li>Click OK to save</li>
</ol>
<h3>Using OAuth 1.0</h3>
<p>Another approach is use OAuth 1.0 (Older version). If you have enabled OAuth 1.0 in NetSuite then follow below steps (Create connection is same as before).</p>
<ol>
<li>Setup General Tab and Advanced Tab as below.<br />
On <strong>==== </strong><strong>General Tab====</strong>:<br />
Enter ClientID, ClientSecret, AccessToken, AccessToken Secret<br />
On <strong>==== </strong><strong>Advanced Tab ====</strong>:<br />
Check <strong>Do Not Include Empty Key/Value Pairs</strong><br />
Select Signature Method as <strong>HMAC-SHA256</strong><br />
For Extra Token Attribute enter <strong>realm=&lt;your-account-number&gt;_SB1</strong></li>
<li>Click OK to Save</li>
</ol>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2022/05/netsuite-oauth1-api-connection.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-9662" src="https://zappysys.com/blog/wp-content/uploads/2022/05/netsuite-oauth1-api-connection.png" alt="" width="495" height="363" srcset="https://zappysys.com/blog/wp-content/uploads/2022/05/netsuite-oauth1-api-connection.png 495w, https://zappysys.com/blog/wp-content/uploads/2022/05/netsuite-oauth1-api-connection-300x220.png 300w" sizes="(max-width: 495px) 100vw, 495px" /></a></p>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2022/05/netsuite-oauth1-api-connection_realm_accountnumber.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-9661" src="https://zappysys.com/blog/wp-content/uploads/2022/05/netsuite-oauth1-api-connection_realm_accountnumber.png" alt="" width="495" height="363" srcset="https://zappysys.com/blog/wp-content/uploads/2022/05/netsuite-oauth1-api-connection_realm_accountnumber.png 495w, https://zappysys.com/blog/wp-content/uploads/2022/05/netsuite-oauth1-api-connection_realm_accountnumber-300x220.png 300w" sizes="(max-width: 495px) 100vw, 495px" /></a></p>
<h2></h2>
<h2>Call NetSuite RESTlet in SSIS</h2>
<ol>
<li>Create a new SSIS Package</li>
<li>Drag REST API Task from SSIS Toolbox<img decoding="async" class="figureimage" title="SSIS REST Api Web Service Task - Drag and Drop" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/rest-api-task/ssis-rest-api-web-service-task-drag.png" alt="SSIS REST Api Task - Drag and Drop" /></li>
<li>Double click the Task to configure</li>
<li>Select <strong>URL from Connection </strong></li>
<li>From Connection dropdown select OAuth connection we created in the earlier section (either OAuth 1 or OAuth 2)</li>
<li>Enter the URL as below. Assuming you copied URL from NetSuite Replace script ID and account number<br />
<pre class="crayon-plain-tag">https://&lt;account-number&gt;-sb1.restlets.api.netsuite.com/app/site/hosting/restlet.nl?script=&lt;scriptid&gt;&amp;deploy=1</pre>Enter <strong>&lt;account-number&gt;</strong><br />
Enter <strong>&lt;scriptid&gt;</strong></li>
<li>Change Method to POST if your script supports Parameters (Else you can supply id=xxxx and recordtype=xxxxx in the URL for GET request)</li>
<li>If its POST request then chnage ContentType to ApplicationJSON (application/json)</li>
<li>Enter your Input in the body. In below example our RESTlet takes sql query as input so we enter just one parameter named query but you can have different parameter(s)<br />
<pre class="crayon-plain-tag">Syntax:  { param1_name : &lt;value&gt; , param2_name : &lt;value&gt; ....  }</pre>
</li>
<li>Now click Test see everything works
<div id="attachment_9663" style="width: 1178px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2022/05/calling-netsuite-restlet-api-ssis.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9663" class="size-full wp-image-9663" src="https://zappysys.com/blog/wp-content/uploads/2022/05/calling-netsuite-restlet-api-ssis.png" alt="Calling NetSuite RESTlet in SSIS (Using REST API Task)" width="1168" height="928" srcset="https://zappysys.com/blog/wp-content/uploads/2022/05/calling-netsuite-restlet-api-ssis.png 1168w, https://zappysys.com/blog/wp-content/uploads/2022/05/calling-netsuite-restlet-api-ssis-300x238.png 300w, https://zappysys.com/blog/wp-content/uploads/2022/05/calling-netsuite-restlet-api-ssis-768x610.png 768w, https://zappysys.com/blog/wp-content/uploads/2022/05/calling-netsuite-restlet-api-ssis-1024x814.png 1024w" sizes="(max-width: 1168px) 100vw, 1168px" /></a><p id="caption-attachment-9663" class="wp-caption-text">Calling NetSuite RESTlet in SSIS (Using REST API Task)</p></div></li>
</ol>
<p>&nbsp;</p>
<h2>Conclusion</h2>
<p>We saw how easy it is to call NetSuite RESTlets or other NetSuite API in SSIS / other BI Apps using ODBC Drivers provided by ZappySys. <a href="https://zappysys.com/products/ssis-powerpack/download/">Download SSIS PowerPack</a> and try your self see how easy it is to consume virtually any API in SSIS.</p>
<p>The post <a href="https://zappysys.com/blog/call-netsuite-restlet-ssis-odbc/">How to call NetSuite RESTlet API in SSIS / ODBC</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Read/Write ManageEngine ServiceDesk Data in SSIS (Zoho API)</title>
		<link>https://zappysys.com/blog/read-write-manageengine-servicedesk-data-ssis-zoho-api/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Thu, 28 Apr 2022 18:38:33 +0000</pubDate>
				<category><![CDATA[SSIS JSON Source (File/REST)]]></category>
		<category><![CDATA[SSIS OAuth Connection]]></category>
		<category><![CDATA[manageengine]]></category>
		<category><![CDATA[oauth]]></category>
		<category><![CDATA[pagination]]></category>
		<category><![CDATA[rest api]]></category>
		<category><![CDATA[servicedesk]]></category>
		<category><![CDATA[zoho]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=9624</guid>

					<description><![CDATA[<p>Introduction In this post, you will learn how to read / write ManageEngine ServiceDesk data in SSIS (Drag and drop approach without any coding).  We will use SSIS JSON/ REST API Source to extract data from Servicedesk API and use SSIS Web API Destination to write data to Zoho. We will look at step-by-step instructions to read ServiceDesk  data [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/read-write-manageengine-servicedesk-data-ssis-zoho-api/">Read/Write ManageEngine ServiceDesk Data in SSIS (Zoho API)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<div class="su-note"  style="border-color:#e5de9d;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><div class="su-note-inner su-u-clearfix su-u-trim" style="background-color:#FFF8B7;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><strong>UPDATE:</strong> ZappySys has released a brand new <a href="https://zappysys.com/api/integration-hub/zoho-managedengine-service-desk-plus-connector/">API Connector for Zoho / ManageEngine ServiceDesk Pro OnDemand (Cloud Version)</a> which makes it much simpler to <strong>Read/Write ServiceDesk Data in SSIS</strong> compared to the steps listed in this article. You can still use steps from this article but if you are new to API or want to avoid learning curve with API then use newer approach.</p>
<p>Please visit <a href="https://zappysys.com/api/integration-hub/">this page to see all</a> Pre-Configured ready to use API connectors which you can use in <a href="https://zappysys.com/products/ssis-powerpack/ssis-api-source/">SSIS API Source</a> / <a href="https://zappysys.com/products/ssis-powerpack/ssis-api-destination/">SSIS API Destination</a> OR <a href="https://zappysys.com/products/odbc-powerpack/odbc-api-driver/">API ODBC Driver</a> (for non-SSIS Apps such as Excel, Power BI, Informatica).</p>
</div></div>
<p>In this post, you will learn how to read / write ManageEngine ServiceDesk data in SSIS (Drag and drop approach without any coding).  We will use <a href="https://zappysys.com/products/ssis-powerpack/ssis-json-file-source/" target="_blank" rel="noopener">SSIS JSON/ REST API Source</a> to extract data from Servicedesk API and use <a href="https://zappysys.com/products/ssis-powerpack/ssis-web-api-destination-connector/" target="_blank" rel="noopener">SSIS Web API Destination</a> to write data to Zoho.</p>
<p>We will look at step-by-step instructions to read ServiceDesk  data (e.g. Request, Problems, Contacts) and load into SQL Server Database Table.</p>
<div class="content_block" id="custom_post_widget-2523"><h2><span id="Prerequisites">Prerequisites</span></h2>
Before we perform the steps listed in this article, you will need to make sure the following prerequisites are met:
<ol style="margin-left: 1.5em;">
 	<li><abbr title="SQL Server Integration Services">SSIS</abbr> designer installed. Sometimes it is referred to as <abbr title="Business Intelligence Development Studio">BIDS</abbr> or <abbr title="SQL Server Data Tools">SSDT</abbr> (<a href="https://docs.microsoft.com/en-us/sql/ssdt/download-sql-server-data-tools-ssdt" target="_blank" rel="noopener">download it from the Microsoft site</a>).</li>
 	<li>Basic knowledge of SSIS package development using <em>Microsoft SQL Server Integration Services</em>.</li>
 	<li>Make sure <span style="text-decoration: underline;"><a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">ZappySys SSIS PowerPack</a></span> is installed (<a href="https://zappysys.com/products/ssis-powerpack/download/" target="_blank" rel="noopener">download it</a>, if you haven't already).</li>
 	<li>(<em>Optional step</em>)<em>.</em> <a href="https://zappysys.zendesk.com/hc/en-us/articles/360035974593" target="_blank" rel="noopener">Read this article</a>, if you are planning to deploy packages to a server and schedule their execution later.</li>
</ol></div>
<h2>Authentication ServiceDesk REST API in SSIS (Use OAuth 2.0)</h2>
<p>Very first step to call ServiceDesk API is you need to register OAuth App in Zoho Portal. Don&#8217;t get confused if you see Zoho Portal for ServiceDesk a Product from ManageEngine is in fact Zoho subsidiary (in other words Zoho is the parent company). ServiceDesk has On-Premises version too but this article is only about Cloud version.</p>
<h3>Register Zoho OAuth App and get ClientID/ Secret (*** MUST READ ***)</h3>
<p><a href="https://zappysys.com/blog/register-oauth-app-zoho-api/" target="_blank" rel="noopener">Check this article</a> to register your OAuth App and obtain Client ID  /Client Secret</p>
<h3>Create ServiceDesk API Connection in SSIS</h3>
<p>Once you create Zoho OAuth App now its time to call some Zoho API. Let&#8217;s create the OAuth Connection first. In the next section we will see how to load data in SQL Server.</p>
<ol>
<li>Right click on Connection Panel and choose Choose &#8220;New Connection..&#8221;. Select <strong>ZS-OAUTH</strong> type
<div id="attachment_1569" style="width: 687px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-oauth-create-new-connection.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-1569" class="size-full wp-image-1569" src="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-oauth-create-new-connection.png" alt="Create new SSIS OAuth API Connection Manager" width="677" height="220" srcset="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-oauth-create-new-connection.png 677w, https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-oauth-create-new-connection-300x97.png 300w" sizes="(max-width: 677px) 100vw, 677px" /></a><p id="caption-attachment-1569" class="wp-caption-text">Create new SSIS OAuth API Connection Manager</p></div></li>
<li>Configure your OAuth connection General Tab as below</li>
<li>OAuth Provider: <strong>Custom</strong></li>
<li>OAuth Version: <strong>OAuth2</strong></li>
<li><strong>Client Id</strong> , <strong>Client Secret </strong></li>
<li>Enter One Scope Per Line (For more info on scope <a href="https://www.manageengine.com/products/service-desk/sdpod-v3-api/getting-started/oauth-2.0.html#scopes" target="_blank" rel="noopener">read here</a>) . For write you can change READ to WRITE or use ALL as per the help link.<br />
<pre class="crayon-plain-tag">SDPOnDemand.requests.READ</pre>
</li>
<li>Auth URL : <strong>https://accounts.zoho.com/oauth/v2/auth</strong></li>
<li>Token URL:  <strong><strong>https://accounts.zoho.com/oauth/v2/token</strong></strong><a href="https://zappysys.com/blog/wp-content/uploads/2022/04/zoho-api-configure-oauth-token-url-scopes.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-9617" src="https://zappysys.com/blog/wp-content/uploads/2022/04/zoho-api-configure-oauth-token-url-scopes.png" alt="" width="577" height="328" srcset="https://zappysys.com/blog/wp-content/uploads/2022/04/zoho-api-configure-oauth-token-url-scopes.png 577w, https://zappysys.com/blog/wp-content/uploads/2022/04/zoho-api-configure-oauth-token-url-scopes-300x171.png 300w" sizes="(max-width: 577px) 100vw, 577px" /></a></li>
<li>Configure Advanced tab as below</li>
<li>Enter Callback URL : <strong>https://zappysys.com/oauth</strong></li>
<li>Enter Extra Attribute for /Auth : <strong>access_type=offline&amp;prompt=consent</strong><br />
This is needed to obtain refresh_token (if you ommit this then only access_token returned which cannot be renewed once expired after 1hr)</p>
<div class="mceTemp"></div>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2022/04/zoho-api-oauth-redirect-callback-url.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-9618" src="https://zappysys.com/blog/wp-content/uploads/2022/04/zoho-api-oauth-redirect-callback-url.png" alt="" width="551" height="320" srcset="https://zappysys.com/blog/wp-content/uploads/2022/04/zoho-api-oauth-redirect-callback-url.png 551w, https://zappysys.com/blog/wp-content/uploads/2022/04/zoho-api-oauth-redirect-callback-url-300x174.png 300w" sizes="(max-width: 551px) 100vw, 551px" /></a></li>
<li>Now go back to general tab and <strong>Click Generate Token</strong>. Close the Popup and use Full browser instead if you see prompt.</li>
<li>Click OK to save the connection UI</li>
</ol>
<h2>Read data from ServiceDesk API in SSIS JSON Source</h2>
<p>In this section we will learn how to read data from ServiceDesk using SSIS JSON Source. We will use OAuth connection created in earlier section.</p>
<p>Now lets look at step by step example of reading ManageEngine ServiceDesk data using SSIS (e.g. Requests).</p>
<p>ManageEngine provides JSON API for read action so we will Use <a href="https://zappysys.com/products/ssis-powerpack/ssis-json-file-source/" target="_blank" rel="noopener">SSIS JSON Source</a> for this purpose.</p>
<h3>Configure JSON Source</h3>
<p>So below steps shows example of reading from ManageEngine Requests API</p>
<ol>
<li>Open SSIS Package</li>
<li>Drag data flow task from Control flow SSIS Toolbox
<div style="width: 470px" class="wp-caption alignnone"><img loading="lazy" decoding="async" class="size-full" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/drag-and-drop-data-flow-task.png" alt="Drag data flow from SSIS Toolbox" width="460" height="155" /><p class="wp-caption-text">Drag data flow from SSIS Toolbox</p></div></li>
<li>Go to data flow and drag <a href="https://zappysys.com/products/ssis-powerpack/ssis-json-file-source/" target="_blank" rel="noopener">ZS JSON Source</a> from SSIS Toolbox
<div style="width: 551px" class="wp-caption alignnone"><img loading="lazy" decoding="async" class="size-full" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/json-source/ssis-json-source-adapter-drag.png" alt="Drag and drop SSIS JSON Source (REST API or File)" width="541" height="144" /><p class="wp-caption-text">Drag and drop SSIS JSON Source (REST API or File)</p></div></li>
<li>Double click JSON Source to configure. Enter URL as below. You can supply few more parameters. <a href="https://www.zoho.com/crm/developer/docs/api/get-records.html" target="_blank" rel="noopener">Click Here to get full list of parameters and usage</a>. In below example we are reading records from Leads Module but you can replace Leads to something else (e.g. Accounts). Refer to above help link for available Modules.<br />
<pre class="crayon-plain-tag">https://sdpondemand.manageengine.com/api/v3/requests</pre>
</li>
<li>Check Use Credentials. Select OAuth connection manager we created in the previous section.</li>
<li>Add the Accept header in HTTP Headers.<br />
<pre class="crayon-plain-tag">Accept: application/vnd.manageengine.sdp.v3+json</pre>
</li>
<li>Under filter options tab, enter <strong>Array Filter</strong> as  <pre class="crayon-plain-tag">$.requests[*]</pre></li>
<li>Now click Preview to see your data</li>
<li>Click OK to save UI. In the next section, we will see how to setup pagination and incremental extract of Servicedesk records. After that we will see how to load data into SQL Server Table.</li>
</ol>
<div id="attachment_9626" style="width: 961px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2022/04/ssis-read-manageengine-servicedesk-data-api.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9626" class="size-full wp-image-9626" src="https://zappysys.com/blog/wp-content/uploads/2022/04/ssis-read-manageengine-servicedesk-data-api.png" alt="Read ManageEngine ServiceDesk Plus data in SSIS (Cloud Version) - Zoho API" width="951" height="909" srcset="https://zappysys.com/blog/wp-content/uploads/2022/04/ssis-read-manageengine-servicedesk-data-api.png 951w, https://zappysys.com/blog/wp-content/uploads/2022/04/ssis-read-manageengine-servicedesk-data-api-300x287.png 300w, https://zappysys.com/blog/wp-content/uploads/2022/04/ssis-read-manageengine-servicedesk-data-api-768x734.png 768w" sizes="(max-width: 951px) 100vw, 951px" /></a><p id="caption-attachment-9626" class="wp-caption-text">Read ManageEngine ServiceDesk Plus data in SSIS (Cloud Version) &#8211; Zoho API</p></div>
<h3>ServiceDesk API Pagination (Read all Requests)</h3>
<p>Just like most API ServiceDesk also uses pagination. See below to learn how to configure pagination in JSON Source for ServiceDesk API.</p>
<ol>
<li>Double click JSON Source</li>
<li>Change URL to include two things (Page size (how many rows per page and start row). Note &lt;%page%&gt; must match with <strong>Page Num Indicator </strong>you going enter in the next screen<br />
<pre class="crayon-plain-tag">https://sdpondemand.manageengine.com/api/v3/requests?input_data={"list_info":{"row_count":100,"start_index":&lt;%page%&gt;}}</pre>
</li>
<li>Go to <strong>Pagination</strong> Tab and select <strong>URL Path Mode</strong></li>
<li>For <strong>Page Num Indicator</strong> : Enter <pre class="crayon-plain-tag">&lt;%page%&gt;</pre></li>
<li>For <strong>Increment By</strong> : Enter <pre class="crayon-plain-tag">100</pre></li>
<li>Page Start Number select New variable call it StartIndex and start default value <strong>1</strong></li>
</ol>
<p>Once you configure this way now your API will return all records until last page is detected. For more information on pagination <a href="https://zappysys.com/blog/ssis-rest-api-looping-until-no-more-pages-found/" target="_blank" rel="noopener">check this article</a></p>
<div id="attachment_9628" style="width: 1043px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2022/04/ssis-read-manageengine-servicedesk-api-pagination.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9628" class="size-full wp-image-9628" src="https://zappysys.com/blog/wp-content/uploads/2022/04/ssis-read-manageengine-servicedesk-api-pagination.png" alt="How to paginate ManageEngine ServiceDesk API" width="1033" height="1006" srcset="https://zappysys.com/blog/wp-content/uploads/2022/04/ssis-read-manageengine-servicedesk-api-pagination.png 1033w, https://zappysys.com/blog/wp-content/uploads/2022/04/ssis-read-manageengine-servicedesk-api-pagination-300x292.png 300w, https://zappysys.com/blog/wp-content/uploads/2022/04/ssis-read-manageengine-servicedesk-api-pagination-768x748.png 768w, https://zappysys.com/blog/wp-content/uploads/2022/04/ssis-read-manageengine-servicedesk-api-pagination-1024x997.png 1024w" sizes="(max-width: 1033px) 100vw, 1033px" /></a><p id="caption-attachment-9628" class="wp-caption-text">How to paginate ManageEngine ServiceDesk API</p></div>
<h3>Loading ServiceDesk data into SQL Server Table / Other Target</h3>
<div class="content_block" id="custom_post_widget-5617"><p>ZappySys SSIS PowerPack makes it easy to load data from various sources such as REST, SOAP, JSON, XML, CSV or from other source into SQL Server, or PostgreSQL, or Amazon Redshift, or other  targets. The <strong>Upsert Destination</strong> component allows you to automatically insert new records and update existing ones based on key columns. Below are the detailed steps to configure it.</p>
<h3>Step 1: Add Upsert Destination to Data Flow</h3>
<ol>
<li>Drag and drop the <strong>Upsert Destination</strong> component from the SSIS Toolbox.</li>
<li>Connect your source component (e.g., JSON / REST / Other Source) to the Upsert Destination.</li>
</ol>
<div class="wp-caption aligncenter">
<a href="https://zappysys.com/blog/wp-content/uploads/2017/08/ssis-data-flow-drag-drop-upsert-destination.png">
<img loading="lazy" decoding="async" class="size-full" alt="" src="https://zappysys.com/blog/wp-content/uploads/2017/08/ssis-data-flow-drag-drop-upsert-destination.png" /></a>
<p class="wp-caption-text">SSIS - Data Flow - Drang and Drop Upsert Destination Component</p>
</div>
<h3>Step 2: Configure Target Connection</h3>
<ol>
<li>Double-click the <strong>Upsert Destination</strong> component to open the configuration window.</li>
<li>Under <strong>Connection</strong>, select an existing target connection or click <strong>NEW</strong> to create a new connection.
<ul>
<li>Example: SQL Server, or PostgreSQL, or Amazon Redshift.</li>
</ul>
</li>
</ol>
<h3>Step 3: Select or Create Target Table</h3>
<ol>
<li>In the <strong>Target Table</strong> dropdown, select the table where you want to load data.</li>
<li>Optionally, click <strong>NEW</strong> to create a new table based on the source columns.</li>
</ol>
<div class="wp-caption aligncenter">
<a href="https://zappysys.com/blog/wp-content/uploads/2020/09/upsert-destination-configuration.png">
<img loading="lazy" decoding="async" class="size-full" alt="" src="https://zappysys.com/blog/wp-content/uploads/2020/09/upsert-destination-configuration.png" /></a>
<p class="wp-caption-text">Configure SSIS Upsert Destination Connection - Loading data (REST / SOAP / JSON / XML /CSV) into SQL Server or other target using SSIS</p>
</div>
<h3>Step 4: Map Columns</h3>
<ol>
<li>Go to the <strong>Mappings</strong> tab.</li>
<li>Click <strong>Auto Map</strong> to map source columns to target columns by name.</li>
<li>Ensure you <strong>check the Primary key column(s)</strong> that will determine whether a record is inserted or updated.</li>
<li>You can manually adjust the mappings if necessary.</li>
</ol>
 <div class="wp-caption aligncenter">
<a href="https://zappysys.com/blog/wp-content/uploads/2020/09/upsert-destination-key.png">
<img loading="lazy" decoding="async" class="size-full" alt="" src="https://zappysys.com/blog/wp-content/uploads/2020/09/upsert-destination-key.png" /></a>
<p class="wp-caption-text">SSIS Upsert Destination - Columns Mappings</p>
</div>
<h3>Step 5: Save Settings</h3>
<ul>
<li>Click <strong>OK</strong> to save the Upsert Destination configuration.</li>
</ul>
<h3>Step 6: Optional: Add Logging or Analysis</h3>
<ul>
<li>You may add extra destination components to log the number of inserted vs. updated records for monitoring or auditing purposes.</li>
</ul>
<h3>Step 7: Execute the Package</h3>
<ul>
<li>Run your SSIS package and verify that the data is correctly inserted and updated in the target table.</li>
</ul>
<div class="wp-caption aligncenter">
<a href="https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-upsert-destination-execute.png">
<img loading="lazy" decoding="async" class="size-full" alt="" src="https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-upsert-destination-execute.png" /></a>
<p class="wp-caption-text">SSIS Upsert Destination Execution</p>
</div></div>
<h3>Write data to ServiceDesk using OAuth 2.0</h3>
<p>If you like to load data from any source (i.e. SQL Server) to Zoho CRM then you can use <a href="https://www.zoho.com/crm/developer/docs/api/insert-records.html" target="_blank" rel="noopener">Records API (POST)</a>. Use a combination of the following Transforms  / Components. Later in this article we have some more examples (Older API) which may give you one more ways to load data into Zoho (Use of Template Transform).</p>
<p>Basically you have to build POST Body using JSON Generator Transform or Template Transform and then use that data in Web API Destination to call POST API request to push data to ServiceDesk. Basically screnshot below is just an example using some other Zoho API but you get the idea.</p>
<div class="su-table su-table-alternate">
<table>
<tbody>
<tr class="su-even">
<td width="36"><img loading="lazy" decoding="async" src="https://i0.wp.com/zappysys.com/images/ssis-powerpack/ssis-rest-api-web-service-task.png?w=32&amp;ssl=1" alt="Custom SSIS Tasks - Call REST API Webservice (GET, POST, DELETE etc)" width="32" height="32" /></td>
<td><u><a href="https://zappysys.com/products/ssis-powerpack/ssis-web-api-destination-connector/" target="_blank" rel="noopener">Web API Destination</a></u></td>
</tr>
<tr>
<td width="36" height="36"><img loading="lazy" decoding="async" class="alignnone" src="https://zappysys.com/images/SSIS-PowerPack/ssis-json-generator-transform.png" alt="JSON Generator Transform" width="32" height="32" /></td>
<td><a href="https://zappysys.com/products/ssis-powerpack/ssis-json-generator-transform/" target="_blank" rel="noopener">JSON Generator Transform</a></td>
</tr>
<tr class="su-even">
<td width="36"><img loading="lazy" decoding="async" class="alignnone" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/json-parser-transform/ssis-json-parser-transform.png" alt="XML Parser Transform" width="32" height="32" /></td>
<td><a href="https://zappysys.com/products/ssis-powerpack/ssis-json-parser-transform/" target="_blank" rel="noopener">JSON Parser Transform</a></td>
</tr>
</tbody>
</table>
</div>
<div id="attachment_8312" style="width: 678px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-json-generator-single-dataset-zoho-write.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8312" class="size-full wp-image-8312" src="https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-json-generator-single-dataset-zoho-write.png" alt="Create JSON for POST request (Single dataset pattern)" width="668" height="730" srcset="https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-json-generator-single-dataset-zoho-write.png 668w, https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-json-generator-single-dataset-zoho-write-275x300.png 275w" sizes="(max-width: 668px) 100vw, 668px" /></a><p id="caption-attachment-8312" class="wp-caption-text">Create JSON for POST request (Single dataset pattern)</p></div>
<p>&nbsp;</p>
<div id="attachment_8313" style="width: 757px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-zoho-write-data-bulk-insert-leads-accounts.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8313" class="size-full wp-image-8313" src="https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-zoho-write-data-bulk-insert-leads-accounts.png" alt="Insert data to Zoho Table using SSIS (Lead, Account Modules) - Bulk Load using POST API call" width="747" height="630" srcset="https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-zoho-write-data-bulk-insert-leads-accounts.png 747w, https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-zoho-write-data-bulk-insert-leads-accounts-300x253.png 300w" sizes="(max-width: 747px) 100vw, 747px" /></a><p id="caption-attachment-8313" class="wp-caption-text">Insert data to Zoho Table using SSIS (Lead, Account Modules) &#8211; Bulk Load using POST API call</p></div>
<h2>Write data to ServiceDesk using SSIS (Import SQL Server Table to ServiceDesk)</h2>
<p>Now you know how to read data from Zoho CRM using JSON API Source next step is to load data to Zoho CRM. For writing data we will use following three components</p>
<div class="su-table su-table-alternate">
<table>
<tbody>
<tr class="su-even">
<td width="36"><img loading="lazy" decoding="async" src="https://i0.wp.com/zappysys.com/images/ssis-powerpack/ssis-rest-api-web-service-task.png?w=32&amp;ssl=1" alt="Custom SSIS Tasks - Call REST API Webservice (GET, POST, DELETE etc)" width="32" height="32" /></td>
<td><u><a href="https://zappysys.com/products/ssis-powerpack/ssis-web-api-destination-connector/" target="_blank" rel="noopener">Web API Destination</a></u></td>
</tr>
<tr>
<td width="36" height="36"></td>
<td>Template Transform</td>
</tr>
<tr class="su-even">
<td width="36"><img loading="lazy" decoding="async" class="alignnone" src="//zappysys.com/onlinehelp/ssis-powerpack/scr/images/xml-parser-transform/ssis-xml-parser-transform.png" alt="XML Parser Transform" width="32" height="32" /></td>
<td><a href="https://zappysys.com/products/ssis-powerpack/ssis-xml-parser-transform/" target="_blank" rel="noopener">XML Parser Transform</a></td>
</tr>
</tbody>
</table>
</div>
<div class="mceTemp"></div>
<div class="content_block" id="custom_post_widget-1887"><h3>Truncation related error</h3>
<p style="text-align: justify;">The most common error you may face when you run an SSIS package is truncation error. During the design time only 300 rows are scanned from a source (a file or a REST API call response) to detect datatypes but at runtime, it is likely you will retrieve far more records. So it is possible that you will get longer strings than initially expected. For detailed instructions on how to fix common metadata related errors read an article "<a href="//zappysys.com/blog/handling-ssis-component-metadata-issues/" target="_blank" rel="noopener">How to handle SSIS errors (truncation, metadata issues)</a>".</p>

<h3>Authentication related error</h3>
Another frequent error you may get is an authentication error, which happens when you deploy/copy a package to another machine and run it there. Check <a href="#Deployment_to_Production">the paragraph below</a> to see why it happens and how to solve this problem.</div>
<div class="content_block" id="custom_post_widget-2021"><h2>Things have gone bad: Error handling &amp; debugging</h2>
<p style="text-align: justify;">Incidentally, bad things can happen<i>. </i>A remote server may go offline or your server may go out of memory. In any case, you may want to know when that happens and take actions accordingly. For that purpose, you have to redirect bad rows to some other destination. For this example, we will take and use <em>Web API Destination</em>, but basically, you can use any SSIS component:</p>

<h3>Handling errors</h3>
<ol style="margin-left: 0;">
 	<li>Add a <em>Derived Column</em> above <em>Web API Destination</em> with expression <strong>"(DT_WSTR,4000)ZS_JSON_OUT"</strong> and name it <strong>"JsonAsString"</strong>. This will let you see what JSON you are actually passing.</li>
 	<li>Then add a database or file destination or use another <em>Trash Destination</em> for debugging purposes and redirect the bad rows (<span style="color: #d66565;">red arrow</span>) from <em><em>Web API Destination </em></em>into it<em><em>. </em></em>Don't forget to set <span class="lang:default decode:true crayon-inline">Redirect row</span> option for both, <em>Error</em> and <em>Truncation</em> columns:<em><em>
</em></em>
<div class="wp-caption">

<a href="//zappysys.com/blog/wp-content/uploads/2017/06/ssis-sql-server-to-elasticsearch-error-handling-redirecting-bad-rows.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="alignnone wp-image-1487 size-full" src="https://zappysys.com/blog/wp-content/uploads/2017/06/ssis-sql-server-to-elasticsearch-error-handling-redirecting-bad-rows.png" alt="Redirect bad rows from &lt;em&gt;Web API Destination&lt;/em&gt; to &lt;em&gt;Trash Destination&lt;/em&gt; when load from SQL Server to Elasticsearch is failing. Add derived column JsonAsString to be able to read JSON you are using." width="739" height="267" srcset="https://zappysys.com/blog/wp-content/uploads/2017/06/ssis-sql-server-to-elasticsearch-error-handling-redirecting-bad-rows.png 739w, https://zappysys.com/blog/wp-content/uploads/2017/06/ssis-sql-server-to-elasticsearch-error-handling-redirecting-bad-rows-300x108.png 300w" sizes="(max-width: 739px) 100vw, 739px" /></a>
<p class="wp-caption-text">Redirected failed requests from <em>Web API Destination</em> to a desired destination when loading from SQL Server to REST API Service is failing. Derived Column <em>JsonAsString</em> added to be able to read JSON which was passed to Elasticsearch</p>

</div></li>
 	<li>Finally, add a <a href="https://technet.microsoft.com/en-us/library/ms140318%28v=sql.90%29.aspx?f=255&amp;MSPPError=-2147217396" target="_blank" rel="noopener"><em>Data Viewer</em></a> for the red path, if you want to debug the flow. You will be able to see URL, JSON and the error message for each record. You may want to copy-paste <em>ErrorMessage</em> to <em>Notepad </em>if you want it to be more readable:
<div class="wp-caption">

<a href="//zappysys.com/blog/wp-content/uploads/2017/06/ssis-sql-server-to-elasticsearch-error-handling.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="alignnone wp-image-1494 size-full" src="https://zappysys.com/blog/wp-content/uploads/2017/06/ssis-sql-server-to-elasticsearch-error-handling.png" alt="Use Data Viewer to view HTTP requests that failed to be fulfilled in Elasticsearch" width="752" height="280" srcset="https://zappysys.com/blog/wp-content/uploads/2017/06/ssis-sql-server-to-elasticsearch-error-handling.png 752w, https://zappysys.com/blog/wp-content/uploads/2017/06/ssis-sql-server-to-elasticsearch-error-handling-300x112.png 300w" sizes="(max-width: 752px) 100vw, 752px" /></a>
<p class="wp-caption-text">Use Data Viewer to view HTTP requests that failed to be fulfilled.</p>

</div></li>
</ol>
<div class="su-note" style="border-color: #e5dea5; border-radius: 3px; -moz-border-radius: 3px; -webkit-border-radius: 3px;">
<div class="su-note-inner su-clearfix" style="background-color: #fff7b7; border-color: #fffdf1; color: #333333; border-radius: 3px; -moz-border-radius: 3px; -webkit-border-radius: 3px;"><strong>NOTE</strong>: You can read more about redirecting rows in <a href="//zappysys.com/blog/ssis-error-handling-in-data-flow-redirect-bad-rows/" target="_blank" rel="noopener">SSIS Error Handling (Redirect bad rows)</a> article.</div>
</div>
<h3>Debugging HTTP requests</h3>
<p style="text-align: justify;">A common thing you have to do when working with HTTP requests is to debug those requests; e.g. to check what headers, body or URL was passed. <span id="Debug_Web_API_call_using_Fiddler"></span>To test how things look behind the scenes we strongly suggest to use <a href="https://zappysys.com/blog/how-to-use-fiddler-to-analyze-http-web-requests/" target="_blank" rel="noopener">Fiddler</a> - a popular web debugging tool.</p>
<p style="text-align: justify;">Inside it, you can double-click the URL entry (Right side) to see Request and Response Panels. The top panel is Request (URL, Headers, Body) and Bottom Panel is Response. For https:// (secure URL) make sure you enable HTTPS option in Fiddler (Tools &gt; Options &gt; HTTPS &gt; Check Decrypt https request):</p>

<div id="attachment_2344" class="wp-caption alignnone">

<a href="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2016/05/ssis-rest-api-call-debug-via-fiddler.png?ssl=1" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="alignnone wp-image-2344 size-full" style="border: 0px; max-width: 100%; height: auto; box-shadow: rgba(0, 0, 0, 0.176) 0px 1px 2px;" src="https://zappysys.com/blog/wp-content/uploads/2016/05/ssis-rest-api-call-debug-via-fiddler.png" alt="Debugging Web API call using Fiddler in SSIS" width="1287" height="564" data-attachment-id="2344" data-permalink="https://zappysys.com/blog/pass-authorization-header-redirected-location/ssis-rest-api-call-debug-via-fiddler/#main" data-orig-file="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2016/05/ssis-rest-api-call-debug-via-fiddler.png?fit=1287%2C564&amp;ssl=1" data-orig-size="1287,564" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="ssis-rest-api-call-debug-via-fiddler" data-image-description="&lt;p&gt;Debugging Web API call using Fiddler in SSIS&lt;/p&gt; " data-medium-file="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2016/05/ssis-rest-api-call-debug-via-fiddler.png?fit=300%2C131&amp;ssl=1" data-large-file="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2016/05/ssis-rest-api-call-debug-via-fiddler.png?fit=720%2C316&amp;ssl=1" srcset="https://zappysys.com/blog/wp-content/uploads/2016/05/ssis-rest-api-call-debug-via-fiddler.png 1287w, https://zappysys.com/blog/wp-content/uploads/2016/05/ssis-rest-api-call-debug-via-fiddler-300x131.png 300w, https://zappysys.com/blog/wp-content/uploads/2016/05/ssis-rest-api-call-debug-via-fiddler-768x337.png 768w, https://zappysys.com/blog/wp-content/uploads/2016/05/ssis-rest-api-call-debug-via-fiddler-1024x449.png 1024w" sizes="(max-width: 1287px) 100vw, 1287px" /></a>
<p class="wp-caption-text">Debugging Web API call using Fiddler in SSIS</p>

</div></div>
<p>&nbsp;</p>
<h2>Conclusion</h2>
<p>Manageengine  Servicedesk API provides a great way to automate data read/write operations. However, to call Service API  you have to use SDK / coding approach (e.g. C#, Java, Python, Ruby). Luckily ZappySys <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">SSIS PowerPack</a> provides a great way to integrate any Servicedesk API call via a  simple drag and drop approach without coding. Try  <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">SSIS PowerPack</a> for free and call virtually any REST API in a few clicks.</p>
<p>&nbsp;</p>
<p>The post <a href="https://zappysys.com/blog/read-write-manageengine-servicedesk-data-ssis-zoho-api/">Read/Write ManageEngine ServiceDesk Data in SSIS (Zoho API)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to register OAuth App for Zoho / ManageEngine API</title>
		<link>https://zappysys.com/blog/register-oauth-app-zoho-api/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Thu, 28 Apr 2022 17:31:59 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[manageengine]]></category>
		<category><![CDATA[oauth]]></category>
		<category><![CDATA[zoho]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=9612</guid>

					<description><![CDATA[<p>Introduction In this article, we will show you steps to register OAuth App for Zoho API and use it ZappySys Product. The steps listed here can be used for Zoho Products like CRM or ManagedEngine Products like ServiceDesk (ManageEngine is Zoho&#8217;s subsidary). For detailed steps check Zoho&#8217;s link here. Register OAuth App in Zoho Go to [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/register-oauth-app-zoho-api/">How to register OAuth App for Zoho / ManageEngine API</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p>In this article, we will show you steps to register OAuth App for Zoho API and use it ZappySys Product. The steps listed here can be used for Zoho Products like CRM or ManagedEngine Products like ServiceDesk (ManageEngine is Zoho&#8217;s subsidary). For detailed steps check Zoho&#8217;s <a href="https://www.zoho.com/crm/developer/docs/api/v2/register-client.html">link here</a>.</p>
<h2>Register OAuth App in Zoho</h2>
<ol>
<li>Go to <a href="https://api-console.zoho.com/" target="_blank" rel="noopener">Zoho API Console</a></li>
<li>Click on Add Client  link<br />
<a href="https://zappysys.com/blog/wp-content/uploads/2022/04/add-zoho-oauth-app-client.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-9613" src="https://zappysys.com/blog/wp-content/uploads/2022/04/add-zoho-oauth-app-client.png" alt="" width="347" height="187" srcset="https://zappysys.com/blog/wp-content/uploads/2022/04/add-zoho-oauth-app-client.png 347w, https://zappysys.com/blog/wp-content/uploads/2022/04/add-zoho-oauth-app-client-300x162.png 300w" sizes="(max-width: 347px) 100vw, 347px" /></a></li>
<li>Click on Server-Based App option<br />
<a href="https://zappysys.com/blog/wp-content/uploads/2022/04/create-zoho-server-based-app.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-9616" src="https://zappysys.com/blog/wp-content/uploads/2022/04/create-zoho-server-based-app.png" alt="" width="1105" height="532" srcset="https://zappysys.com/blog/wp-content/uploads/2022/04/create-zoho-server-based-app.png 1105w, https://zappysys.com/blog/wp-content/uploads/2022/04/create-zoho-server-based-app-300x144.png 300w, https://zappysys.com/blog/wp-content/uploads/2022/04/create-zoho-server-based-app-768x370.png 768w, https://zappysys.com/blog/wp-content/uploads/2022/04/create-zoho-server-based-app-1024x493.png 1024w" sizes="(max-width: 1105px) 100vw, 1105px" /></a></li>
<li>When prompted enter following
<ol>
<li>Your <strong>APP NAME</strong></li>
<li>Your company <strong>Homepage URL</strong> (any)</li>
<li>Redirect URL (We suggest you use <strong>https://zappysys.com/oauth</strong> )</li>
<li>Click <strong><strong>CREATE</strong></strong><a href="https://zappysys.com/blog/wp-content/uploads/2022/04/zoho-oauth-app-redirect-callback-url.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-9614" src="https://zappysys.com/blog/wp-content/uploads/2022/04/zoho-oauth-app-redirect-callback-url.png" alt="" width="694" height="550" srcset="https://zappysys.com/blog/wp-content/uploads/2022/04/zoho-oauth-app-redirect-callback-url.png 694w, https://zappysys.com/blog/wp-content/uploads/2022/04/zoho-oauth-app-redirect-callback-url-300x238.png 300w" sizes="(max-width: 694px) 100vw, 694px" /></a></li>
</ol>
</li>
<li>After you create app you will see <strong>ClientID</strong> and <strong>ClientSecret</strong> (Copy them somewhere safe location). You will need this to enter on OAuth UI<br />
<a href="https://zappysys.com/blog/wp-content/uploads/2022/04/zoho-oauth-app-get-clientid-clientsecret-copy.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-9615" src="https://zappysys.com/blog/wp-content/uploads/2022/04/zoho-oauth-app-get-clientid-clientsecret-copy.png" alt="" width="668" height="430" srcset="https://zappysys.com/blog/wp-content/uploads/2022/04/zoho-oauth-app-get-clientid-clientsecret-copy.png 668w, https://zappysys.com/blog/wp-content/uploads/2022/04/zoho-oauth-app-get-clientid-clientsecret-copy-300x193.png 300w" sizes="(max-width: 668px) 100vw, 668px" /></a></li>
</ol>
<h2>Using Zoho OAuth in ZappySys Connection</h2>
<p>Now last step is using 3 pieces on ZappySys OAuth Connection UI (same UI in ODBC PowerPack or SSIS PowerPack Products)</p>
<ol>
<li>Depending which Product you are using find out OAuth Connection UI Edit / New Connection option and enter below</li>
<li>On General Page enter
<ol>
<li><strong>ClientID</strong>,</li>
<li><strong>ClientSecret </strong></li>
<li><strong>Scopes</strong> (Check API help page to find these.. each API requires different scope)</li>
<li><strong>Authorization URL</strong> and <strong>Token URL</strong> as below (if its US Region) . For Other regions refer <a href="https://www.zoho.com/crm/developer/docs/api/v2/multi-dc.html" target="_blank" rel="noopener">this article</a> to get URL<pre class="crayon-plain-tag">https://accounts.zoho.com/oauth/v2/auth</pre>
<pre class="crayon-plain-tag">https://accounts.zoho.com/oauth/v2/token</pre><a href="https://zappysys.com/blog/wp-content/uploads/2022/04/zoho-api-configure-oauth-token-url-scopes.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-9617" src="https://zappysys.com/blog/wp-content/uploads/2022/04/zoho-api-configure-oauth-token-url-scopes.png" alt="" width="577" height="328" srcset="https://zappysys.com/blog/wp-content/uploads/2022/04/zoho-api-configure-oauth-token-url-scopes.png 577w, https://zappysys.com/blog/wp-content/uploads/2022/04/zoho-api-configure-oauth-token-url-scopes-300x171.png 300w" sizes="(max-width: 577px) 100vw, 577px" /></a></li>
</ol>
</li>
<li>Now go to Advanced Page and enter below
<ol>
<li><strong>Callback URL</strong> (exact same URL you configured in previous section)<br />
We suggest to use : <pre class="crayon-plain-tag">https://zappysys.com/oauth</pre></li>
<li><strong>Extra Auth Attributes</strong> like below<br />
<pre class="crayon-plain-tag">access_type=offline&amp;prompt=consent</pre>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2022/04/zoho-api-oauth-redirect-callback-url.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-9618" src="https://zappysys.com/blog/wp-content/uploads/2022/04/zoho-api-oauth-redirect-callback-url.png" alt="" width="551" height="320" srcset="https://zappysys.com/blog/wp-content/uploads/2022/04/zoho-api-oauth-redirect-callback-url.png 551w, https://zappysys.com/blog/wp-content/uploads/2022/04/zoho-api-oauth-redirect-callback-url-300x174.png 300w" sizes="(max-width: 551px) 100vw, 551px" /></a></li>
</ol>
</li>
<li>Now go to General Tab again and click <strong>&gt;&gt;Generate Token&lt;&lt;</strong></li>
<li><strong>Close Popup</strong> Browser and <strong>use Full Browser</strong> when Prompted</li>
<li>Follow the steps &#8230; If successful you will see Access Token and Refresh Token extracted on the OAuth Connection UI</li>
</ol>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>The post <a href="https://zappysys.com/blog/register-oauth-app-zoho-api/">How to register OAuth App for Zoho / ManageEngine API</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to register Salesforce App and obtain Client ID / Secret (for API Call / OAuth)</title>
		<link>https://zappysys.com/blog/register-salesforce-app-obtain-client-id-secret-oauth-api-call/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Mon, 27 Dec 2021 20:40:45 +0000</pubDate>
				<category><![CDATA[Salesforce Driver]]></category>
		<category><![CDATA[SSIS Salesforce Connection]]></category>
		<category><![CDATA[SSIS Salesforce Destination]]></category>
		<category><![CDATA[SSIS Salesforce Source]]></category>
		<category><![CDATA[oauth]]></category>
		<category><![CDATA[odbc]]></category>
		<category><![CDATA[salesforce]]></category>
		<category><![CDATA[ssis]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=9482</guid>

					<description><![CDATA[<p>Introduction Using Salesforce Connection with OAuth App in SSIS / ODBC Once you have Client ID / Secret, you can use it in the Salesforce Connection in SSIS Connector / ODBC Driver for Salesforce like below (Only the new version will have OAuth option) Troubleshooting Known Issues Let&#8217;s look at some common issues with Salesforce [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/register-salesforce-app-obtain-client-id-secret-oauth-api-call/">How to register Salesforce App and obtain Client ID / Secret (for API Call / OAuth)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<div class="content_block" id="custom_post_widget-9476">In this section, we will discuss how to register OAuth App to call Salesforce API using Client ID / Secret rather than using your User Id / Password.

Once you follow these steps below to register your Salesforce App (OAuth App), at the end you will get a Client ID (sometimes referred to as App Id) and Client Secret (or App Secret). These two pieces can be used later on to call Salesforce API using OAuth.

So let's get started.
<h3>Register Salesforce App (OAuth)</h3>
<ol>
 	<li>Login into your account and go to <strong><em>Setup</em> </strong>as shown below (click on gear icon at the top right corner):
<img loading="lazy" decoding="async" src="https://zappysys.zendesk.com/attachments/token/7D9Rx9qHJswkt28sC5vTggrNT/?name=inline-1178316509.png" alt="Accessing Salesforce Setup to create an OAuth App" width="342" height="233" data-original-height="233" data-original-width="342" /></li>
 	<li>Then in the search bar input "app" and open <strong><em>App Manager</em></strong>:
<img loading="lazy" decoding="async" src="https://zappysys.zendesk.com/attachments/token/DTjFQpyDw4NViKdJyhyFkO1ng/?name=inline1698967483.png" alt="Searching Salesforce App Manager to create an OAuth App" width="689" height="364" data-original-height="364" data-original-width="689" /></li>
 	<li>Then click <strong><em>New Connected App</em></strong> to create a new OAuth App:
<strong>NOTE:</strong> In some version, it may say <strong><strong>New External Client App
</strong></strong>
<p data-start="1271" data-end="1309">Look for one of the following buttons:</p>

<ul data-start="1310" data-end="1395">
 	<li data-start="1310" data-end="1348">
<p data-start="1312" data-end="1348"><strong data-start="1312" data-end="1333">New Connected App</strong> (Classic name)</p>
</li>
 	<li data-start="1349" data-end="1395">
<p data-start="1351" data-end="1395"><strong data-start="1351" data-end="1378">New External Client App</strong> (Lightning name)</p>
</li>
</ul>
<img loading="lazy" decoding="async" src="https://zappysys.zendesk.com/attachments/token/eD6OrA9TqfRuM5N41Vqd7nrvb/?name=inline684283902.png" alt="Creating a Salesforce App to get data via ODBC driver" width="867" height="327" data-original-height="327" data-original-width="867" /></li>
 	<li>Give your App a name and:
- Enable OAuth Settings
- Set callback URL to following two URLs (one in each line)
<strong><em>https://login.salesforce.com/services/oauth2/success
</em></strong><em><strong>https://zappysys.com/oauth</strong></em>
- Add an OAuth scope you want or simply add "<strong><em>Full access</em></strong>".
- Add "<strong><em>Perform requests on your behalf at any time (offline_token)</em></strong>" scope to get a refresh token so that you don't have to re-authenticate each time requesting an access token:<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/create-salesforce-connected-oauth-app-for-odbc-datasource.png"><img loading="lazy" decoding="async" class="wp-image-4267 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/06/create-salesforce-connected-oauth-app-for-odbc-datasource.png" alt="Configuring Salesforce App OAuth settings to get data via ODBC driver" width="1041" height="700" srcset="https://zappysys.com/blog/wp-content/uploads/2018/06/create-salesforce-connected-oauth-app-for-odbc-datasource.png 1041w, https://zappysys.com/blog/wp-content/uploads/2018/06/create-salesforce-connected-oauth-app-for-odbc-datasource-300x202.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/06/create-salesforce-connected-oauth-app-for-odbc-datasource-768x516.png 768w, https://zappysys.com/blog/wp-content/uploads/2018/06/create-salesforce-connected-oauth-app-for-odbc-datasource-1024x689.png 1024w, https://zappysys.com/blog/wp-content/uploads/2018/06/create-salesforce-connected-oauth-app-for-odbc-datasource-272x182.png 272w" sizes="(max-width: 1041px) 100vw, 1041px" /></a>

<span style="text-decoration: underline; color: #800000;"><strong>IMPORTANT:</strong></span> You can use "<strong>Access and manage your data (api)</strong>" if you do not like to grant full permission to this app but make sure you request same permission from the caller app too  (Example on ZappySys Salesforce Connection UI -&gt; Advanced Tab -&gt; Set scope as "<strong>api offline_access</strong>" rather than "<strong>full offline_access</strong>"</li>
 	<li>Click "Save".</li>
</ol>
<h3>Get Client Id and Client Secret for Salesforce Connected App</h3>
Once the App is created, we need to find out the App Id / Secret so we can use it for API calls.
<ol>
 	<li>Go to App Manager</li>
 	<li>Find out the recently created App and click View (click on the small arrow to the right)
<a href="https://zappysys.com/blog/wp-content/uploads/2021/12/salesforce-view-edit-oauth-app-settings.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-9477" src="https://zappysys.com/blog/wp-content/uploads/2021/12/salesforce-view-edit-oauth-app-settings.png" alt="" width="1029" height="413" srcset="https://zappysys.com/blog/wp-content/uploads/2021/12/salesforce-view-edit-oauth-app-settings.png 1029w, https://zappysys.com/blog/wp-content/uploads/2021/12/salesforce-view-edit-oauth-app-settings-300x120.png 300w, https://zappysys.com/blog/wp-content/uploads/2021/12/salesforce-view-edit-oauth-app-settings-768x308.png 768w, https://zappysys.com/blog/wp-content/uploads/2021/12/salesforce-view-edit-oauth-app-settings-1024x411.png 1024w" sizes="(max-width: 1029px) 100vw, 1029px" /></a></li>
 	<li>Once App page is loaded you can Copy <strong>Consumer Key</strong> and <strong>Consumer Secret</strong> (click on reveal to see). Also copy anyone Call back URL (We will need this for OAuth Connection &gt; Advanced Tab &gt; Call Back URL or Redirect URL property depending on which ZappySys Product / Driver you are using)
<a href="https://zappysys.com/blog/wp-content/uploads/2021/12/salesforce-oauth-app-clientid-secret-callbackurl.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-9478" src="https://zappysys.com/blog/wp-content/uploads/2021/12/salesforce-oauth-app-clientid-secret-callbackurl.png" alt="" width="974" height="554" srcset="https://zappysys.com/blog/wp-content/uploads/2021/12/salesforce-oauth-app-clientid-secret-callbackurl.png 974w, https://zappysys.com/blog/wp-content/uploads/2021/12/salesforce-oauth-app-clientid-secret-callbackurl-300x171.png 300w, https://zappysys.com/blog/wp-content/uploads/2021/12/salesforce-oauth-app-clientid-secret-callbackurl-768x437.png 768w" sizes="(max-width: 974px) 100vw, 974px" /></a></li>
 	<li>That's it, you can now use these 3 pieces to ZappySys <strong>OAuth connection UI</strong> or on <strong>Salesforce Connection UI</strong> (new version with OAuth support). The above screenshot shows where to enter these 3 pieces in the New Salesforce Connection. For the OAuth Connection, the redirect URL goes to the Advanced Tab &gt; Callback URL textbox.</li>
</ol>
<h3>Get Client Id and Secret for Salesforce External Client App</h3>
If you created a new App by clicking on the <strong>New External Client App</strong> button, then your App may not be visible in the App Manager Screen. In that case, find it below way.

[caption id="attachment_11637" align="alignnone" width="1222"]<a href="https://zappysys.com/blog/wp-content/uploads/2021/12/obtain-salesforce-oauth-clientid-secret.jpg"><img loading="lazy" decoding="async" class="size-full wp-image-11637" src="https://zappysys.com/blog/wp-content/uploads/2021/12/obtain-salesforce-oauth-clientid-secret.jpg" alt="" width="1222" height="733" srcset="https://zappysys.com/blog/wp-content/uploads/2021/12/obtain-salesforce-oauth-clientid-secret.jpg 1222w, https://zappysys.com/blog/wp-content/uploads/2021/12/obtain-salesforce-oauth-clientid-secret-300x180.jpg 300w, https://zappysys.com/blog/wp-content/uploads/2021/12/obtain-salesforce-oauth-clientid-secret-1024x614.jpg 1024w, https://zappysys.com/blog/wp-content/uploads/2021/12/obtain-salesforce-oauth-clientid-secret-768x461.jpg 768w" sizes="(max-width: 1222px) 100vw, 1222px" /></a> Get Client Id, Client Secret - For New External Client App[/caption]
<h3>Enable Client Credentials Grant (Non-Interactive Run-As)</h3>
If you like to enable Non-Interactive mode, just like UserId / Password Authentication, but without actually passing a real UserId or Password on the Connection UI, then you can enable Client Credentials Flow as below.

<strong>NOTE:</strong> Only the New version of ZappySys Salesforce Connection supports Client Credentials Grant. <span style="text-decoration: underline;"><strong>Version released after Nov 1, 2025 supports this grant type</strong></span>.

[caption id="attachment_11639" align="alignnone" width="419"]<a href="https://zappysys.com/blog/wp-content/uploads/2021/12/salesforce-client-credentials-grant-runas.jpg"><img loading="lazy" decoding="async" class="size-full wp-image-11639" src="https://zappysys.com/blog/wp-content/uploads/2021/12/salesforce-client-credentials-grant-runas.jpg" alt="" width="419" height="480" srcset="https://zappysys.com/blog/wp-content/uploads/2021/12/salesforce-client-credentials-grant-runas.jpg 419w, https://zappysys.com/blog/wp-content/uploads/2021/12/salesforce-client-credentials-grant-runas-262x300.jpg 262w" sizes="(max-width: 419px) 100vw, 419px" /></a> Enable Salesforce Client Credentials Grant (Run As)[/caption]
<h3>(OPTIONAL) Configure Salesforce OAuth refresh token validity</h3>
By default, Salesforce Refresh Token doesn't expire once you generate. If you want to change the default behavior, follow these steps.
<ol>
 	<li>Go to "<strong>Manage Connected Apps</strong>" menu item and press on your App name:<img loading="lazy" decoding="async" class="wp-image-4298 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/06/salesforce-oauth-app-policy-management-2.png" alt="Finding Salesforce App to configure its policies" width="660" height="410" srcset="https://zappysys.com/blog/wp-content/uploads/2018/06/salesforce-oauth-app-policy-management-2.png 660w, https://zappysys.com/blog/wp-content/uploads/2018/06/salesforce-oauth-app-policy-management-2-300x186.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/06/salesforce-oauth-app-policy-management-2-436x272.png 436w" sizes="(max-width: 660px) 100vw, 660px" /></li>
 	<li>Click "Edit Policies" to configure refresh token validity:
<img loading="lazy" decoding="async" class="wp-image-4271 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/06/edit-salesforce-connected-app-policies.png" alt="Editing Salesforce App OAuth refresh token issuing policy" width="680" height="391" srcset="https://zappysys.com/blog/wp-content/uploads/2018/06/edit-salesforce-connected-app-policies.png 680w, https://zappysys.com/blog/wp-content/uploads/2018/06/edit-salesforce-connected-app-policies-300x173.png 300w" sizes="(max-width: 680px) 100vw, 680px" /></li>
 	<li>Set "<strong>All users may self-authorize</strong>" and "<strong>Refresh token is valid until revoked</strong>" options:<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/salesforce-rest-api-app-odbc-oauth-refresh-token-validity-1.png"><img loading="lazy" decoding="async" class="wp-image-4273 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/06/salesforce-rest-api-app-odbc-oauth-refresh-token-validity-1.png" alt="Making Salesforce App OAuth refresh token to never expire" width="870" height="498" srcset="https://zappysys.com/blog/wp-content/uploads/2018/06/salesforce-rest-api-app-odbc-oauth-refresh-token-validity-1.png 870w, https://zappysys.com/blog/wp-content/uploads/2018/06/salesforce-rest-api-app-odbc-oauth-refresh-token-validity-1-300x172.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/06/salesforce-rest-api-app-odbc-oauth-refresh-token-validity-1-768x440.png 768w" sizes="(max-width: 870px) 100vw, 870px" /></a></li>
 	<li>Click "Save".</li>
</ol>
<h3></h3></div>
<h2>Using Salesforce Connection with OAuth App in SSIS / ODBC</h2>
<p>Once you have Client ID / Secret, you can use it in the Salesforce Connection in SSIS Connector / ODBC Driver for Salesforce like below (Only the new version will have OAuth option)</p>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2021/12/salesforce-connection-using-oauth-app-clientid-secret.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-9513" src="https://zappysys.com/blog/wp-content/uploads/2021/12/salesforce-connection-using-oauth-app-clientid-secret.png" alt="" width="604" height="383" srcset="https://zappysys.com/blog/wp-content/uploads/2021/12/salesforce-connection-using-oauth-app-clientid-secret.png 604w, https://zappysys.com/blog/wp-content/uploads/2021/12/salesforce-connection-using-oauth-app-clientid-secret-300x190.png 300w" sizes="(max-width: 604px) 100vw, 604px" /></a></p>
<h2>Troubleshooting Known Issues</h2>
<p>Let&#8217;s look at some common issues with Salesforce Connection and how to fix them.</p>
<h3>OAuth Error: Missing Required Code Challenge</h3>
<p>When you click Generate Token button, you may get an error like the one below.</p>
<div id="attachment_11066" style="width: 767px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2021/12/salesforce-oauth-pkce-verfier-error-missing-required-code-challenge.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11066" class="size-full wp-image-11066" src="https://zappysys.com/blog/wp-content/uploads/2021/12/salesforce-oauth-pkce-verfier-error-missing-required-code-challenge.png" alt="Salesforce OAuth Generate Token Error - Missing Required Code Challenge" width="757" height="571" srcset="https://zappysys.com/blog/wp-content/uploads/2021/12/salesforce-oauth-pkce-verfier-error-missing-required-code-challenge.png 757w, https://zappysys.com/blog/wp-content/uploads/2021/12/salesforce-oauth-pkce-verfier-error-missing-required-code-challenge-300x226.png 300w" sizes="(max-width: 757px) 100vw, 757px" /></a><p id="caption-attachment-11066" class="wp-caption-text">Salesforce OAuth Generate Token Error &#8211; Missing Required Code Challenge</p></div>
<p><strong>Solution</strong></p>
<p>Here is how to fix it.</p>
<p>For Salesforce Connection UI: Go to Advanced Tab =&gt; Check Enable PKCE Code Verifier option<br />
&#8211;OR&#8211;<br />
For OAuth Connection UI: Go to OAuth2 Grant Options Tab =&gt; Check Enable Code Verifier Option</p>
<div id="attachment_11067" style="width: 1384px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2021/12/oauth-connection-enable-pkce-code-verifier-option.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11067" class="size-full wp-image-11067" src="https://zappysys.com/blog/wp-content/uploads/2021/12/oauth-connection-enable-pkce-code-verifier-option.png" alt="Enable PKCE code verifier option - OAuth Connection for Salesforce" width="1374" height="637" srcset="https://zappysys.com/blog/wp-content/uploads/2021/12/oauth-connection-enable-pkce-code-verifier-option.png 1374w, https://zappysys.com/blog/wp-content/uploads/2021/12/oauth-connection-enable-pkce-code-verifier-option-300x139.png 300w, https://zappysys.com/blog/wp-content/uploads/2021/12/oauth-connection-enable-pkce-code-verifier-option-1024x475.png 1024w, https://zappysys.com/blog/wp-content/uploads/2021/12/oauth-connection-enable-pkce-code-verifier-option-768x356.png 768w" sizes="(max-width: 1374px) 100vw, 1374px" /></a><p id="caption-attachment-11067" class="wp-caption-text">Enable PKCE code verifier option &#8211; OAuth Connection for Salesforce.</p></div>
<p>The post <a href="https://zappysys.com/blog/register-salesforce-app-obtain-client-id-secret-oauth-api-call/">How to register Salesforce App and obtain Client ID / Secret (for API Call / OAuth)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to register App for Dynamics CRM 365 / CDS / Dataverse API (Azure AD / OAuth)</title>
		<link>https://zappysys.com/blog/register-app-dynamics-crm-365-cds-dataverse-api-azure-ad-oauth/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Mon, 29 Nov 2021 21:20:53 +0000</pubDate>
				<category><![CDATA[SSIS Dynamics CRM Connection]]></category>
		<category><![CDATA[SSIS Dynamics CRM Destination]]></category>
		<category><![CDATA[SSIS Dynamics CRM Source]]></category>
		<category><![CDATA[d365]]></category>
		<category><![CDATA[dynamics crm]]></category>
		<category><![CDATA[Microsoft Dynamics 365]]></category>
		<category><![CDATA[oauth]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=9444</guid>

					<description><![CDATA[<p>Introduction In this article, we will show you step by step approach on how to register an Azure AD (Active Directory) app to access Dynamics CRM 365 API (also same for CDS / Dataverse API). You might have heard that Microsoft is deprecating an older way of authenticating (i.e. User ID / Password-based WS-Trust Authentication) [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/register-app-dynamics-crm-365-cds-dataverse-api-azure-ad-oauth/">How to register App for Dynamics CRM 365 / CDS / Dataverse API (Azure AD / OAuth)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p>In this article, we will show you step by step approach on how to register an Azure AD (Active Directory) app to access Dynamics CRM 365 API (also same for CDS / Dataverse API). You might have heard that <a href="https://zappysys.zendesk.com/hc/en-us/articles/5258505448347">Microsoft is deprecating</a> an older way of authenticating (i.e. User ID / Password-based <strong>WS-Trust</strong> Authentication) on <strong>April 2022</strong>. You must update your jobs / code to use OAuth 2.0 by April 2022 for any CRM related API calls.</p>
<p>In other words rather than User Id / password now you can use more secure way by using <strong>OAuth</strong> rather than WS-Trust.</p>
<p>Going forward Microsoft wants you to use OAuth Token rather than user name/password to call Dynamics CRM 365 API programmatically.</p>
<p><a href="https://docs.microsoft.com/en-us/power-platform/important-changes-coming#deprecation-of-office365-authentication-type-and-organizationserviceproxy-class-for-connecting-to-dataverse" target="_blank" rel="noopener">Here is the official link which describes the dates for WS-Trust sunset</a></p>
<h2>Register App for CRM / CDS / Dataverse in Azure / Active Directory</h2>
<p>The first step is to register your app in Azure Portal under Active Directory using the below steps.</p>
<ol>
<li>Ask your Active Directory Admin to login to Azure Portal and navigate to &gt; <a href="https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/Overview" target="_blank" rel="noopener"><strong>Active Directory</strong></a> Blade.<br />
OR<br />
You can access it by searching &#8220;<strong>Azure Active directory</strong>&#8221; like below.</p>
<div id="attachment_9445" style="width: 403px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2021/11/open-azure-active-directory.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9445" class="size-full wp-image-9445" src="https://zappysys.com/blog/wp-content/uploads/2021/11/open-azure-active-directory.png" alt="Open Azure Active Directory" width="393" height="224" srcset="https://zappysys.com/blog/wp-content/uploads/2021/11/open-azure-active-directory.png 393w, https://zappysys.com/blog/wp-content/uploads/2021/11/open-azure-active-directory-300x171.png 300w" sizes="(max-width: 393px) 100vw, 393px" /></a><p id="caption-attachment-9445" class="wp-caption-text">Open Azure Active Directory</p></div></li>
<li>Now click on the <a href="https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/RegisteredApps" target="_blank" rel="noopener"><strong>App Registrations</strong></a> icon and click <strong><strong>New App Registration<br />
</strong></strong></p>
<div id="attachment_9446" style="width: 535px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2021/11/open-azure-active-directory-new-app-registration.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9446" class="size-full wp-image-9446" src="https://zappysys.com/blog/wp-content/uploads/2021/11/open-azure-active-directory-new-app-registration.png" alt="New App Registrations under Azure Active Directory" width="525" height="275" srcset="https://zappysys.com/blog/wp-content/uploads/2021/11/open-azure-active-directory-new-app-registration.png 525w, https://zappysys.com/blog/wp-content/uploads/2021/11/open-azure-active-directory-new-app-registration-300x157.png 300w" sizes="(max-width: 525px) 100vw, 525px" /></a><p id="caption-attachment-9446" class="wp-caption-text">New App Registrations under Azure Active Directory</p></div></li>
<li>Now next step is to give your <strong>App name</strong> to identify easily. Select App is used for your Org only option (Default) and last enter <strong>Redirect URL</strong> as below (This URL is used for 3-legged Authorization Code Grant only). We prefer you enter a URL which is OAuth friendly (If you don&#8217;t know one Use <pre class="crayon-plain-tag">https://zappysys.com/oauth</pre>  this is <strong>recommended</strong> URL if you working with ZappySys Products)
<div id="attachment_9447" style="width: 563px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2021/11/register-azure-active-directory-app-with-redirect-url.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9447" class="size-full wp-image-9447" src="https://zappysys.com/blog/wp-content/uploads/2021/11/register-azure-active-directory-app-with-redirect-url.png" alt="Azure AD App Registration - Single / Multi Tenant with Redirect URl (i.e. Call back)" width="553" height="708" srcset="https://zappysys.com/blog/wp-content/uploads/2021/11/register-azure-active-directory-app-with-redirect-url.png 553w, https://zappysys.com/blog/wp-content/uploads/2021/11/register-azure-active-directory-app-with-redirect-url-234x300.png 234w" sizes="(max-width: 553px) 100vw, 553px" /></a><p id="caption-attachment-9447" class="wp-caption-text">Azure AD App Registration &#8211; Single / Multi-Tenant with Redirect URL (i.e. Call back)</p></div>
<p>&nbsp;</li>
<li>Now once App is created you can find the Application (Client) Id from overview page
<div id="attachment_10130" style="width: 633px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2021/11/azure-ad-app-find-application-client-id-1.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10130" class="wp-image-10130 size-full" src="https://zappysys.com/blog/wp-content/uploads/2021/11/azure-ad-app-find-application-client-id-1.png" alt="azure-ad-app-find-application-client-id" width="623" height="360" srcset="https://zappysys.com/blog/wp-content/uploads/2021/11/azure-ad-app-find-application-client-id-1.png 623w, https://zappysys.com/blog/wp-content/uploads/2021/11/azure-ad-app-find-application-client-id-1-300x173.png 300w" sizes="(max-width: 623px) 100vw, 623px" /></a><p id="caption-attachment-10130" class="wp-caption-text">Azure AD App &#8211; Find Application / Client Id on overview page</p></div></li>
</ol>
<h2>Add API Permissions for the App</h2>
<p>Once App is created we need to Add Permission. Basically, we will set which style of APIs can be called by this App and what Actions can be performed.<br />
<div class="su-note"  style="border-color:#e5de9d;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><div class="su-note-inner su-u-clearfix su-u-trim" style="background-color:#FFF8B7;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;">For Apps specific to CRM / CDS / Dataverse API, actual app permissions are controlled by User Roles. Check later in this article how to associate one or more Roles to this AD App so it can perform certation actions via API call</div></div>
<ol>
<li>To add API Permissions for this AD App click on <strong>API Permissions</strong> and then click on <strong>Add Permission</strong>
<div id="attachment_9449" style="width: 439px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2021/11/azure-ad-app-add-api-permission.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9449" class="size-full wp-image-9449" src="https://zappysys.com/blog/wp-content/uploads/2021/11/azure-ad-app-add-api-permission.png" alt="Add API Permissions for Azure AD App" width="429" height="517" srcset="https://zappysys.com/blog/wp-content/uploads/2021/11/azure-ad-app-add-api-permission.png 429w, https://zappysys.com/blog/wp-content/uploads/2021/11/azure-ad-app-add-api-permission-249x300.png 249w" sizes="(max-width: 429px) 100vw, 429px" /></a><p id="caption-attachment-9449" class="wp-caption-text">Add API Permissions for Azure AD App</p></div></li>
<li>Find the Dynamics CRM icon and click on it
<div id="attachment_9450" style="width: 669px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2021/11/add-azure-ad-app-api-permission-dynamics-crm.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9450" class="size-full wp-image-9450" src="https://zappysys.com/blog/wp-content/uploads/2021/11/add-azure-ad-app-api-permission-dynamics-crm.png" alt="Add API Permission for Dynamics CRM API access (Azure AD App)" width="659" height="709" srcset="https://zappysys.com/blog/wp-content/uploads/2021/11/add-azure-ad-app-api-permission-dynamics-crm.png 659w, https://zappysys.com/blog/wp-content/uploads/2021/11/add-azure-ad-app-api-permission-dynamics-crm-279x300.png 279w" sizes="(max-width: 659px) 100vw, 659px" /></a><p id="caption-attachment-9450" class="wp-caption-text">Add API Permission for Dynamics CRM API access (Azure AD App)</p></div></li>
<li>Now you will see just one permission for Dynamics CRM (user_impersonation). As we said earlier for Dynamics CRM API security is controlled by User Roles in CRM Portal itself which will see in the next section. For now, just choose <strong>Delegated Permissions</strong>,  check <strong>user_impersonation</strong> and click <strong>Add Permissions</strong>
<div id="attachment_9451" style="width: 661px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2021/11/add-azure-ad-app-api-permission-dynamics-crm-step2.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9451" class="size-full wp-image-9451" src="https://zappysys.com/blog/wp-content/uploads/2021/11/add-azure-ad-app-api-permission-dynamics-crm-step2.png" alt="Select API Permissions for Dynamics CRM App (Azure AD App)" width="651" height="608" srcset="https://zappysys.com/blog/wp-content/uploads/2021/11/add-azure-ad-app-api-permission-dynamics-crm-step2.png 651w, https://zappysys.com/blog/wp-content/uploads/2021/11/add-azure-ad-app-api-permission-dynamics-crm-step2-300x280.png 300w" sizes="(max-width: 651px) 100vw, 651px" /></a><p id="caption-attachment-9451" class="wp-caption-text">Select API Permissions for Dynamics CRM App (Azure AD App)</p></div></li>
<li>Now the last step in Adding API permissions is Grant Admin Consent. If you are logged in as an Azure AD User with the correct admin role then no worries else you have to ask your Azure AD admin to consent for you so this App can be used to read/write data from CRM.</li>
</ol>
<h2>Create Client Secret</h2>
<p>Once App is created next step is to generate a Client Secret. Perform the following steps to create a secret that you can use when you call API</p>
<ol>
<li>Click on Certificates and Secrets and then New Secret
<div id="attachment_9453" style="width: 1008px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2021/11/azure-ad-app-create-client-secret.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9453" class="size-full wp-image-9453" src="https://zappysys.com/blog/wp-content/uploads/2021/11/azure-ad-app-create-client-secret.png" alt="Azure AD App Create Client Secret / Set Name, Expiration Date" width="998" height="540" srcset="https://zappysys.com/blog/wp-content/uploads/2021/11/azure-ad-app-create-client-secret.png 998w, https://zappysys.com/blog/wp-content/uploads/2021/11/azure-ad-app-create-client-secret-300x162.png 300w, https://zappysys.com/blog/wp-content/uploads/2021/11/azure-ad-app-create-client-secret-768x416.png 768w" sizes="(max-width: 998px) 100vw, 998px" /></a><p id="caption-attachment-9453" class="wp-caption-text">Azure AD App Create Client Secret / Set Name, Expiration Date</p></div></li>
<li>Enter Name for Secret (You can give some friendly name if you create multiple secrets to control multiple processes). For example SecretForTesting, SecretForProduction etc.Select a longer expiration date (i.e. 24 months) if you don&#8217;t like to change secret often in production jobs else choose shorter expiration (i.e. 6 Months or Custom).</li>
<li>Once you Create a Secret make sure you copy it to a secure location. Once the page is closed it won&#8217;t appear again.
<div id="attachment_9454" style="width: 639px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2021/11/azure-ad-app-copy-client-secret-after-create.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9454" class="size-full wp-image-9454" src="https://zappysys.com/blog/wp-content/uploads/2021/11/azure-ad-app-copy-client-secret-after-create.png" alt="Copy Client Secret for Azure AD App" width="629" height="233" srcset="https://zappysys.com/blog/wp-content/uploads/2021/11/azure-ad-app-copy-client-secret-after-create.png 629w, https://zappysys.com/blog/wp-content/uploads/2021/11/azure-ad-app-copy-client-secret-after-create-300x111.png 300w" sizes="(max-width: 629px) 100vw, 629px" /></a><p id="caption-attachment-9454" class="wp-caption-text">Copy Client Secret for Azure AD App</p></div></li>
</ol>
<h2>Associate App User / Set Roles in CRM 365 / Dataverse Environment</h2>
<p>Once we have App Id and Client Secret we can go to CRM Portal to add our App as a valid CRM User. And the last step will be to attach some role(s) to App User (See Next section).</p>
<h3>Method-1 (New way)</h3>
<p>Here are the steps to configure User / Security Roles in New account. Below steps will give you access to Dataverse Entities via API Call. To see all Dataverse Entity you can log in to <a href="https://make.powerapps.com/" target="_blank" rel="noopener">https://make.powerapps.com/</a> and click <strong>Tables</strong></p>
<ol>
<li>Click on the below link to login to new portal to manage CRM /Dataverse environment<br />
<a href="https://admin.powerplatform.microsoft.com/environments" target="_blank" rel="noopener">https://admin.powerplatform.microsoft.com/environments</a></li>
<li>Create an Application User <a href="https://docs.microsoft.com/en-us/power-platform/admin/manage-application-users?WT.mc_id=ppac_inproduct_settings">using these steps</a> (When prompted choose the same App we created in the previous section)</li>
<li>Now Go to App Users Screen and Edit Security Roles using the below steps
<div id="attachment_9579" style="width: 698px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2021/11/powerplatform-crm-365-online-dataverse-view-environments.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9579" class="size-full wp-image-9579" src="https://zappysys.com/blog/wp-content/uploads/2021/11/powerplatform-crm-365-online-dataverse-view-environments.png" alt="See available CRM 365 Online / Datavese Environments" width="688" height="345" srcset="https://zappysys.com/blog/wp-content/uploads/2021/11/powerplatform-crm-365-online-dataverse-view-environments.png 688w, https://zappysys.com/blog/wp-content/uploads/2021/11/powerplatform-crm-365-online-dataverse-view-environments-300x150.png 300w" sizes="(max-width: 688px) 100vw, 688px" /></a><p id="caption-attachment-9579" class="wp-caption-text">See available CRM 365 Online / Datavese Environments</p></div>
<div id="attachment_9580" style="width: 955px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2021/11/powerplatform-crm-365-online-dataverse-view-app-users.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9580" class="size-full wp-image-9580" src="https://zappysys.com/blog/wp-content/uploads/2021/11/powerplatform-crm-365-online-dataverse-view-app-users.png" alt="See available CRM 365 Online / Datavese Application Users" width="945" height="530" srcset="https://zappysys.com/blog/wp-content/uploads/2021/11/powerplatform-crm-365-online-dataverse-view-app-users.png 945w, https://zappysys.com/blog/wp-content/uploads/2021/11/powerplatform-crm-365-online-dataverse-view-app-users-300x168.png 300w, https://zappysys.com/blog/wp-content/uploads/2021/11/powerplatform-crm-365-online-dataverse-view-app-users-768x431.png 768w" sizes="(max-width: 945px) 100vw, 945px" /></a><p id="caption-attachment-9580" class="wp-caption-text">See available CRM 365 Online / Datavese Application Users</p></div>
<div id="attachment_9581" style="width: 1375px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2021/11/powerplatform-crm-365-online-dataverse-select-user-security-roles.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9581" class="size-full wp-image-9581" src="https://zappysys.com/blog/wp-content/uploads/2021/11/powerplatform-crm-365-online-dataverse-select-user-security-roles.png" alt="Edit Security Roles for CRM 365 Online / Datavese Application Users" width="1365" height="581" srcset="https://zappysys.com/blog/wp-content/uploads/2021/11/powerplatform-crm-365-online-dataverse-select-user-security-roles.png 1365w, https://zappysys.com/blog/wp-content/uploads/2021/11/powerplatform-crm-365-online-dataverse-select-user-security-roles-300x128.png 300w, https://zappysys.com/blog/wp-content/uploads/2021/11/powerplatform-crm-365-online-dataverse-select-user-security-roles-768x327.png 768w, https://zappysys.com/blog/wp-content/uploads/2021/11/powerplatform-crm-365-online-dataverse-select-user-security-roles-1024x436.png 1024w" sizes="(max-width: 1365px) 100vw, 1365px" /></a><p id="caption-attachment-9581" class="wp-caption-text">Edit Security Roles for CRM 365 Online / Datavese Application Users</p></div></li>
</ol>
<h3>Method-2 (Legacy)</h3>
<p>If you prefer to use an older interface (and it&#8217;s still available to you) then you can use the below steps to perform the same thing we described in the previous section.</p>
<p>NOTE: Microsoft may soon retire the older interface and force to use the previous way only.</p>
<ol>
<li>To Add our Azure AD App as CRM Application user goto your CRM Portal. Click on <strong>Gear icon</strong> for Settings &gt; <strong>Advanced Settings</strong>
<div id="attachment_9456" style="width: 605px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2021/11/dynamics-crm-advanced-settings.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9456" class="size-full wp-image-9456" src="https://zappysys.com/blog/wp-content/uploads/2021/11/dynamics-crm-advanced-settings.png" alt="Dynamics CRM Advanced Settings" width="595" height="344" srcset="https://zappysys.com/blog/wp-content/uploads/2021/11/dynamics-crm-advanced-settings.png 595w, https://zappysys.com/blog/wp-content/uploads/2021/11/dynamics-crm-advanced-settings-300x173.png 300w" sizes="(max-width: 595px) 100vw, 595px" /></a><p id="caption-attachment-9456" class="wp-caption-text">Dynamics CRM Advanced Settings</p></div></li>
<li>Click on Settings dropdown &gt; <strong>Security</strong> (Under System Column)
<div id="attachment_9457" style="width: 826px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2021/11/dynamics-crm-advanced-security-settings.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9457" class="size-full wp-image-9457" src="https://zappysys.com/blog/wp-content/uploads/2021/11/dynamics-crm-advanced-security-settings.png" alt="Dynamics CRM Security Settings (Under Advanced Settings - System)" width="816" height="438" srcset="https://zappysys.com/blog/wp-content/uploads/2021/11/dynamics-crm-advanced-security-settings.png 816w, https://zappysys.com/blog/wp-content/uploads/2021/11/dynamics-crm-advanced-security-settings-300x161.png 300w, https://zappysys.com/blog/wp-content/uploads/2021/11/dynamics-crm-advanced-security-settings-768x412.png 768w" sizes="(max-width: 816px) 100vw, 816px" /></a><p id="caption-attachment-9457" class="wp-caption-text">Dynamics CRM Security Settings (Under Advanced Settings &#8211; System)</p></div></li>
<li>On the security, screen click on the <strong><strong>Users icon<br />
</strong></strong></p>
<div id="attachment_9458" style="width: 396px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2021/11/dynamics-crm-manage-users.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9458" class="size-full wp-image-9458" src="https://zappysys.com/blog/wp-content/uploads/2021/11/dynamics-crm-manage-users.png" alt="Manage Dynamics CRM Users / Roles (Add, Edit, Delete)" width="386" height="269" srcset="https://zappysys.com/blog/wp-content/uploads/2021/11/dynamics-crm-manage-users.png 386w, https://zappysys.com/blog/wp-content/uploads/2021/11/dynamics-crm-manage-users-300x209.png 300w" sizes="(max-width: 386px) 100vw, 386px" /></a><p id="caption-attachment-9458" class="wp-caption-text">Manage Dynamics CRM Users (Add, Edit, Delete)</p></div></li>
<li>Once User Screen shows up click on the User Type <strong>Dropdown</strong> and choose <strong>Application Users</strong> and click <strong>New</strong>
<div id="attachment_9455" style="width: 425px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2021/11/dynamics-crm-365-add-new-application-user.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9455" class="size-full wp-image-9455" src="https://zappysys.com/blog/wp-content/uploads/2021/11/dynamics-crm-365-add-new-application-user.png" alt="Add new Application User in Dynamics CRM" width="415" height="305" srcset="https://zappysys.com/blog/wp-content/uploads/2021/11/dynamics-crm-365-add-new-application-user.png 415w, https://zappysys.com/blog/wp-content/uploads/2021/11/dynamics-crm-365-add-new-application-user-300x220.png 300w" sizes="(max-width: 415px) 100vw, 415px" /></a><p id="caption-attachment-9455" class="wp-caption-text">Add new Application User in Dynamics CRM</p></div></li>
<li>Once User screen shows up. Enter your <strong>Application Id</strong> (obtained from the Azure AD App &gt; Overview screen &#8211; app created earlier). <strong>Click Save</strong> and you will notice all other fields auto populates.
<div id="attachment_10132" style="width: 681px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2021/11/create-dynamics-crm-application-user-link-azure-ad-app-1.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10132" class="wp-image-10132 size-full" src="https://zappysys.com/blog/wp-content/uploads/2021/11/create-dynamics-crm-application-user-link-azure-ad-app-1.png" alt="create-dynamics-crm-application-user-link-azure-ad-app" width="671" height="835" srcset="https://zappysys.com/blog/wp-content/uploads/2021/11/create-dynamics-crm-application-user-link-azure-ad-app-1.png 671w, https://zappysys.com/blog/wp-content/uploads/2021/11/create-dynamics-crm-application-user-link-azure-ad-app-1-241x300.png 241w" sizes="(max-width: 671px) 100vw, 671px" /></a><p id="caption-attachment-10132" class="wp-caption-text">Adding Azure AD App as Dynamics CRM 365 &#8211; Application User</p></div></li>
<li>And the last step is to Attach some CRM Role to the new Application User.<div class="su-note"  style="border-color:#e5de9d;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><div class="su-note-inner su-u-clearfix su-u-trim" style="background-color:#FFF8B7;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;">For demo purposes we will choose &#8220;System Admin&#8221; but for production use, you should grant correct permission carefully. There are many inbuilt roles you can choose from.</div></div>
<div id="attachment_10133" style="width: 893px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2021/11/dynamics-crm-manage-application-user-roles-1.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10133" class="wp-image-10133 size-full" src="https://zappysys.com/blog/wp-content/uploads/2021/11/dynamics-crm-manage-application-user-roles-1.png" alt="dynamics-crm-manage-application-user-roles" width="883" height="766" srcset="https://zappysys.com/blog/wp-content/uploads/2021/11/dynamics-crm-manage-application-user-roles-1.png 883w, https://zappysys.com/blog/wp-content/uploads/2021/11/dynamics-crm-manage-application-user-roles-1-300x260.png 300w, https://zappysys.com/blog/wp-content/uploads/2021/11/dynamics-crm-manage-application-user-roles-1-768x666.png 768w" sizes="(max-width: 883px) 100vw, 883px" /></a><p id="caption-attachment-10133" class="wp-caption-text">Associate Security Role(s) for Dynamics CRM Application User</p></div></li>
</ol>
<h2></h2>
<h2>Find your Organization Id for CRM / Dataverse API calls</h2>
<p>Now find your Org Id before we can call CRM / Dataverse APIs in the next section.</p>
<p>To find your Org Id you can perform the following steps.</p>
<p><strong>Method-1 (New way &#8211; Dataverse Portal)</strong></p>
<ol>
<li>Go to <a href="https://admin.powerplatform.microsoft.com/" target="_blank" rel="noopener">https://admin.powerplatform.microsoft.com/</a></li>
<li>Click on the Environment you like to access</li>
<li>On the Details, page copy your Org Id from the Environment URL For example URL might look like below&#8230; You just need to copy the first part (Use this on CRM Connection &gt; Organization Field)<br />
<span style="text-decoration: underline;"><strong>org8640f7e7</strong></span>.crm.dynamics.com</p>
<div id="attachment_10134" style="width: 752px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2021/11/microsoft-dataverse-crm-api-get-organization-id-1.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10134" class="wp-image-10134 size-full" src="https://zappysys.com/blog/wp-content/uploads/2021/11/microsoft-dataverse-crm-api-get-organization-id-1.png" alt="microsoft-dataverse-crm-api-get-organization-id" width="742" height="424" srcset="https://zappysys.com/blog/wp-content/uploads/2021/11/microsoft-dataverse-crm-api-get-organization-id-1.png 742w, https://zappysys.com/blog/wp-content/uploads/2021/11/microsoft-dataverse-crm-api-get-organization-id-1-300x171.png 300w" sizes="(max-width: 742px) 100vw, 742px" /></a><p id="caption-attachment-10134" class="wp-caption-text">How to find Organization Id for Microsoft Dataverse / CDS / CRM 365 API calls</p></div></li>
</ol>
<p><strong>Method-2 (Old way)</strong></p>
<p>Another way to find your Organization Id is from CRM Portal</p>
<p>If you have multiple environments (i.e. Prod, Sandbox) then each environment might have its own unique URL)</p>
<ol>
<li>To find your API Service URL, Click on <strong>Gear Icon</strong></li>
<li>Choose <strong>Advanced Settings</strong></li>
<li>Click down arrow on <strong>Settings</strong></li>
<li>Click <strong>Customization</strong></li>
<li>Click <strong>Developer Resource</strong> Link</li>
<li>On this page now you can see various URLs. For examples used in this article, we need to get is <strong>Service Root URL</strong> for <strong><strong>Web API</strong></strong>
<div id="attachment_10125" style="width: 730px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/05/dynamics-crm-find-organization-url-soap-web-api-1.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10125" class="wp-image-10125 size-large" src="https://zappysys.com/blog/wp-content/uploads/2019/05/dynamics-crm-find-organization-url-soap-web-api-1-1024x626.png" alt="dynamics-crm-find-organization-url-soap-web-api" width="720" height="440" srcset="https://zappysys.com/blog/wp-content/uploads/2019/05/dynamics-crm-find-organization-url-soap-web-api-1-1024x626.png 1024w, https://zappysys.com/blog/wp-content/uploads/2019/05/dynamics-crm-find-organization-url-soap-web-api-1-300x183.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/05/dynamics-crm-find-organization-url-soap-web-api-1-768x469.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/05/dynamics-crm-find-organization-url-soap-web-api-1.png 1028w" sizes="(max-width: 720px) 100vw, 720px" /></a><p id="caption-attachment-10125" class="wp-caption-text">How to Find Organization Id / Web API URL / SOAP API Service URL (Unique Environment Instance URL)</p></div></li>
</ol>
<h2>Using Client ID (i.e. App Id) and Client Secret to Call Dynamics CRM 365 API / CDS / Dataverse</h2>
<p>That&#8217;s it now we are ready to use this App Id and Client Secret to make CRM API calls.</p>
<p>To confirm if it&#8217;s working you can create a Dynamics CRM Connection (using <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">SSIS PowerPack</a> ). Choose OAuth option on <a href="https://zappysys.com/blog/ssis-dynamics-crm-read-import-crm-365-onpremises/" target="_blank" rel="noopener">Dynamics CRM Connection</a></p>
<div id="attachment_9543" style="width: 899px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2021/11/dyanamics-crm-connection-using-oauth-clientid-connect-dataverse-api.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9543" class="size-full wp-image-9543" src="https://zappysys.com/blog/wp-content/uploads/2021/11/dyanamics-crm-connection-using-oauth-clientid-connect-dataverse-api.png" alt="Connect to Dynamics CRM / Dataverse / PowerApps API using OAuth (Client ID /Secret)" width="889" height="646" srcset="https://zappysys.com/blog/wp-content/uploads/2021/11/dyanamics-crm-connection-using-oauth-clientid-connect-dataverse-api.png 889w, https://zappysys.com/blog/wp-content/uploads/2021/11/dyanamics-crm-connection-using-oauth-clientid-connect-dataverse-api-300x218.png 300w, https://zappysys.com/blog/wp-content/uploads/2021/11/dyanamics-crm-connection-using-oauth-clientid-connect-dataverse-api-768x558.png 768w" sizes="(max-width: 889px) 100vw, 889px" /></a><p id="caption-attachment-9543" class="wp-caption-text">Connect to Dynamics CRM / Dataverse / PowerApps API using OAuth (Client ID /Secret)</p></div>
<h2>Conclusion</h2>
<p>In this article, we saw how to Register Azure AD App to call various Microsoft APIs (for this article we focused mainly on Dynamics CRM 365 API only)</p>
<p>The post <a href="https://zappysys.com/blog/register-app-dynamics-crm-365-cds-dataverse-api-azure-ad-oauth/">How to register App for Dynamics CRM 365 / CDS / Dataverse API (Azure AD / OAuth)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to Read API data in SSIS and Load into SQL Table</title>
		<link>https://zappysys.com/blog/ssis-read-api-data-load-sql-table/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Fri, 25 Sep 2020 17:35:17 +0000</pubDate>
				<category><![CDATA[REST API Integration]]></category>
		<category><![CDATA[SSIS Components]]></category>
		<category><![CDATA[SSIS CSV Source]]></category>
		<category><![CDATA[SSIS JSON Source (File/REST)]]></category>
		<category><![CDATA[SSIS XML Source (File / SOAP)]]></category>
		<category><![CDATA[oauth]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=9141</guid>

					<description><![CDATA[<p>Introduction If you have need to integrate REST API in SSIS (i.e. fetch JSON, XML, CSV via HTTP call) and wondering how to Read API data in SSIS and Load into SQL DB (i.e. SQL Server, MySQL, Oracle) then you are at the right place. In this article we will cover simple step by step [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/ssis-read-api-data-load-sql-table/">How to Read API data in SSIS and Load into SQL Table</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2017/09/api-180x180.png"><img loading="lazy" decoding="async" class=" wp-image-1854 alignleft" src="https://zappysys.com/blog/wp-content/uploads/2017/09/api-180x180.png" alt="" width="109" height="109" srcset="https://zappysys.com/blog/wp-content/uploads/2017/09/api-180x180.png 180w, https://zappysys.com/blog/wp-content/uploads/2017/09/api-180x180-150x150.png 150w" sizes="(max-width: 109px) 100vw, 109px" /></a>If you have need to integrate REST API in SSIS (i.e. fetch JSON, XML, CSV via HTTP call) and wondering how to Read API data in SSIS and Load into SQL DB (i.e. SQL Server, MySQL, Oracle) then you are at the right place.</p>
<p>In this article we will cover simple step by step approach how to achieve API integration in few clicks. For detailed introduction please refer to our <a href="https://zappysys.com/blog/call-rest-api-using-ssis-web-service-task/" target="_blank" rel="noopener">previous article</a>.</p>
<p>In next few sections we will cover the following SSIS Components to read data from API like a Table (Parse in Rows / Column). Our instructions will be mostly for JSON Format but concepts are same for other formats (i.e. XML / CSV).</p>
<div class="su-table su-table-alternate">
<table>
<colgroup>
<col style="vertical-align: top" width="100" />
<col style="vertical-align: top" /></colgroup>
<tbody>
<tr>
<td><img decoding="async" style="width: 72px;height: 72px" src="//zappysys.com/images/ssis-powerpack/SSIS-Json-Source-Adapter.png" alt="Custom SSIS Components - Json Source" /></td>
<td style="vertical-align: top"><a href="//zappysys.com/products/ssis-powerpack/ssis-json-file-source/">JSON Source Connector</a> (Read from REST API, JSON File or OData Service): Use this dataflow component when you have to <strong>fetch data from REST API webservice like a table</strong>. This component allows you to extract JSON data from webservice and de-normalize nested structure so you can save to Relational database such as SQL Server or any other target (Oracle, FlatFile, Excel, MySQL). This component also supports reading local JSON files or direct JSON string (Wildcard pattern supported too e.g. c:\data\file*.json).</td>
</tr>
<tr>
<td><img decoding="async" style="width: 72px;height: 72px" src="//zappysys.com/images/ssis-powerpack/ssis-xml-source.png" alt="Custom SSIS Components - XML Source (Read File/SOAP/REST Web Service)" /></td>
<td style="vertical-align: top"><a href="//zappysys.com/products/ssis-powerpack/ssis-xml-source/">XML Source Connector</a> (SOAP, File, REST) : Use this dataflow component when you have to fetch data from XML or SOAP webservice and consume data like a table. This component allows you to extract data from webservice and save to SQL Server or any other target (Oracle, FlatFile, Excel, MySQL). This component also supports reading local XML files or direct XML string.</td>
</tr>
<tr>
<td><img loading="lazy" decoding="async" class="alignnone" style="width: 72px;height: 72px" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/csv-source/ssis-csv-file-source.png" alt="Custom SSIS Components - CSV Source (Read File/REST API)" width="128" height="128" /></td>
<td style="vertical-align: top"><a href="https://zappysys.com/products/ssis-powerpack/ssis-csv-file-source-flat-file-web-api/">CSV Source Connector</a> (File, REST) : Use this dataflow component when you have to fetch data from File or REST API which returns data in CSV format . This component allows you to extract data from webservice and save to SQL Server or any other target (Oracle, FlatFile, Excel, MySQL). This component also supports reading local CSV files or direct CSV string.</td>
</tr>
</tbody>
</table>
</div>
<p>There are few more API components not discussed in this articles. They are <a href="https://zappysys.com/products/ssis-powerpack/ssis-rest-api-web-service-task/" target="_blank" rel="noopener">REST API Task</a> (no Parser &#8211; Just raw API calls) and <a href="https://zappysys.com/products/ssis-powerpack/ssis-web-api-destination-connector/" target="_blank" rel="noopener">Web API Destination</a> (Write / Send Data To API / Delete rows). They both have different use case to check them see it fits in your need.</p>
<div class="content_block" id="custom_post_widget-2523"><h2><span id="Prerequisites">Prerequisites</span></h2>
Before we perform the steps listed in this article, you will need to make sure the following prerequisites are met:
<ol style="margin-left: 1.5em;">
 	<li><abbr title="SQL Server Integration Services">SSIS</abbr> designer installed. Sometimes it is referred to as <abbr title="Business Intelligence Development Studio">BIDS</abbr> or <abbr title="SQL Server Data Tools">SSDT</abbr> (<a href="https://docs.microsoft.com/en-us/sql/ssdt/download-sql-server-data-tools-ssdt" target="_blank" rel="noopener">download it from the Microsoft site</a>).</li>
 	<li>Basic knowledge of SSIS package development using <em>Microsoft SQL Server Integration Services</em>.</li>
 	<li>Make sure <span style="text-decoration: underline;"><a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">ZappySys SSIS PowerPack</a></span> is installed (<a href="https://zappysys.com/products/ssis-powerpack/download/" target="_blank" rel="noopener">download it</a>, if you haven't already).</li>
 	<li>(<em>Optional step</em>)<em>.</em> <a href="https://zappysys.zendesk.com/hc/en-us/articles/360035974593" target="_blank" rel="noopener">Read this article</a>, if you are planning to deploy packages to a server and schedule their execution later.</li>
</ol></div>
<h2>Video Tutorial</h2>
<h2><a href="https://zappysys.com/blog/ssis-read-api-data-load-sql-table/"><img decoding="async" src="https://zappysys.com/blog/wp-content/plugins/wp-youtube-lyte/lyteCache.php?origThumbUrl=%2F%2Fi.ytimg.com%2Fvi%2FaO8cVRyCBWw%2Fhqdefault.jpg" alt="YouTube Video"></a><br /><br /></h2>
<h2>Step-By-Step &#8211; Read API data in SSIS using JSON / XML / CSV Source</h2>
<p>In this section you will learn how to use JSON Source Adapter to Read data from API URL.</p>
<div>
<ol>
<li>Open Visual Studio and Create New SSIS Package Project.</li>
<li>Now, Drag and Drop the SSIS <strong>Data Flow Task</strong> from the SSIS Toolbox.<br />
<img decoding="async" class="figureimage" title="SSIS Data Flow Task - Drag and Drop" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/drag-and-drop-data-flow-task.png" alt="SSIS Data Flow Task - Drag and Drop" /></li>
<li>Double click on the Data Flow task to see Data Flow designer surface.</li>
<li>From the SSIS toolbox drag and drop JSON Source on the dataflow designer surface. If your data format is XML then <a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/ssis-xml-source.htm" target="_blank" rel="noopener">use XML Source</a>, if your data format is CSV then <a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/ssis-csv-source.htm">use CSV Source</a>.<br />
<img decoding="async" class="figureimage" title="SSIS JSON Source - Drag and Drop" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/json-source/ssis-json-source-adapter-drag.png" alt="SSIS JSON Source - Drag and Drop" /></li>
<li>Double click JSON Source to configure it.</li>
<li>From the Access Mode dropdown select [File path or web Url] and paste the following Url for this example .<br />
<pre class="crayon-plain-tag">https://services.odata.org/V3/OData/OData.svc/Products?$format=json</pre>
</li>
<li>Now next step is to select Filter (Click <strong>Browse</strong> button next to <strong>Array Filter</strong>) or just type below expression in the text box to define which Hierarchy you like to Flatten (i.e. Array).
<div id="attachment_11491" style="width: 838px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2020/09/json-source-configuration.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11491" class="wp-image-11491 size-full" src="https://zappysys.com/blog/wp-content/uploads/2020/09/json-source-configuration.png" alt="" width="828" height="745" srcset="https://zappysys.com/blog/wp-content/uploads/2020/09/json-source-configuration.png 828w, https://zappysys.com/blog/wp-content/uploads/2020/09/json-source-configuration-300x270.png 300w, https://zappysys.com/blog/wp-content/uploads/2020/09/json-source-configuration-768x691.png 768w" sizes="(max-width: 828px) 100vw, 828px" /></a><p id="caption-attachment-11491" class="wp-caption-text">JSON Source Select Filter</p></div>
<div class="mceTemp"></div>
</li>
<li>JSON/XML can contain multiple arrays within a single document (similar to many tables within a single database). So you have to define which branch you like to extract.  Enter <a href="http://goessner.net/articles/JSONPath/" target="_blank" rel="noopener">JSONPath expression</a> in the Filter textbox to extract only specific part of JSON file as below (<strong>$.value[*]</strong> will get content of value property from JSON document. Value property is an array of JSON documents so we have to use <strong>[*]</strong> to indicate we want all records of that array)<br />
<pre class="crayon-plain-tag">$.value[*]</pre>
<div id="attachment_11492" style="width: 838px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2020/09/json-source-rsult.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11492" class="size-full wp-image-11492" src="https://zappysys.com/blog/wp-content/uploads/2020/09/json-source-rsult.png" alt="" width="828" height="745" srcset="https://zappysys.com/blog/wp-content/uploads/2020/09/json-source-rsult.png 828w, https://zappysys.com/blog/wp-content/uploads/2020/09/json-source-rsult-300x270.png 300w, https://zappysys.com/blog/wp-content/uploads/2020/09/json-source-rsult-768x691.png 768w" sizes="(max-width: 828px) 100vw, 828px" /></a><p id="caption-attachment-11492" class="wp-caption-text">JSON Source preview data</p></div></li>
<li>Click &#8216;Preview&#8217; to check if our settings are correct.</li>
<li>Click OK to save settings.</li>
<li>How to Pass Credentials to the Service (Basic Authorization Header) Check <a href="https://zappysys.com/blog/how-to-set-base64-encoded-authorization-header-for-http-web-request/" target="_blank" rel="noopener">this article</a> for more information</li>
</ol>
<p>After this section we will see how to connect Source to Target like SQL Server and Load API data into SQL Server Table.</p>
</div>
<h2>Load API data into SQL Server Table / Other Target</h2>
<div class="content_block" id="custom_post_widget-5617"><p>ZappySys SSIS PowerPack makes it easy to load data from various sources such as REST, SOAP, JSON, XML, CSV or from other source into SQL Server, or PostgreSQL, or Amazon Redshift, or other  targets. The <strong>Upsert Destination</strong> component allows you to automatically insert new records and update existing ones based on key columns. Below are the detailed steps to configure it.</p>
<h3>Step 1: Add Upsert Destination to Data Flow</h3>
<ol>
<li>Drag and drop the <strong>Upsert Destination</strong> component from the SSIS Toolbox.</li>
<li>Connect your source component (e.g., JSON / REST / Other Source) to the Upsert Destination.</li>
</ol>
<div class="wp-caption aligncenter">
<a href="https://zappysys.com/blog/wp-content/uploads/2017/08/ssis-data-flow-drag-drop-upsert-destination.png">
<img loading="lazy" decoding="async" class="size-full" alt="" src="https://zappysys.com/blog/wp-content/uploads/2017/08/ssis-data-flow-drag-drop-upsert-destination.png" /></a>
<p class="wp-caption-text">SSIS - Data Flow - Drang and Drop Upsert Destination Component</p>
</div>
<h3>Step 2: Configure Target Connection</h3>
<ol>
<li>Double-click the <strong>Upsert Destination</strong> component to open the configuration window.</li>
<li>Under <strong>Connection</strong>, select an existing target connection or click <strong>NEW</strong> to create a new connection.
<ul>
<li>Example: SQL Server, or PostgreSQL, or Amazon Redshift.</li>
</ul>
</li>
</ol>
<h3>Step 3: Select or Create Target Table</h3>
<ol>
<li>In the <strong>Target Table</strong> dropdown, select the table where you want to load data.</li>
<li>Optionally, click <strong>NEW</strong> to create a new table based on the source columns.</li>
</ol>
<div class="wp-caption aligncenter">
<a href="https://zappysys.com/blog/wp-content/uploads/2020/09/upsert-destination-configuration.png">
<img loading="lazy" decoding="async" class="size-full" alt="" src="https://zappysys.com/blog/wp-content/uploads/2020/09/upsert-destination-configuration.png" /></a>
<p class="wp-caption-text">Configure SSIS Upsert Destination Connection - Loading data (REST / SOAP / JSON / XML /CSV) into SQL Server or other target using SSIS</p>
</div>
<h3>Step 4: Map Columns</h3>
<ol>
<li>Go to the <strong>Mappings</strong> tab.</li>
<li>Click <strong>Auto Map</strong> to map source columns to target columns by name.</li>
<li>Ensure you <strong>check the Primary key column(s)</strong> that will determine whether a record is inserted or updated.</li>
<li>You can manually adjust the mappings if necessary.</li>
</ol>
 <div class="wp-caption aligncenter">
<a href="https://zappysys.com/blog/wp-content/uploads/2020/09/upsert-destination-key.png">
<img loading="lazy" decoding="async" class="size-full" alt="" src="https://zappysys.com/blog/wp-content/uploads/2020/09/upsert-destination-key.png" /></a>
<p class="wp-caption-text">SSIS Upsert Destination - Columns Mappings</p>
</div>
<h3>Step 5: Save Settings</h3>
<ul>
<li>Click <strong>OK</strong> to save the Upsert Destination configuration.</li>
</ul>
<h3>Step 6: Optional: Add Logging or Analysis</h3>
<ul>
<li>You may add extra destination components to log the number of inserted vs. updated records for monitoring or auditing purposes.</li>
</ul>
<h3>Step 7: Execute the Package</h3>
<ul>
<li>Run your SSIS package and verify that the data is correctly inserted and updated in the target table.</li>
</ul>
<div class="wp-caption aligncenter">
<a href="https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-upsert-destination-execute.png">
<img loading="lazy" decoding="async" class="size-full" alt="" src="https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-upsert-destination-execute.png" /></a>
<p class="wp-caption-text">SSIS Upsert Destination Execution</p>
</div></div>
<h2>API Authentication</h2>
<p>In our step by step example we did not cover Authentication to keep things simple but in real world you have to pass some sort of authentication details to make API calls (e.g. UserID/Password or Secure Token). There are many ways to authenticate with API Services. ZappySys offer mainly 2 Connection Managers to cover most Authentication scenarios.</p>
<ol>
<li><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/ssis-http-connection-manager.htm" target="_blank" rel="noopener">HTTP Connection Manager</a></li>
<li><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/ssis-oauth-connection-manager.htm" target="_blank" rel="noopener">OAuth Connection Manager</a></li>
</ol>
<h3>Using HTTP Connection Manager</h3>
<p>If you have use case of using UserID / Password or any other method supported by HTTP Connection Manager then use below option (Below example is for Basic Authentication)</p>
<div id="attachment_11495" style="width: 835px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2020/09/using-HTTP-connection.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11495" class="wp-image-11495 size-full" src="https://zappysys.com/blog/wp-content/uploads/2020/09/using-HTTP-connection.png" alt="SSIS JSON Source - Passing Basic Credentials (Supply UserID / Password) using HTTP Connection" width="825" height="812" srcset="https://zappysys.com/blog/wp-content/uploads/2020/09/using-HTTP-connection.png 825w, https://zappysys.com/blog/wp-content/uploads/2020/09/using-HTTP-connection-300x295.png 300w, https://zappysys.com/blog/wp-content/uploads/2020/09/using-HTTP-connection-768x756.png 768w" sizes="(max-width: 825px) 100vw, 825px" /></a><p id="caption-attachment-11495" class="wp-caption-text">SSIS JSON Source &#8211; Passing Basic Credentials (Supply UserID / Password) using HTTP Connection</p></div>
<h3>Using OAuth Connection Manager</h3>
<p>If your API support <a href="https://zappysys.com/blog/rest-api-authentication-with-oauth-2-0-using-ssis/" target="_blank" rel="noopener">OAuth Standard</a> for Authorization then use OAuth Connection Type as below.</p>
<div id="attachment_11496" style="width: 838px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2020/09/using-OAUTH-connection.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11496" class="size-full wp-image-11496" src="https://zappysys.com/blog/wp-content/uploads/2020/09/using-OAUTH-connection.png" alt="" width="828" height="896" srcset="https://zappysys.com/blog/wp-content/uploads/2020/09/using-OAUTH-connection.png 828w, https://zappysys.com/blog/wp-content/uploads/2020/09/using-OAUTH-connection-277x300.png 277w, https://zappysys.com/blog/wp-content/uploads/2020/09/using-OAUTH-connection-768x831.png 768w" sizes="(max-width: 828px) 100vw, 828px" /></a><p id="caption-attachment-11496" class="wp-caption-text">Generate Token for Google API using OAuth 2.0</p></div>
<h2>API Pagination</h2>
<p>Pagination is another important concept to understand when you call API using ZappySys Connector. If you ready many records from your API then by default API might not return all rows so you have to paginate until all records are read (Like a Loop in Programming). ZappySys makes it easy to paginate. Check this article to configure <a href="https://zappysys.com/blog/ssis-rest-api-looping-until-no-more-pages-found/" target="_blank" rel="noopener">many different Pagination Modes</a></p>
<div class="content_block" id="custom_post_widget-1887"><h3>Truncation related error</h3>
<p style="text-align: justify;">The most common error you may face when you run an SSIS package is truncation error. During the design time only 300 rows are scanned from a source (a file or a REST API call response) to detect datatypes but at runtime, it is likely you will retrieve far more records. So it is possible that you will get longer strings than initially expected. For detailed instructions on how to fix common metadata related errors read an article "<a href="//zappysys.com/blog/handling-ssis-component-metadata-issues/" target="_blank" rel="noopener">How to handle SSIS errors (truncation, metadata issues)</a>".</p>

<h3>Authentication related error</h3>
Another frequent error you may get is an authentication error, which happens when you deploy/copy a package to another machine and run it there. Check <a href="#Deployment_to_Production">the paragraph below</a> to see why it happens and how to solve this problem.</div>
<div class="content_block" id="custom_post_widget-2021"><h2>Things have gone bad: Error handling &amp; debugging</h2>
<p style="text-align: justify;">Incidentally, bad things can happen<i>. </i>A remote server may go offline or your server may go out of memory. In any case, you may want to know when that happens and take actions accordingly. For that purpose, you have to redirect bad rows to some other destination. For this example, we will take and use <em>Web API Destination</em>, but basically, you can use any SSIS component:</p>

<h3>Handling errors</h3>
<ol style="margin-left: 0;">
 	<li>Add a <em>Derived Column</em> above <em>Web API Destination</em> with expression <strong>"(DT_WSTR,4000)ZS_JSON_OUT"</strong> and name it <strong>"JsonAsString"</strong>. This will let you see what JSON you are actually passing.</li>
 	<li>Then add a database or file destination or use another <em>Trash Destination</em> for debugging purposes and redirect the bad rows (<span style="color: #d66565;">red arrow</span>) from <em><em>Web API Destination </em></em>into it<em><em>. </em></em>Don't forget to set <span class="lang:default decode:true crayon-inline">Redirect row</span> option for both, <em>Error</em> and <em>Truncation</em> columns:<em><em>
</em></em>
<div class="wp-caption">

<a href="//zappysys.com/blog/wp-content/uploads/2017/06/ssis-sql-server-to-elasticsearch-error-handling-redirecting-bad-rows.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="alignnone wp-image-1487 size-full" src="https://zappysys.com/blog/wp-content/uploads/2017/06/ssis-sql-server-to-elasticsearch-error-handling-redirecting-bad-rows.png" alt="Redirect bad rows from &lt;em&gt;Web API Destination&lt;/em&gt; to &lt;em&gt;Trash Destination&lt;/em&gt; when load from SQL Server to Elasticsearch is failing. Add derived column JsonAsString to be able to read JSON you are using." width="739" height="267" srcset="https://zappysys.com/blog/wp-content/uploads/2017/06/ssis-sql-server-to-elasticsearch-error-handling-redirecting-bad-rows.png 739w, https://zappysys.com/blog/wp-content/uploads/2017/06/ssis-sql-server-to-elasticsearch-error-handling-redirecting-bad-rows-300x108.png 300w" sizes="(max-width: 739px) 100vw, 739px" /></a>
<p class="wp-caption-text">Redirected failed requests from <em>Web API Destination</em> to a desired destination when loading from SQL Server to REST API Service is failing. Derived Column <em>JsonAsString</em> added to be able to read JSON which was passed to Elasticsearch</p>

</div></li>
 	<li>Finally, add a <a href="https://technet.microsoft.com/en-us/library/ms140318%28v=sql.90%29.aspx?f=255&amp;MSPPError=-2147217396" target="_blank" rel="noopener"><em>Data Viewer</em></a> for the red path, if you want to debug the flow. You will be able to see URL, JSON and the error message for each record. You may want to copy-paste <em>ErrorMessage</em> to <em>Notepad </em>if you want it to be more readable:
<div class="wp-caption">

<a href="//zappysys.com/blog/wp-content/uploads/2017/06/ssis-sql-server-to-elasticsearch-error-handling.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="alignnone wp-image-1494 size-full" src="https://zappysys.com/blog/wp-content/uploads/2017/06/ssis-sql-server-to-elasticsearch-error-handling.png" alt="Use Data Viewer to view HTTP requests that failed to be fulfilled in Elasticsearch" width="752" height="280" srcset="https://zappysys.com/blog/wp-content/uploads/2017/06/ssis-sql-server-to-elasticsearch-error-handling.png 752w, https://zappysys.com/blog/wp-content/uploads/2017/06/ssis-sql-server-to-elasticsearch-error-handling-300x112.png 300w" sizes="(max-width: 752px) 100vw, 752px" /></a>
<p class="wp-caption-text">Use Data Viewer to view HTTP requests that failed to be fulfilled.</p>

</div></li>
</ol>
<div class="su-note" style="border-color: #e5dea5; border-radius: 3px; -moz-border-radius: 3px; -webkit-border-radius: 3px;">
<div class="su-note-inner su-clearfix" style="background-color: #fff7b7; border-color: #fffdf1; color: #333333; border-radius: 3px; -moz-border-radius: 3px; -webkit-border-radius: 3px;"><strong>NOTE</strong>: You can read more about redirecting rows in <a href="//zappysys.com/blog/ssis-error-handling-in-data-flow-redirect-bad-rows/" target="_blank" rel="noopener">SSIS Error Handling (Redirect bad rows)</a> article.</div>
</div>
<h3>Debugging HTTP requests</h3>
<p style="text-align: justify;">A common thing you have to do when working with HTTP requests is to debug those requests; e.g. to check what headers, body or URL was passed. <span id="Debug_Web_API_call_using_Fiddler"></span>To test how things look behind the scenes we strongly suggest to use <a href="https://zappysys.com/blog/how-to-use-fiddler-to-analyze-http-web-requests/" target="_blank" rel="noopener">Fiddler</a> - a popular web debugging tool.</p>
<p style="text-align: justify;">Inside it, you can double-click the URL entry (Right side) to see Request and Response Panels. The top panel is Request (URL, Headers, Body) and Bottom Panel is Response. For https:// (secure URL) make sure you enable HTTPS option in Fiddler (Tools &gt; Options &gt; HTTPS &gt; Check Decrypt https request):</p>

<div id="attachment_2344" class="wp-caption alignnone">

<a href="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2016/05/ssis-rest-api-call-debug-via-fiddler.png?ssl=1" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="alignnone wp-image-2344 size-full" style="border: 0px; max-width: 100%; height: auto; box-shadow: rgba(0, 0, 0, 0.176) 0px 1px 2px;" src="https://zappysys.com/blog/wp-content/uploads/2016/05/ssis-rest-api-call-debug-via-fiddler.png" alt="Debugging Web API call using Fiddler in SSIS" width="1287" height="564" data-attachment-id="2344" data-permalink="https://zappysys.com/blog/pass-authorization-header-redirected-location/ssis-rest-api-call-debug-via-fiddler/#main" data-orig-file="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2016/05/ssis-rest-api-call-debug-via-fiddler.png?fit=1287%2C564&amp;ssl=1" data-orig-size="1287,564" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="ssis-rest-api-call-debug-via-fiddler" data-image-description="&lt;p&gt;Debugging Web API call using Fiddler in SSIS&lt;/p&gt; " data-medium-file="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2016/05/ssis-rest-api-call-debug-via-fiddler.png?fit=300%2C131&amp;ssl=1" data-large-file="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2016/05/ssis-rest-api-call-debug-via-fiddler.png?fit=720%2C316&amp;ssl=1" srcset="https://zappysys.com/blog/wp-content/uploads/2016/05/ssis-rest-api-call-debug-via-fiddler.png 1287w, https://zappysys.com/blog/wp-content/uploads/2016/05/ssis-rest-api-call-debug-via-fiddler-300x131.png 300w, https://zappysys.com/blog/wp-content/uploads/2016/05/ssis-rest-api-call-debug-via-fiddler-768x337.png 768w, https://zappysys.com/blog/wp-content/uploads/2016/05/ssis-rest-api-call-debug-via-fiddler-1024x449.png 1024w" sizes="(max-width: 1287px) 100vw, 1287px" /></a>
<p class="wp-caption-text">Debugging Web API call using Fiddler in SSIS</p>

</div></div>
<h2>Conclusion</h2>
<p>REST API is becoming more and more popular each day. With that Data integration from RESTful API services going to be challenge. Luckily ZappySys <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">SSIS PowerPack</a> provides a great way to integrate any API in SSIS via simple drag and drop approach without coding. Try <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">SSIS PowerPack for FREE</a>  see how much time / money you can save and to integrate virtually any REST API.</p>
<p>The post <a href="https://zappysys.com/blog/ssis-read-api-data-load-sql-table/">How to Read API data in SSIS and Load into SQL Table</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to write/update Google Sheet in SSIS</title>
		<link>https://zappysys.com/blog/write-update-google-sheet-ssis/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Wed, 11 Dec 2019 12:29:14 +0000</pubDate>
				<category><![CDATA[Google API]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[Connection]]></category>
		<category><![CDATA[Destination]]></category>
		<category><![CDATA[generator]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[oauth]]></category>
		<category><![CDATA[oledb]]></category>
		<category><![CDATA[post]]></category>
		<category><![CDATA[put]]></category>
		<category><![CDATA[rest]]></category>
		<category><![CDATA[sheet]]></category>
		<category><![CDATA[source]]></category>
		<category><![CDATA[spreadsheet]]></category>
		<category><![CDATA[ssis]]></category>
		<category><![CDATA[transform]]></category>
		<category><![CDATA[update]]></category>
		<category><![CDATA[variable]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[write]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=8475</guid>

					<description><![CDATA[<p>Introduction In this post, you will learn How to write/update Google Sheet in SSIS. We will use drag and drop REST API connectors from SSIS PowerPack. No need to download any SDK or learn programming languages (e.g. JAVA, C#, Ruby, Python) when you use SSIS PowerPack Connectors. We will use the Google Drive API and Google Sheet API [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/write-update-google-sheet-ssis/">How to write/update Google Sheet in SSIS</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2><span id="Introduction">Introduction</span></h2>
<div class="su-note"  style="border-color:#e5de9d;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><div class="su-note-inner su-u-clearfix su-u-trim" style="background-color:#FFF8B7;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><strong>UPDATE:</strong> ZappySys has released a brand new <a href="https://zappysys.com/api/integration-hub/google-sheets-connector/">API Connector for Google Sheets Online</a> which makes it much simpler to <strong>Read/Write  Google Sheets Data in SSIS</strong> compared to the steps listed in this article. You can still use steps from this article but if you are new to API or want to avoid learning curve with API then use newer approach.</p>
<p>Please visit <a href="https://zappysys.com/api/integration-hub/">this page to see all</a> Pre-Configured ready to use API connectors which you can use in <a href="https://zappysys.com/products/ssis-powerpack/ssis-api-source/">SSIS API Source</a> / <a href="https://zappysys.com/products/ssis-powerpack/ssis-api-destination/">SSIS API Destination</a> OR <a href="https://zappysys.com/products/odbc-powerpack/odbc-api-driver/">API ODBC Driver</a> (for non-SSIS Apps such as Excel, Power BI, Informatica).</p>
</div></div>
<a href="https://zappysys.com/blog/wp-content/uploads/2016/09/google-sheets-api-integration.png"><img loading="lazy" decoding="async" class="size-thumbnail wp-image-1670 alignleft" src="https://zappysys.com/blog/wp-content/uploads/2016/09/google-sheets-api-integration-150x150.png" alt="" width="150" height="150" /></a>In this post, you will learn How to write/update Google Sheet in SSIS. We will use drag and drop REST API connectors from <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">SSIS PowerPack</a>. No need to download any SDK or learn programming languages (e.g. JAVA, C#, Ruby, Python) when you use SSIS PowerPack Connectors. We will use the Google Drive API and Google Sheet API to write and update Google Spreadsheet in a few clicks (using OAuth 2.0 connection in SSIS).</p>
<p>In this tutorial, we will use the <a href="https://zappysys.com/blog/call-rest-api-using-ssis-web-service-task/" target="_blank" rel="noopener">REST API Task</a> to call some API. We will use the <a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/ssis-oauth-connection-manager.htm" target="_blank" rel="noopener">OAuth connection</a> along the <a href="https://zappysys.com/blog/call-rest-api-using-ssis-web-service-task/" target="_blank" rel="noopener">REST API Task</a> to write / update data to Google Spreadsheet.</p>
<p>&nbsp;</p>
<h2><span id="Prerequisites">Prerequisites</span></h2>
<p>Before we perform the steps listed in this article, you will need to make sure the following prerequisites are met:</p>
<ol>
<li><abbr title="SQL Server Integration Services">SSIS</abbr> designer installed. Sometimes it is referred to as <abbr title="Business Intelligence Development Studio">BIDS</abbr> or <abbr title="SQL Server Data Tools">SSDT</abbr> (<a href="https://docs.microsoft.com/en-us/sql/ssdt/download-sql-server-data-tools-ssdt" target="_blank" rel="noopener">download it from Microsoft site</a>).</li>
<li>Basic knowledge of SSIS package development using <em>Microsoft SQL Server Integration Services</em>.</li>
<li>Make sure <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">ZappySys SSIS PowerPack</a> is installed (<a href="https://zappysys.com/products/ssis-powerpack/download/" target="_blank" rel="noopener">download it</a>).</li>
<li>Credentials of Google API.</li>
</ol>
<h2>Component Mention in this article</h2>
<div class="su-table su-table-alternate">
<table style="height: 44px;width: 307px">
<tbody>
<tr style="height: 22px">
<td style="height: 22px;width: 1px"><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/json-generator-transform/ssis-json-generator-transform.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="alignnone wp-image-3074" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/json-generator-transform/ssis-json-generator-transform.png" alt="" width="40" height="40" /></a></td>
<td style="height: 22px;width: 247px"><a href="https://zappysys.com/products/ssis-powerpack/ssis-json-generator-transform/" target="_blank" rel="noopener">JSON Generator Transform</a></td>
</tr>
<tr style="height: 22px">
<td style="height: 22px;width: 1px"><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/web-api-destination/ssis-web-api-destination.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="alignnone wp-image-3074" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/web-api-destination/ssis-web-api-destination.png" alt="" width="40" height="40" /></a></td>
<td style="height: 22px;width: 247px"><a href="https://zappysys.com/products/ssis-powerpack/ssis-web-api-destination-connector/" target="_blank" rel="noopener">Web API Destination</a></td>
</tr>
<tr style="height: 22px">
<td style="height: 22px;width: 1px"><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/rest-api-task/ssis-rest-api-web-service-task.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="alignnone wp-image-3074" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/rest-api-task/ssis-rest-api-web-service-task.png" alt="" width="40" height="40" /></a></td>
<td style="height: 22px;width: 247px"><a href="https://zappysys.com/products/ssis-powerpack/ssis-rest-api-web-service-task/" target="_blank" rel="noopener">REST API Task</a></td>
</tr>
</tbody>
</table>
</div>
<h2><span id="Create_Google_API_Project">Create a Google API Project</span></h2>
<p>The first step to access any Google API is to create an API Project in Google Console. If you don’t want to go through this then Skip this Step-1 and in the next section select the Default OAuth App option on OAth Connection Manager (This is the easiest option for now unless you want to use your own OAuth App).</p>
<p><a href="https://zappysys.com/blog/register-google-oauth-application-get-clientid-clientsecret/" target="_blank" rel="noopener">Check this article</a> for step-by-step instructions. When you follow these instructions make sure you <a href="https://console.developers.google.com/apis/api/sheets.googleapis.com/overview?project=603281348663" target="_blank" rel="noopener">enable Google Sheet API.</a></p>
<h2><span id="Create_OAuth_Connection_Manager_in_SSIS">Create OAuth Connection Manager in SSIS</span></h2>
<p>Once you create a Google API project and obtained a Client ID and Client Secret your next step is to create <a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/ssis-oauth-connection-manager.htm" target="_blank" rel="noopener">OAuth Connection Manager</a> in SSIS. ZappySys OAuth connection manager comes with many predefined OAuth Providers (e.g. Facebook, Twitter, Google, etc) but you can also define custom OAuth settings for any OAuth enabled API.</p>
<p>To create SSIS OAuth 2.0 Connection for Google API perform the following steps.</p>
<ol>
<li>Download and Install SSIS PowerPack.</li>
<li>Create a new SSIS Package.</li>
<li>Right-click in Connection Manager Area and Click “New Connection”.</li>
<li>When prompted select ZS-OAUTH connection type, On the OAuth Connection Manager Select Provider=Google.</li>
<li>Click here to <a href="https://console.developers.google.com/apis/credentials" target="_blank" rel="noopener">create credentials.</a> Then select the “Use Custom OAuth App” option and enter your ClientID, ClientSecret.</li>
<li>In the Scopes <strong>enter below scopes</strong> (or click Select Scopes). This will allow read/write access to Drive Files or Sheet (E.g. Reading file content / Export file to CSV). You can use the Scope browser to see many other available permissions. For more information click <a href="https://developers.google.com/sheets/api/guides/authorizing#OAuth2Authorizing" target="_blank" rel="noopener">here.</a><br />
<pre class="crayon-plain-tag">https://www.googleapis.com/auth/drive
https://www.googleapis.com/auth/drive.file
https://www.googleapis.com/auth/drive.readonly
https://www.googleapis.com/auth/spreadsheets
https://www.googleapis.com/auth/spreadsheets.readonly</pre>
</li>
<li>Click on the Generate Token button.
<div id="attachment_8479" style="width: 1036px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-google-oauth-connection-google-drive-api-access-file.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8479" class="wp-image-8479 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-google-oauth-connection-google-drive-api-access-file.png" alt="SSIS OAuth Connection Manager – Access Google Drive API using OAuth 2.0" width="1026" height="653" srcset="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-google-oauth-connection-google-drive-api-access-file.png 1026w, https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-google-oauth-connection-google-drive-api-access-file-300x191.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-google-oauth-connection-google-drive-api-access-file-768x489.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-google-oauth-connection-google-drive-api-access-file-1024x652.png 1024w" sizes="(max-width: 1026px) 100vw, 1026px" /></a><p id="caption-attachment-8479" class="wp-caption-text">SSIS OAuth Connection Manager – Access Google Drive API using OAuth 2.0</p></div></li>
<li>You will see UI as below… Click Allow (You may have to scroll to see that button sometimes).</li>
<li>Click on Test Connection to see the connection is working and click on the OK button to save configure setting UI.</li>
</ol>
<h2><span id="Find_Google_Sheet_ID_for_API_call">Find Google Sheet ID for API calls</span></h2>
<p>Before we can write or update Sheet data in SSIS we need to know Google Driver File ID. We will use this ID in the next few sections.</p>
<p>The easiest way to find File ID is to look at the URL like below. If you need to know ID at runtime dynamically then refer to the last section.</p>
<div id="attachment_8450" style="width: 806px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2016/09/obtain-google-sheet-id-for-api-call.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8450" class="wp-image-8450 size-full" src="https://zappysys.com/blog/wp-content/uploads/2016/09/obtain-google-sheet-id-for-api-call.png" alt="Get Google Drive File ID for API call (Sheet ID)" width="796" height="286" srcset="https://zappysys.com/blog/wp-content/uploads/2016/09/obtain-google-sheet-id-for-api-call.png 796w, https://zappysys.com/blog/wp-content/uploads/2016/09/obtain-google-sheet-id-for-api-call-300x108.png 300w, https://zappysys.com/blog/wp-content/uploads/2016/09/obtain-google-sheet-id-for-api-call-768x276.png 768w" sizes="(max-width: 796px) 100vw, 796px" /></a><p id="caption-attachment-8450" class="wp-caption-text">Get Google Drive File ID for API call (Sheet ID)</p></div>
<h2>Create Variables to make dynamic URL</h2>
<ol>
<li>Here, we are going to make a Dynamic URL value.</li>
<li>In Visual Studio Project Right Click on Design Panel, Select Variables.
<div style="width: 426px" class="wp-caption aligncenter"><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/ssis-create-variable.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/ssis-create-variable.png" alt="Create Variables" width="416" height="294" /></a><p class="wp-caption-text">Create Variables</p></div></li>
<li>Let&#8217;s Create Variables with correct DataType and Value. In variable &#8220;<strong>varRange</strong>&#8221; set only the starting point(<strong>Sheet1!A2</strong>) of data if you don&#8217;t know the ending point and leave the first-row for giving header row later or click <a href="https://zappysys.com/blog/write-update-google-sheet-ssis/#Update_Google_Sheet_header_cells_manually" target="_blank" rel="noopener">here.</a><br />
<a href="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-using-rest-api-oauth-create-variable.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="aligncenter wp-image-8547 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-using-rest-api-oauth-create-variable.png" alt="Create Variables with correct datatype and values" width="863" height="209" srcset="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-using-rest-api-oauth-create-variable.png 863w, https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-using-rest-api-oauth-create-variable-300x73.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-using-rest-api-oauth-create-variable-768x186.png 768w" sizes="(max-width: 863px) 100vw, 863px" /></a></li>
</ol>
<h2>Write SQL Server data to Google Spreadsheet</h2>
<p>Now let’s look at a real-world example. How to write data from SQL Server table or other source and send to Google Sheet using Web API Destination.</p>
<ol>
<li>Drag and Drop SSIS Data Flow Task from SSIS Toolbox.
<div id="attachment_8028" style="width: 470px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/02/drag-and-drop-data-flow-task.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8028" class="wp-image-8028 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/02/drag-and-drop-data-flow-task.png" alt="Dragging and dropping Data Flow Task into Control Flow" width="460" height="155" srcset="https://zappysys.com/blog/wp-content/uploads/2019/02/drag-and-drop-data-flow-task.png 460w, https://zappysys.com/blog/wp-content/uploads/2019/02/drag-and-drop-data-flow-task-300x101.png 300w" sizes="(max-width: 460px) 100vw, 460px" /></a><p id="caption-attachment-8028" class="wp-caption-text">Dragging and dropping Data Flow Task into Control Flow</p></div></li>
<li>Double click on the Data Flow task to see the Data Flow designer surface.</li>
<li>Here, In Visual Studio, drag and drop the OLE DB Source, JSON Generator Transform and Web API Destination in the design surface and join the components with the blue arrow.
<div id="attachment_8491" style="width: 611px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-drag-drop-json-generator-web-api-destination.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8491" class="wp-image-8491 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-drag-drop-json-generator-web-api-destination.png" alt="Drag and Drop OLE DB Source, JSON Generator Transform and Web API Destination" width="601" height="369" srcset="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-drag-drop-json-generator-web-api-destination.png 601w, https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-drag-drop-json-generator-web-api-destination-300x184.png 300w" sizes="(max-width: 601px) 100vw, 601px" /></a><p id="caption-attachment-8491" class="wp-caption-text">Drag and Drop OLE DB Source, JSON Generator Transform, and Web API Destination</p></div></li>
<li>Here, you can use our Free ZS Dummy Data Source too. Click <a href="https://zappysys.com/products/ssis-powerpack/dummy-data-source-free/" target="_blank" rel="noopener">here</a> for more information.</li>
<li>But, we are going through OLE DB Source so we need OLEDB Connection.</li>
</ol>
<h3>Create OLE DB Connection</h3>
<ol>
<li>Lets, create the OLE DB Connection.</li>
<li>Let&#8217;s, Right-click on Connection Managers Panel to Create OLEDB Connection, so you can use Source and Context Menu will appear, Select New OLEDB Connection from the Context Menu.
<div style="width: 485px" class="wp-caption aligncenter"><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/oledb-connection-manager/ssis-new-oledb-connection-step-1.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/oledb-connection-manager/ssis-new-oledb-connection-step-1.png" alt="Create OLE DB Connection" width="475" height="353" /></a><p class="wp-caption-text">Create OLE DB Connection</p></div></li>
<li>Now, click on New Button to create Connection.
<div style="width: 665px" class="wp-caption aligncenter"><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/oledb-connection-manager/ssis-new-oledb-connection-step-2.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/oledb-connection-manager/ssis-new-oledb-connection-step-2.png" alt="Create New Connection" width="655" height="558" /></a><p class="wp-caption-text">Create New Connection</p></div></li>
<li>Let&#8217;s Configure Connection Manager, just Follow steps one by one as we have created.
<div style="width: 730px" class="wp-caption aligncenter"><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/oledb-connection-manager/ssis-new-oledb-connection-step-3.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/oledb-connection-manager/ssis-new-oledb-connection-step-3.png" alt="Configure OLE DB Connection" width="720" height="625" /></a><p class="wp-caption-text">Configure OLE DB Connection</p></div></li>
<li>Click on Test Connection to see correct configure it.</li>
<li>Click on the OK button to save connection configure setting UI.</li>
</ol>
<h3>Configure JSON Generator Transform</h3>
<ol>
<li>Double click on JSON Generator Transform to configure it.</li>
<li>Set Output Mode to <strong>Single Dataset Array</strong>. Right-click on Mappings, select Add Static Element then enter Name: &#8220;<strong>range</strong>&#8221; and Select variable we have created for value.
<div id="attachment_8492" style="width: 929px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-configure-json-generator-static-value.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8492" class="wp-image-8492 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-configure-json-generator-static-value.png" alt="Configure JSON Generator Transform - Add Static Value" width="919" height="730" srcset="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-configure-json-generator-static-value.png 919w, https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-configure-json-generator-static-value-300x238.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-configure-json-generator-static-value-768x610.png 768w" sizes="(max-width: 919px) 100vw, 919px" /></a><p id="caption-attachment-8492" class="wp-caption-text">Configure JSON Generator Transform &#8211; Add Static Value</p></div></li>
<li>Again, Right-click on Mappings, select Add Static Element then enter Name: &#8220;<strong>majorDimension</strong>&#8221; and Value: &#8220;<strong>ROWS</strong>&#8220;.
<div id="attachment_8493" style="width: 946px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-configure-json-generator-static-value-2.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8493" class="wp-image-8493 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-configure-json-generator-static-value-2.png" alt="Configure JSON Generator Transform - Add Static Value" width="936" height="730" srcset="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-configure-json-generator-static-value-2.png 936w, https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-configure-json-generator-static-value-2-300x234.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-configure-json-generator-static-value-2-768x599.png 768w" sizes="(max-width: 936px) 100vw, 936px" /></a><p id="caption-attachment-8493" class="wp-caption-text">Configure JSON Generator Transform &#8211; Add Static Value</p></div></li>
<li>Now, Right-click on Mappings, select Add Document Array, Check to Treat as <strong>2D array</strong> option and enter Element Name as &#8220;<strong>values</strong>&#8220;.
<div id="attachment_8494" style="width: 1047px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-configure-json-generator-document-array.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8494" class="wp-image-8494 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-configure-json-generator-document-array.png" alt="Configure JSON Generator Transform - Add Document Array" width="1037" height="764" srcset="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-configure-json-generator-document-array.png 1037w, https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-configure-json-generator-document-array-300x221.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-configure-json-generator-document-array-768x566.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-configure-json-generator-document-array-1024x754.png 1024w" sizes="(max-width: 1037px) 100vw, 1037px" /></a><p id="caption-attachment-8494" class="wp-caption-text">Configure JSON Generator Transform &#8211; Add Document Array</p></div></li>
<li>Then, right-click on Document Array, select <strong>Add elements</strong> &gt; Select <strong>Add Multiple Columns</strong> and check on columns you like to add.
<div id="attachment_8495" style="width: 1047px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-configure-json-generator-addelement.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8495" class="wp-image-8495 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-configure-json-generator-addelement.png" alt="Configure JSON Generator Transform - Add Element" width="1037" height="764" srcset="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-configure-json-generator-addelement.png 1037w, https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-configure-json-generator-addelement-300x221.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-configure-json-generator-addelement-768x566.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-configure-json-generator-addelement-1024x754.png 1024w" sizes="(max-width: 1037px) 100vw, 1037px" /></a><p id="caption-attachment-8495" class="wp-caption-text">Configure JSON Generator Transform &#8211; Add Element</p></div></li>
<li>Click on the OK button to save JSON Generator Transform configure setting UI.</li>
</ol>
<h3>Configure Web API Destination</h3>
<ol>
<li>Double click on Web API Destination to configure it.</li>
<li>Select the OAuth connection manager created in an earlier section (Assuming you had all scopes with write permission).</li>
<li>In the Setting tab,
<ol>
<li>In URL, Generate Dynamic URL like below. Change Sheet ID, Range designator(including Sheet name) and API URL Parameters as per your need.<br />
<pre class="crayon-plain-tag">https://sheets.googleapis.com/v4/spreadsheets/{{User::varGoogleSpreadsheetID}}/values/{{User::varRange}}:{{User::varSpreadsheetValues}}?valueInputOption={{User::varValueInputOption}}</pre>
<strong>Example URL without variables (some part masked with xxxxxxxx):</strong><br />
<pre class="crayon-plain-tag">https://sheets.googleapis.com/v4/spreadsheets/1tuGO3_-2JlSmyiHwX6xxxxxxxxCHrORJc/values/Sheet1!A2:B4:append?valueInputOption=USER_ENTERED</pre>
</li>
<li>Change Request Method to <strong>POST.</strong></li>
<li>Select JSON Generator variable into <strong>Body (Request Data)</strong> or you can select <strong>Input column</strong> for <strong>Body </strong>(JSON Generator Output).</li>
<li>Set <strong><strong><strong>application/JSON </strong></strong></strong>to Body Content-type.
<div id="attachment_8497" style="width: 1214px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-configure-web-api-destination.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8497" class="wp-image-8497 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-configure-web-api-destination.png" alt="Configure Web API Destination" width="1204" height="725" srcset="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-configure-web-api-destination.png 1204w, https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-configure-web-api-destination-300x181.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-configure-web-api-destination-768x462.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-configure-web-api-destination-1024x617.png 1024w" sizes="(max-width: 1204px) 100vw, 1204px" /></a><p id="caption-attachment-8497" class="wp-caption-text">Configure Web API Destination</p></div></li>
</ol>
</li>
<li>Click on the OK button to save Web API Destination configure setting UI.</li>
<li>That&#8217;s all, You are ready to Run or Execute Task and verify data into Google spreadsheet. Now update header row values for click <a href="https://zappysys.com/blog/write-update-google-sheet-ssis/#Update_Google_Sheet_header_cells_manually">here.</a>
<div id="attachment_8530" style="width: 1147px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-using-rest-api-oauth-execute-1.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8530" class="wp-image-8530 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-using-rest-api-oauth-execute-1.png" alt="Run or Execute Package and verify data into Google Spreadsheet" width="1137" height="556" srcset="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-using-rest-api-oauth-execute-1.png 1137w, https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-using-rest-api-oauth-execute-1-300x147.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-using-rest-api-oauth-execute-1-768x376.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-using-rest-api-oauth-execute-1-1024x501.png 1024w" sizes="(max-width: 1137px) 100vw, 1137px" /></a><p id="caption-attachment-8530" class="wp-caption-text">Run or Execute Package and verify data into Google Spreadsheet</p></div></li>
</ol>
<h2><span id="Write_data_to_Google_Spread_Sheet">Append data to Google SpreadSheet using REST API Task</span></h2>
<p>Now let&#8217;s look at how to write to Google SpreadSheet. To write multiple rows in a single request. Also, check this link to <a href="https://developers.google.com/sheets/api/guides/values" target="_blank" rel="noopener">learn more</a>.</p>
<p>For more information, you can see the <a href="https://developers.google.com/sheets/api/samples/writing" target="_blank" rel="noopener">example here</a>. For parameter, detail review this API documentation.</p>
<p>You can use<a href="https://zappysys.com/products/ssis-powerpack/ssis-rest-api-web-service-task/" target="_blank" rel="noopener"> SSIS REST API Task</a> or <a href="https://zappysys.com/products/ssis-powerpack/ssis-web-api-destination-connector/" target="_blank" rel="noopener">Web API Destination</a> to achieve the Spreadsheet write scenario. For a simple example, let&#8217;s use the REST API Task.</p>
<ol>
<li>Drag and Drop ZS REST API Task on the control flow designer.
<div id="attachment_3777" style="width: 577px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-rest-api-task-share-post-on-linkedin.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3777" class="wp-image-3777 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-rest-api-task-share-post-on-linkedin.png" alt="Drag and Drop REST API Task" width="567" height="297" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-rest-api-task-share-post-on-linkedin.png 567w, https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-rest-api-task-share-post-on-linkedin-300x157.png 300w" sizes="(max-width: 567px) 100vw, 567px" /></a><p id="caption-attachment-3777" class="wp-caption-text">Drag and Drop REST API Task</p></div></li>
<li>Double click on ZS REST API Task to configure it.</li>
<li>In the Request Settings tab,
<ol>
<li>set Request URL Access Mode to Url from a connection. Select OAuth Connection from the dropdown (Same connection we created in the previous section).</li>
<li>Enter the URL below. Change Sheet ID, Range designator(including Sheet name) and API URL Parameters as per your need.<br />
<pre class="crayon-plain-tag">https://sheets.googleapis.com/v4/spreadsheets/{{User::varGoogleSpreadsheetID}}/values/{{User::varRange}}:{{User::varSpreadsheetValues}}?valueInputOption={{User::varValueInputOption}}</pre>
<strong>Example URL without variables (some part masked with xxxxxxxx):</strong><br />
<pre class="crayon-plain-tag">https://sheets.googleapis.com/v4/spreadsheets/1tuGO3_-2JlSmyiHwX6xxxxxxxxCHrORJc/values/Sheet1!A1:append?valueInputOption=USER_ENTERED</pre>
</li>
<li>Change Request Method to <strong>POST.</strong></li>
<li>Enter Request Body as below<br />
<div class="su-note"  style="border-color:#e5de9d;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><div class="su-note-inner su-u-clearfix su-u-trim" style="background-color:#fff8b7;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><strong>Note:</strong> For example purpose, we included header line in data cells but in the real-world header may already exist in the sheet.</div></div>
<pre class="crayon-plain-tag">{
  "range": "{{User::varRange}}",
  "majorDimension": "ROWS",
  "values": [
    ["Item", "Cost", "Stocked", "Ship Date"],
    ["Wheel", "$20.50", "4", "3/1/2016"],
    ["Door", "$15", "2", "3/15/2016"],
    ["Engine", "$100", "1", "3/20/2016"],
    ["Totals", "=SUM(B2:B4)", "=SUM(C2:C4)", "=MAX(D2:D4)"]
  ]
}</pre>
</li>
<li>Change Request Content type to <strong><strong><strong>application/JSON.</strong></strong></strong>
<div id="attachment_8482" style="width: 1335px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-post-google-spreadsheet-using-rest-api-oauth.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8482" class="wp-image-8482 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-post-google-spreadsheet-using-rest-api-oauth.png" alt="Write data to Google SpreadSheet using REST API Task (OAuth 2.0 Connection)" width="1325" height="762" srcset="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-post-google-spreadsheet-using-rest-api-oauth.png 1325w, https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-post-google-spreadsheet-using-rest-api-oauth-300x173.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-post-google-spreadsheet-using-rest-api-oauth-768x442.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-post-google-spreadsheet-using-rest-api-oauth-1024x589.png 1024w" sizes="(max-width: 1325px) 100vw, 1325px" /></a><p id="caption-attachment-8482" class="wp-caption-text">Write data to Google SpreadSheet using REST API Task (OAuth 2.0 Connection)</p></div></li>
</ol>
</li>
<li>Click on the OK button to save REST API Task configure setting UI.</li>
<li>That&#8217;s all, You are ready to Run or Execute Task and verify data into Google spreadsheet.
<div id="attachment_8481" style="width: 1390px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-using-rest-api-oauth-post-execute.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8481" class="wp-image-8481 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-using-rest-api-oauth-post-execute.png" alt="Execute REST API Task and verify Google Spreadsheet data " width="1380" height="671" srcset="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-using-rest-api-oauth-post-execute.png 1380w, https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-using-rest-api-oauth-post-execute-300x146.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-using-rest-api-oauth-post-execute-768x373.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-using-rest-api-oauth-post-execute-1024x498.png 1024w" sizes="(max-width: 1380px) 100vw, 1380px" /></a><p id="caption-attachment-8481" class="wp-caption-text">Execute REST API Task and verify Google Spreadsheet data</p></div></li>
</ol>
<h2><span id="Update_Google_Sheet_Cells_8211_Single_Range_Set_Values_for_multiple_cells">Update Google Sheet Cells</span></h2>
<p>Now let’s look at the below example of updating multiple cells in google Spreadsheet. For more information, you can see the <a href="https://developers.google.com/sheets/api/samples/writing" target="_blank" rel="noopener">example here</a>. For parameter, detail review this API documentation.</p>
<p>You can use<a href="https://zappysys.com/products/ssis-powerpack/ssis-rest-api-web-service-task/" target="_blank" rel="noopener"> SSIS REST API Task</a> or <a href="https://zappysys.com/products/ssis-powerpack/ssis-web-api-destination-connector/" target="_blank" rel="noopener">Web API Destination</a> to achieve the Spreadsheet Update scenario. For a simple example, let&#8217;s use the REST API Task.</p>
<h3>Update Google Sheet header cells manually</h3>
<ol>
<li>Drag and drop ZS REST API Tasks on the control flow designer.</li>
<li>Double click on the First REST API Task to configure it.</li>
<li>In the Request Settings tab,
<ol>
<li>Enter the URL below. Change Range designator(including Sheet name: <strong>Sheet1!A1</strong>) and API URL Parameters as per your need.<br />
<pre class="crayon-plain-tag">https://sheets.googleapis.com/v4/spreadsheets/{{User::varGoogleSpreadsheetID}}/values/{{User::varRange}}?valueInputOption={{User::varValueInputOption}}</pre>
<strong>Example URL without variables (some part masked with xxxxxxxx):</strong><br />
<pre class="crayon-plain-tag">https://sheets.googleapis.com/v4/spreadsheets/1tuGO3_-2JlSmyiHwX6xxxxxxxxCHrORJc/values/Sheet1!A1?valueInputOption=USER_ENTERED</pre>
</li>
<li>Change Request Method to <strong>PUT.</strong></li>
<li>Enter Request Body as below<br />
<pre class="crayon-plain-tag">{
  "range": "{{User::varRange}}",
  "majorDimension": "ROWS",
  "values": [
    ["CustomerID", "CustomerName"]
  ]
}</pre>
</li>
</ol>
</li>
<li>Click on the OK button to save REST API Task configure setting UI.</li>
<li>That&#8217;s all, You are ready to Run or Execute Task and verify data into Google spreadsheet.<br />
<a href="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-update-put-google-spreadsheet-using-rest-api-oauth.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-8532" src="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-update-put-google-spreadsheet-using-rest-api-oauth.png" alt="" width="1318" height="677" srcset="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-update-put-google-spreadsheet-using-rest-api-oauth.png 1318w, https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-update-put-google-spreadsheet-using-rest-api-oauth-300x154.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-update-put-google-spreadsheet-using-rest-api-oauth-768x394.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-update-put-google-spreadsheet-using-rest-api-oauth-1024x526.png 1024w" sizes="(max-width: 1318px) 100vw, 1318px" /></a></li>
</ol>
<h3><span id="Update_Google_Sheet_Cells_8211_Single_Range_Set_Values_for_multiple_cells">Single Range (Set Values for multiple cells)</span></h3>
<ol>
<li>Follow the previous section(write data to Google Spreadsheet) to update sheet data.</li>
<li>In the Request Settings tab,
<ol>
<li>Enter the URL below. Change Sheet ID, Range designator(including Sheet name) and API URL Parameters as per your need.<br />
<pre class="crayon-plain-tag">https://sheets.googleapis.com/v4/spreadsheets/{{User::varGoogleSpreadsheetID}}/values/{{User::varRange}}?valueInputOption={{User::varValueInputOption}}</pre>
<strong>Example URL without variables (some part masked with xxxxxxxx):</strong><br />
<pre class="crayon-plain-tag">https://sheets.googleapis.com/v4/spreadsheets/1tuGO3_-2JlSmyiHwX6xxxxxxxxCHrORJc/values/Sheet1!A2:B4?valueInputOption=USER_ENTERED</pre>
</li>
<li>Change Request Method to <strong>PUT.</strong></li>
<li>Enter Request Body as below<br />
<pre class="crayon-plain-tag">{
  "range": "{{User::varRange}}",
  "majorDimension": "ROWS",
  "values": [
    ["Laptop", "$2000.50"],
    ["Mobile", "$1150"]
  ]
}</pre>
</li>
</ol>
</li>
<li>That&#8217;s all, click on the Test Request/Response button and verify data into Google spreadsheet.
<div id="attachment_8485" style="width: 1610px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-put-google-spreadsheet-using-rest-api-oauth.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8485" class="wp-image-8485 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-put-google-spreadsheet-using-rest-api-oauth.png" alt="Calling Google Sheet API to Update Multiple Cell Values" width="1600" height="860" srcset="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-put-google-spreadsheet-using-rest-api-oauth.png 1600w, https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-put-google-spreadsheet-using-rest-api-oauth-300x161.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-put-google-spreadsheet-using-rest-api-oauth-768x413.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-put-google-spreadsheet-using-rest-api-oauth-1024x550.png 1024w" sizes="(max-width: 1600px) 100vw, 1600px" /></a><p id="caption-attachment-8485" class="wp-caption-text">Calling Google Sheet API to Update Multiple Cell Values</p></div></li>
</ol>
<h2><span id="Write_data_to_Google_Spread_Sheet">Clear data to Google SpreadSheet using REST API Task</span></h2>
<h3 id="clear_a_sheet_of_all_values_while_preserving_formats">Clear a sheet of all values while preserving formats</h3>
<p>Lets clear a sheet of all values by REST API Task, Before processed we need sheet Id. So let&#8217;s get the SheetId by API Call. For more information about click <a href="https://developers.google.com/sheets/api/samples/sheet#clear_a_sheet_of_all_values_while_preserving_formats" target="_blank" rel="noopener">here.</a></p>
<ol>
<li>Drag and Drop two ZS REST API Tasks on the control flow designer and rename(Get Sheet ID and Clear Google Sheet of all values) it.</li>
<li>Double click on the First REST API(Get Sheet ID) Task to configure it.</li>
<li>In the Request Settings tab,
<ol>
<li>Enter the URL below. Change Sheet ID and API URL Parameters as per your need.<br />
<pre class="crayon-plain-tag">https://sheets.googleapis.com/v4/spreadsheets/{{User::varGoogleSpreadsheetID}}</pre>
<strong>Example URL without variables (some part masked with xxxxxxxx):</strong><br />
<pre class="crayon-plain-tag">https://sheets.googleapis.com/v4/spreadsheets/1tuGO3_-2JlSmyiHwX6xxxxxxxxCHrORJc</pre>
</li>
<li>Change Request Method to <strong><strong>GET.<br />
</strong></strong><a href="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-clear-google-spreadsheet-using-rest-api-oauth-getsheetid.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="wp-image-8515 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-clear-google-spreadsheet-using-rest-api-oauth-getsheetid.png" alt="REST API Task - Get Google Sheet ID" width="923" height="661" srcset="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-clear-google-spreadsheet-using-rest-api-oauth-getsheetid.png 923w, https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-clear-google-spreadsheet-using-rest-api-oauth-getsheetid-300x215.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-clear-google-spreadsheet-using-rest-api-oauth-getsheetid-768x550.png 768w" sizes="(max-width: 923px) 100vw, 923px" /></a>REST API Task &#8211; Get Google Sheet ID</li>
</ol>
</li>
<li>Now go to Response Settings Tab, Select Response content Type Json and Write Response Content Filter Expression. Check on Save Response Content. Select Save Mode to Variable and Create a New variable or select it.<br />
<strong>Example of Response Content Filter Expression for the first Sheet : </strong><br />
<pre class="crayon-plain-tag">$.sheets.[0].properties.sheetId</pre>
<div id="attachment_8517" style="width: 757px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-clear-google-spreadsheet-using-rest-api-oauth-savesheetid.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8517" class="wp-image-8517 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-clear-google-spreadsheet-using-rest-api-oauth-savesheetid.png" alt="REST API Task - Save Google Sheet ID into Variable" width="747" height="613" srcset="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-clear-google-spreadsheet-using-rest-api-oauth-savesheetid.png 747w, https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-clear-google-spreadsheet-using-rest-api-oauth-savesheetid-300x246.png 300w" sizes="(max-width: 747px) 100vw, 747px" /></a><p id="caption-attachment-8517" class="wp-caption-text">REST API Task &#8211; Save Google Sheet ID into Variable</p></div></li>
<li>Now, click on the Test Request/Response to check configures are ok.</li>
<li>Click on the OK button to save REST API Task configure setting UI.</li>
<li>Double click on the second REST API(Clear Google Sheet of all values) Task to configure it.</li>
<li>In the Request Settings tab,
<ol>
<li>Enter the URL below. Change Sheet ID and API URL Parameters as per your need.<br />
<pre class="crayon-plain-tag">https://sheets.googleapis.com/v4/spreadsheets/{{User::varGoogleSpreadsheetID}}:batchUpdate</pre>
<strong>Example URL without variables (some part masked with xxxxxxxx):</strong><br />
<pre class="crayon-plain-tag">https://sheets.googleapis.com/v4/spreadsheets/1tuGO3_-2JlSmyiHwX6xxxxxxxxCHrORJc:batchUpdate</pre>
</li>
<li>Change Request Method to <strong>POST. </strong>Enter Request Body as below and change a variable parameter as per your need.<br />
<pre class="crayon-plain-tag">{
  "requests": [
    {
      "updateCells": {
        "range": {
          "sheetId": {{User::varGoogleSheetID}}
        },
        "fields": "userEnteredValue"
      }
    }
  ]
}</pre>
</li>
<li>Change Request Content type to <strong>application/JSON.<br />
</strong></p>
<div id="attachment_8518" style="width: 1109px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-clear-google-spreadsheet-using-rest-api-oauth.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8518" class="wp-image-8518 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-clear-google-spreadsheet-using-rest-api-oauth.png" alt="REST API Task Configure - Clear sheet of all values" width="1099" height="763" srcset="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-clear-google-spreadsheet-using-rest-api-oauth.png 1099w, https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-clear-google-spreadsheet-using-rest-api-oauth-300x208.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-clear-google-spreadsheet-using-rest-api-oauth-768x533.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-clear-google-spreadsheet-using-rest-api-oauth-1024x711.png 1024w" sizes="(max-width: 1099px) 100vw, 1099px" /></a><p id="caption-attachment-8518" class="wp-caption-text">REST API Task Configure &#8211; Clear sheet of all values</p></div></li>
</ol>
</li>
<li>Click on the OK button to save REST API Task configure setting UI.</li>
<li>That&#8217;s all, You are ready to Run or Execute Task and verify data into Google spreadsheet.</li>
</ol>
<h3>Clears range cell values from a spreadsheet</h3>
<ol>
<li>Double click on REST API Task to configure it. Then, follow the way just like the previous section configures REST API Task.</li>
<li>Here you need to set the value of Variable &#8220;<strong>varSpreadsheetValues</strong>&#8221; to &#8220;<strong>clear</strong>&#8221; or you can change it directly in URL <strong>append to clear </strong>and value of variable &#8220;<strong>varRange</strong>&#8221; (Change cell range and sheet name) as per your need. For more information about it click <a href="https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/clear" target="_blank" rel="noopener">here.</a>
<ol>
<li>Enter the URL below. Change Sheet ID, Range designator(including Sheet name) and API URL Parameters as per your need.<br />
<pre class="crayon-plain-tag">https://sheets.googleapis.com/v4/spreadsheets/{{User::varGoogleSpreadsheetID}}/values/{{User::varRange}}:{{User::varSpreadsheetValues}}?valueInputOption={{User::varValueInputOption}}</pre>
<strong>Example URL without variables (some part masked with xxxxxxxx):</strong><br />
<pre class="crayon-plain-tag">https://sheets.googleapis.com/v4/spreadsheets/1tuGO3_-2JlSmyiHwX6xxxxxxxxCHrORJc/values/Sheet1!A2:B4:clear?valueInputOption=USER_ENTERED</pre>
</li>
</ol>
</li>
<li>Change Request Method to <strong>POST.</strong></li>
<li>Enter Request Body as below<br />
<pre class="crayon-plain-tag">{}</pre>
</li>
<li>Change Request Content type to <strong><strong><strong>application/JSON.</strong></strong></strong></li>
<li>That&#8217;s all, click on the Test Request/Response button and verify data into Google spreadsheet.</li>
</ol>
<h2><span id="Conclusion">Conclusion</span></h2>
<p>Google Drive API and Google Sheets API provide a great way to automate file-related functionality. However, to call Google API  you have to use the SDK / coding approach (e.g. C#, Java, Python, Ruby). Luckily ZappySys <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">SSIS PowerPack</a> provides a great way to integrate any Google API call via simple drag and drop approach without coding. Try out yourself see how long it takes to call virtually any REST API.</p>
<h2>References</h2>
<p>Finally, you can use the following links for more information:</p>
<ul>
<li><a href="https://zappysys.com/products/ssis-powerpack/ssis-json-generator-transform/" target="_blank" rel="noopener">JSON Generator Transform</a></li>
<li><a href="https://zappysys.com/products/ssis-powerpack/ssis-web-api-destination-connector/" target="_blank" rel="noopener">Web API Destination</a></li>
<li><a href="https://zappysys.com/products/ssis-powerpack/ssis-rest-api-web-service-task/" target="_blank" rel="noopener">REST API Task</a></li>
<li>Help File:
<ul>
<li><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/ssis-json-generator-transform.htm" target="_blank" rel="noopener">JSON Generator Transform</a></li>
<li><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/ssis-web-api-destination.htm" target="_blank" rel="noopener">Web API Destination</a></li>
<li><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/ssis-rest-api-web-service-task.htm" target="_blank" rel="noopener">REST API Task</a></li>
</ul>
</li>
</ul>
<p>The post <a href="https://zappysys.com/blog/write-update-google-sheet-ssis/">How to write/update Google Sheet in SSIS</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Get data from Google Search Console API in SSIS and ODBC Apps</title>
		<link>https://zappysys.com/blog/get-data-google-search-console-api-ssis-odbc-drivers/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Wed, 09 Oct 2019 20:22:28 +0000</pubDate>
				<category><![CDATA[JSON File / REST API Driver]]></category>
		<category><![CDATA[ODBC Gateway]]></category>
		<category><![CDATA[ODBC PowerPack]]></category>
		<category><![CDATA[SSIS JSON Source (File/REST)]]></category>
		<category><![CDATA[SSIS REST API Task]]></category>
		<category><![CDATA[google api]]></category>
		<category><![CDATA[oauth]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=8128</guid>

					<description><![CDATA[<p>Introduction In our previous few posts we saw how to call various google apis in SSIS.  In this post lets learn how to call Google Search Console API in SSIS or other ODBC Compatible Apps such as Power BI, Informatica, SSRS using API Drivers for ODBC About Google Search Console API (Google Webmaster API) If [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/get-data-google-search-console-api-ssis-odbc-drivers/">Get data from Google Search Console API in SSIS and ODBC Apps</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p>In our previous few posts we saw how to call various <a href="https://zappysys.com/blog/category/google-api/" target="_blank" rel="noopener">google apis</a> in SSIS.  In this post lets learn how to call Google Search Console API in SSIS or other ODBC Compatible Apps such as Power BI, Informatica, SSRS using <a href="https://zappysys.com/products/odbc-powerpack/">API Drivers for ODBC</a></p>
<div class="content_block" id="custom_post_widget-2523"><h2><span id="Prerequisites">Prerequisites</span></h2>
Before we perform the steps listed in this article, you will need to make sure the following prerequisites are met:
<ol style="margin-left: 1.5em;">
 	<li><abbr title="SQL Server Integration Services">SSIS</abbr> designer installed. Sometimes it is referred to as <abbr title="Business Intelligence Development Studio">BIDS</abbr> or <abbr title="SQL Server Data Tools">SSDT</abbr> (<a href="https://docs.microsoft.com/en-us/sql/ssdt/download-sql-server-data-tools-ssdt" target="_blank" rel="noopener">download it from the Microsoft site</a>).</li>
 	<li>Basic knowledge of SSIS package development using <em>Microsoft SQL Server Integration Services</em>.</li>
 	<li>Make sure <span style="text-decoration: underline;"><a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">ZappySys SSIS PowerPack</a></span> is installed (<a href="https://zappysys.com/products/ssis-powerpack/download/" target="_blank" rel="noopener">download it</a>, if you haven't already).</li>
 	<li>(<em>Optional step</em>)<em>.</em> <a href="https://zappysys.zendesk.com/hc/en-us/articles/360035974593" target="_blank" rel="noopener">Read this article</a>, if you are planning to deploy packages to a server and schedule their execution later.</li>
</ol></div>
<h2>About Google Search Console API (Google Webmaster API)</h2>
<p>If you are new to Google Search Console API (i.e. Webmaster API) then start <a href="https://developers.google.com/webmaster-tools/search-console-api-original/v3/prereqs" target="_blank" rel="noopener">from this link</a>. You can also <a href="https://developers.google.com/apis-explorer/#p/webmasters/v3/" target="_blank" rel="noopener">check API Explorer</a> here to test API requests.</p>
<p>Search API can be called by supplying either <a href="https://developers.google.com/webmaster-tools/search-console-api-original/v3/how-tos/authorizing#APIKey" target="_blank" rel="noopener">API key</a> in URL  or <a href="https://zappysys.com/blog/register-google-oauth-application-get-clientid-clientsecret/">use OAuth</a></p>
<p>Search Console V3 Covers following APIs (May add more in future)</p>
<div class="su-table su-table-alternate">
<table class="NYYWNC-h-b">
<tbody>
<tr>
<td><strong><span class="gwt-InlineLabel">API Name</span></strong></td>
<td><strong><span class="gwt-InlineLabel">Description</span></strong></td>
</tr>
<tr>
<td class="NYYWNC-h-c"><span class="gwt-InlineLabel">webmasters.searchanalytics.query</span></td>
<td class="NYYWNC-h-a"><span class="gwt-InlineLabel">Query your data with filters and parameters that you define. Returns zero or more rows grouped by the row keys that you define. You must define a date range of one or more days. When date is one of the group by values, any days without data are omitted from the result list. If you need to know which days have data, issue a broad date range query grouped by date for any metric, and see which day rows are returned.</span></td>
</tr>
<tr>
<td class="NYYWNC-h-c"><span class="gwt-InlineLabel">webmasters.sitemaps.delete</span></td>
<td class="NYYWNC-h-a"><span class="gwt-InlineLabel">Deletes a sitemap from this site.</span></td>
</tr>
<tr>
<td class="NYYWNC-h-c"><span class="gwt-InlineLabel">webmasters.sitemaps.get</span></td>
<td class="NYYWNC-h-a"><span class="gwt-InlineLabel">Retrieves information about a specific sitemap.</span></td>
</tr>
<tr>
<td class="NYYWNC-h-c"><span class="gwt-InlineLabel">webmasters.sitemaps.list</span></td>
<td class="NYYWNC-h-a"><span class="gwt-InlineLabel">Lists the sitemaps-entries submitted for this site, or included in the sitemap index file (if sitemapIndex is specified in the request).</span></td>
</tr>
<tr>
<td class="NYYWNC-h-c"><span class="gwt-InlineLabel">webmasters.sitemaps.submit</span></td>
<td class="NYYWNC-h-a"><span class="gwt-InlineLabel">Submits a sitemap for a site.</span></td>
</tr>
<tr>
<td class="NYYWNC-h-c"><span class="gwt-InlineLabel">webmasters.sites.add</span></td>
<td class="NYYWNC-h-a"><span class="gwt-InlineLabel">Adds a site to the set of the user&#8217;s sites in Search Console.</span></td>
</tr>
<tr>
<td class="NYYWNC-h-c"><span class="gwt-InlineLabel">webmasters.sites.delete</span></td>
<td class="NYYWNC-h-a"><span class="gwt-InlineLabel">Removes a site from the set of the user&#8217;s Search Console sites.</span></td>
</tr>
<tr>
<td class="NYYWNC-h-c"><span class="gwt-InlineLabel">webmasters.sites.get</span></td>
<td class="NYYWNC-h-a"><span class="gwt-InlineLabel">Retrieves information about specific site.</span></td>
</tr>
<tr>
<td class="NYYWNC-h-c"><span class="gwt-InlineLabel">webmasters.sites.list</span></td>
<td class="NYYWNC-h-a"><span class="gwt-InlineLabel">Lists the user&#8217;s Search Console sites.</span></td>
</tr>
</tbody>
</table>
</div>
<p><strong>Search Console API Call Example</strong></p>
<p>Here is simple example of Search Console API call. Below example returns all sites you added under your search console account.</p>
<p><strong>Request</strong></p><pre class="crayon-plain-tag">GET https://www.googleapis.com/webmasters/v3/sites?key={YOUR_API_KEY}</pre><p>
<strong>Response</strong></p><pre class="crayon-plain-tag">{
 "siteEntry": [
  {
   "siteUrl": "https://my-google-search-api-1.com/",
   "permissionLevel": "siteOwner"
  },
  {
   "siteUrl": "https://www.my-google-search-api-1.com/",
   "permissionLevel": "siteOwner"
  },
  {
   "siteUrl": "https://my-google-search-api-2.com/",
   "permissionLevel": "siteOwner"
  },
  {
   "siteUrl": "https://www.my-google-search-api-2.com/",
   "permissionLevel": "siteOwner"
  }
 ]
}</pre><p>
&nbsp;</p>
<h2>Step-By-Step &#8211; Call Search Console API in SSIS</h2>
<p>Now lets look at very simple API call to <a href="https://developers.google.com/webmaster-tools/search-console-api-original/v3/sites/list" target="_blank" rel="noopener">list search console sites</a></p>
<ol>
<li>Open SSIS Package</li>
<li>Drag and drop ZS REST API Task from SSIS tool box
<div style="width: 565px" class="wp-caption alignnone"><img loading="lazy" decoding="async" class="size-full" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/rest-api-task/ssis-rest-api-web-service-task-drag.png" alt="Drag and Drop ZS REST API Task from SSIS Toolbox" width="555" height="199" /><p class="wp-caption-text">Drag and Drop ZS REST API Task from SSIS Toolbox</p></div></li>
<li>Now double click REST API Task and configure (Skip <strong>Step 5</strong> if you use <a href="https://developers.google.com/webmaster-tools/search-console-api-original/v3/how-tos/authorizing#APIKey" target="_blank" rel="noopener">API Key</a> instead of OAuth).</li>
<li>Enter API URL you like to call. For This example we will use simple URL as below<br />
<strong>OAuth based Authentication</strong><br />
<pre class="crayon-plain-tag">https://www.googleapis.com/webmasters/v3/sites/</pre>
<strong>API Key based Authentication</strong><br />
<pre class="crayon-plain-tag">https://www.googleapis.com/webmasters/v3/sites/?key={YOUR_API_KEY}</pre>
</li>
<li>If you want to use OAuth based credentials then perform the following steps
<ol>
<li>Select <strong>URL from Connection </strong></li>
<li>Click <strong>New ZS-OAUTH</strong> connection from Dropdown</li>
<li>On the OAuth UI select <strong>Google as Provider</strong></li>
<li>Enter Scopes as below<br />
<pre class="crayon-plain-tag">https://www.googleapis.com/auth/webmasters
https://www.googleapis.com/auth/webmasters.readonly</pre>
</li>
<li>Click Generate Token. When you get Login Prompt enter your Google Account information and <strong>click Accept</strong></li>
<li>Click OK to Save OAuth UI</li>
</ol>
</li>
<li>This is how it will look like if you use OAuth Connection
<div id="attachment_8131" style="width: 1037px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/10/call-google-search-api-using-oauth-ssis-rest-api-task.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8131" class="size-full wp-image-8131" src="https://zappysys.com/blog/wp-content/uploads/2019/10/call-google-search-api-using-oauth-ssis-rest-api-task.png" alt="Call Google Search Console API using SSIS REST API Task (OAuth Authentication)" width="1027" height="869" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/call-google-search-api-using-oauth-ssis-rest-api-task.png 1027w, https://zappysys.com/blog/wp-content/uploads/2019/10/call-google-search-api-using-oauth-ssis-rest-api-task-300x254.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/10/call-google-search-api-using-oauth-ssis-rest-api-task-768x650.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/10/call-google-search-api-using-oauth-ssis-rest-api-task-1024x866.png 1024w" sizes="(max-width: 1027px) 100vw, 1027px" /></a><p id="caption-attachment-8131" class="wp-caption-text">Call Google Search Console API using SSIS REST API Task (OAuth Authentication)</p></div></li>
<li>Now click Test Request / Response to check if its working. You should get response like below</li>
</ol>
<p>&nbsp;</p>
<h2>Read from Search Console Analytics API (query)</h2>
<p>Now let&#8217;s look at how to <a href="https://developers.google.com/webmaster-tools/search-console-api-original/v3/searchanalytics/query" target="_blank" rel="noopener">call Search Console Analytics API (i.e. query)</a> for Specified Site and extract data in tabular format using <a href="https://zappysys.com/products/ssis-powerpack/ssis-json-file-source/" target="_blank" rel="noopener">ZS JSON Source</a>. In below example we will obtain search Impression, clicks, position etc for specified site. We will aggregate this over date and country (dimensions).</p>
<p>In this section you will learn how to use JSON Source Adapter to extract data from JSON file (In this case its Web URL).</p>
<ol>
<li>Firstly, You need to <b>Download and Install</b> SSIS <a href="https://zappysys.com/products/ssis-powerpack/download/" target="_blank" rel="noopener">ZappySys PowerPack.</a></li>
<li>Once you finished first step, Open Visual Studio and Create New SSIS Package Project.</li>
<li>Now, Drag and Drop SSIS <b>Data Flow Task</b> from SSIS Toolbox.<br />
<img decoding="async" class="figureimage" title="SSIS Data Flow Task - Drag and Drop" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/drag-and-drop-data-flow-task.png" alt="SSIS Data Flow Task - Drag and Drop" /></li>
<li>Double click on the Data Flow task to see Data Flow designer surface.</li>
<li>From the SSIS toolbox drag and drop JSON Source on the Data Flow designer surface.<br />
<img decoding="async" class="figureimage" title="SSIS JSON Source - Drag and Drop" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/json-source/ssis-json-source-adapter-drag.png" alt="SSIS JSON Source - Drag and Drop" /></li>
<li>Double click JSON Source and configure like below
<ol>
<li>Enter URL as below. Notice two things, first we used <strong>&lt;&lt;somedata,FUN_URLENC&gt;&gt;</strong> <a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/ssis-format-specifiers.htm" target="_blank" rel="noopener">placeholder function</a> to encode <strong>:</strong> and <strong>//</strong> in the URL so it <a href="https://zappysys.zendesk.com/hc/en-us/articles/360012261713">become %2F %3A</a>. We use <pre class="crayon-plain-tag">--dont-escape--</pre>  suffix at the end.<br />
<strong>For OAuth based Credentials</strong><br />
<pre class="crayon-plain-tag">https://www.googleapis.com/webmasters/v3/sites/&lt;&lt;https://mysite.com,FUN_URLENC&gt;&gt;/searchAnalytics/query--dont-escape--</pre>
<strong>For API Key based Credentials</strong><br />
<pre class="crayon-plain-tag">https://www.googleapis.com/webmasters/v3/sites/&lt;&lt;https://mysite.com,FUN_URLENC&gt;&gt;/searchAnalytics/query/?key={YOUR_API_KEY}--dont-escape--</pre>
</li>
<li>Check Use Credentials and select OAuth connection (created earlier) (if you are using API key in URL then skip this step).</li>
<li>Select <strong>POST</strong> as HTTP Method</li>
<li>Enter Body for Query. Here are <a href="https://developers.google.com/webmaster-tools/search-console-api-original/v3/how-tos/search_analytics" target="_blank" rel="noopener">some examples</a> for various queries you can use. For our case we want to group by date and country so use below<br />
<pre class="crayon-plain-tag">{
"startDate": "2019-01-01",
"endDate": "2019-01-10",
"dimensions" : ["date","country"]
}</pre>
</li>
<li>Select <strong>Content Type</strong> as <pre class="crayon-plain-tag">application/json</pre>  from Content Type drop down.</li>
<li>Select Filter or enter as  <pre class="crayon-plain-tag">$.rows[*]</pre></li>
<li>Now go to Extract Multiple Arrays Tab and <strong>Check Array Flattening Option</strong> (on older version it was on the different Tab)</li>
</ol>
</li>
<li>Click Preview and you will see your Google Search Console API data as below.
<div id="attachment_8138" style="width: 914px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/10/read-google-search-console-api-example.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8138" class="size-full wp-image-8138" src="https://zappysys.com/blog/wp-content/uploads/2019/10/read-google-search-console-api-example.png" alt="Read from Google Search API Console (Analytics Query Endpoint) - JSON Source" width="904" height="827" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/read-google-search-console-api-example.png 904w, https://zappysys.com/blog/wp-content/uploads/2019/10/read-google-search-console-api-example-300x274.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/10/read-google-search-console-api-example-768x703.png 768w" sizes="(max-width: 904px) 100vw, 904px" /></a><p id="caption-attachment-8138" class="wp-caption-text">Read from Google Search API Console (Analytics Query Endpoint) &#8211; JSON Source</p></div></li>
</ol>
<h2>Loading Google Search Console API data into SQL Server / Other Target</h2>
<div class="content_block" id="custom_post_widget-5617"><p>ZappySys SSIS PowerPack makes it easy to load data from various sources such as REST, SOAP, JSON, XML, CSV or from other source into SQL Server, or PostgreSQL, or Amazon Redshift, or other  targets. The <strong>Upsert Destination</strong> component allows you to automatically insert new records and update existing ones based on key columns. Below are the detailed steps to configure it.</p>
<h3>Step 1: Add Upsert Destination to Data Flow</h3>
<ol>
<li>Drag and drop the <strong>Upsert Destination</strong> component from the SSIS Toolbox.</li>
<li>Connect your source component (e.g., JSON / REST / Other Source) to the Upsert Destination.</li>
</ol>
<div class="wp-caption aligncenter">
<a href="https://zappysys.com/blog/wp-content/uploads/2017/08/ssis-data-flow-drag-drop-upsert-destination.png">
<img loading="lazy" decoding="async" class="size-full" alt="" src="https://zappysys.com/blog/wp-content/uploads/2017/08/ssis-data-flow-drag-drop-upsert-destination.png" /></a>
<p class="wp-caption-text">SSIS - Data Flow - Drang and Drop Upsert Destination Component</p>
</div>
<h3>Step 2: Configure Target Connection</h3>
<ol>
<li>Double-click the <strong>Upsert Destination</strong> component to open the configuration window.</li>
<li>Under <strong>Connection</strong>, select an existing target connection or click <strong>NEW</strong> to create a new connection.
<ul>
<li>Example: SQL Server, or PostgreSQL, or Amazon Redshift.</li>
</ul>
</li>
</ol>
<h3>Step 3: Select or Create Target Table</h3>
<ol>
<li>In the <strong>Target Table</strong> dropdown, select the table where you want to load data.</li>
<li>Optionally, click <strong>NEW</strong> to create a new table based on the source columns.</li>
</ol>
<div class="wp-caption aligncenter">
<a href="https://zappysys.com/blog/wp-content/uploads/2020/09/upsert-destination-configuration.png">
<img loading="lazy" decoding="async" class="size-full" alt="" src="https://zappysys.com/blog/wp-content/uploads/2020/09/upsert-destination-configuration.png" /></a>
<p class="wp-caption-text">Configure SSIS Upsert Destination Connection - Loading data (REST / SOAP / JSON / XML /CSV) into SQL Server or other target using SSIS</p>
</div>
<h3>Step 4: Map Columns</h3>
<ol>
<li>Go to the <strong>Mappings</strong> tab.</li>
<li>Click <strong>Auto Map</strong> to map source columns to target columns by name.</li>
<li>Ensure you <strong>check the Primary key column(s)</strong> that will determine whether a record is inserted or updated.</li>
<li>You can manually adjust the mappings if necessary.</li>
</ol>
 <div class="wp-caption aligncenter">
<a href="https://zappysys.com/blog/wp-content/uploads/2020/09/upsert-destination-key.png">
<img loading="lazy" decoding="async" class="size-full" alt="" src="https://zappysys.com/blog/wp-content/uploads/2020/09/upsert-destination-key.png" /></a>
<p class="wp-caption-text">SSIS Upsert Destination - Columns Mappings</p>
</div>
<h3>Step 5: Save Settings</h3>
<ul>
<li>Click <strong>OK</strong> to save the Upsert Destination configuration.</li>
</ul>
<h3>Step 6: Optional: Add Logging or Analysis</h3>
<ul>
<li>You may add extra destination components to log the number of inserted vs. updated records for monitoring or auditing purposes.</li>
</ul>
<h3>Step 7: Execute the Package</h3>
<ul>
<li>Run your SSIS package and verify that the data is correctly inserted and updated in the target table.</li>
</ul>
<div class="wp-caption aligncenter">
<a href="https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-upsert-destination-execute.png">
<img loading="lazy" decoding="async" class="size-full" alt="" src="https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-upsert-destination-execute.png" /></a>
<p class="wp-caption-text">SSIS Upsert Destination Execution</p>
</div></div>
<p>&nbsp;</p>
<h2>Import Google Search Console API data in Reporting / other ETL tools (ODBC Usecase)</h2>
<p>There will be a time when you dont want to use SSIS connector like mentioned in previous sections but extract Google Search API data in Reporting Tools / Other ETL Platform.  Good news is you can use <a href="https://zappysys.com/products/odbc-powerpack/odbc-json-rest-api-driver/" target="_blank" rel="noopener">ZappySys ODBC Driver for JSON / REST API</a> in ODBC Apps. See few popular ODBC Apps below.</p>
<ul>
<li>Power BI connection for Google Search Console API</li>
<li>Excel connection for Google Search Console API</li>
<li>Informatica connection for Google Search Console API</li>
<li>MS Access connection for Google Search Console API</li>
<li>C# , PowerShell, VB.net connection for Google Search Console API</li>
</ul>
<div id="attachment_6416" style="width: 766px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/01/odbc-json-driver-generate-quickbooks-query.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6416" class="size-full wp-image-6416" src="https://zappysys.com/blog/wp-content/uploads/2019/01/odbc-json-driver-generate-quickbooks-query.png" alt="Preview / Generate Query in JSON Driver / XML Driver" width="756" height="432" srcset="https://zappysys.com/blog/wp-content/uploads/2019/01/odbc-json-driver-generate-quickbooks-query.png 756w, https://zappysys.com/blog/wp-content/uploads/2019/01/odbc-json-driver-generate-quickbooks-query-300x171.png 300w" sizes="(max-width: 756px) 100vw, 756px" /></a><p id="caption-attachment-6416" class="wp-caption-text">Preview / Generate Query in JSON Driver / XML Driver</p></div>
<h2></h2>
<h2>Load Google Search Console API in SQL Server without any ETL</h2>
<p>Now let&#8217;s look at even more interesting integration scenario. If you have SQL Server and like to load Google Search Console API without any ETL then you can use <a href="https://zappysys.com/products/odbc-powerpack/data-gateway/" target="_blank" rel="noopener">Data Gateway</a></p>
<p>Read this article to learn how to <a href="https://zappysys.com/blog/import-rest-api-json-sql-server/" target="_blank" rel="noopener">load REST API in SQL Server</a> without any coding (Use just T-SQL) .</p>
<p>You can write query like below to load data inside SQL Table.</p><pre class="crayon-plain-tag">SELECT * FROM OPENQUERY([MY_LINKED_SERVER]
, 'SELECT * FROM $
WITH(
	 Src=''https://www.googleapis.com/webmasters/v3/sites/&lt;&lt;https://mysite.com,FUN_URLENC&gt;&gt;/searchAnalytics/query/?key={YOUR_API_KEY}--dont-escape--''
	,Filter=''$.rows[*]''
	,RequestData=''{
"startDate": "2019-01-01",
"endDate": "2019-01-10",
"dimensions" : ["date","country"]
}''
	,RequestContentTypeCode=''ApplicationJson''
	,Header=''cache-control: no-cache || Accept: */*''
	,RequestMethod=''POST''
	,EnableArrayFlattening=''True''
)')</pre><p>
<div id="attachment_5293" style="width: 899px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/11/query-rest-api-sql-server-linked-server-openquery-zappysys-data-gateway.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5293" class="size-full wp-image-5293" src="https://zappysys.com/blog/wp-content/uploads/2018/11/query-rest-api-sql-server-linked-server-openquery-zappysys-data-gateway.png" alt="SSMS Output - Query REST API via Linked Server OPENQUERY statement (Connect to ZappySys Data Gateway)" width="889" height="481" srcset="https://zappysys.com/blog/wp-content/uploads/2018/11/query-rest-api-sql-server-linked-server-openquery-zappysys-data-gateway.png 889w, https://zappysys.com/blog/wp-content/uploads/2018/11/query-rest-api-sql-server-linked-server-openquery-zappysys-data-gateway-300x162.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/11/query-rest-api-sql-server-linked-server-openquery-zappysys-data-gateway-768x416.png 768w" sizes="(max-width: 889px) 100vw, 889px" /></a><p id="caption-attachment-5293" class="wp-caption-text">SSMS Output &#8211; Query REST API via Linked Server OPENQUERY statement (Connect to ZappySys Data Gateway)</p></div>
<h2>Conclusion</h2>
<p>So in this post we saw how easy it is to achieve total REST API integration in SSIS using JSON Connector. We also saw how to use ODBC Drivers to query REST API data inside Apps like Excel, MS Access, Informatica and other ODBC Apps using ODBC JSON / REST API driver. If you are SSIS User download <a href="https://zappysys.com/products/ssis-powerpack/">SSIS PowerPack and try for FREE</a> and if you don&#8217;t have SSIS in house and want to try more generic approach then <a href="https://zappysys.com/products/odbc-powerpack/" target="_blank" rel="noopener">Download ODBC PowerPack Drivers for FREE Trial</a>.</p>
<p>The post <a href="https://zappysys.com/blog/get-data-google-search-console-api-ssis-odbc-drivers/">Get data from Google Search Console API in SSIS and ODBC Apps</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to Make MailPlus OAuth 1.0a REST API Call in SSIS</title>
		<link>https://zappysys.com/blog/make-mailplus-oauth-1-0a-rest-api-call-ssis/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Sat, 21 Sep 2019 06:44:08 +0000</pubDate>
				<category><![CDATA[REST API]]></category>
		<category><![CDATA[REST API Integration]]></category>
		<category><![CDATA[SSIS JSON Source (File/REST)]]></category>
		<category><![CDATA[SSIS OAuth Connection]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[mailplus]]></category>
		<category><![CDATA[oauth]]></category>
		<category><![CDATA[oauth1.0]]></category>
		<category><![CDATA[ssis]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=8043</guid>

					<description><![CDATA[<p>Introduction In our previous article we see How to read call REST API data in SSIS. Now in this article, we will see How to Make MailPlus OAuth 1.0a REST API Call in SSIS and load into SQL Server. This blog mainly focuses on SSIS approach but steps mentioned to call MailPlus Oauth 1.0a REST API Call [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/make-mailplus-oauth-1-0a-rest-api-call-ssis/">How to Make MailPlus OAuth 1.0a REST API Call in SSIS</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2><span id="Introduction">Introduction</span></h2>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2019/09/MailPlus.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="wp-image-8044 size-thumbnail alignleft" title="PayPal" src="https://zappysys.com/blog/wp-content/uploads/2019/09/MailPlus-150x150.png" alt="MailPlus" width="150" height="150" srcset="https://zappysys.com/blog/wp-content/uploads/2019/09/MailPlus-150x150.png 150w, https://zappysys.com/blog/wp-content/uploads/2019/09/MailPlus.png 300w" sizes="(max-width: 150px) 100vw, 150px" /></a>In our previous article we see <a href="https://zappysys.com/blog/call-rest-api-using-ssis-web-service-task/" target="_blank" rel="noopener">How to read call REST API data in SSIS</a>. Now in this article, we will see <strong>How to Make MailPlus OAuth 1.0a REST API Call in SSIS</strong> and load into SQL Server. This blog mainly focuses on SSIS approach but steps mentioned to call MailPlus Oauth 1.0a REST API Call can be useful for any developer regardless of which programming language or tool set you use. We will also see how to configure OAuth1.0 connection.</p>
<p>We will go through the steps to make temporary lists API call which Returns a list of all available temporary lists and we load it into MS SQL Server.</p>
<p>In nutshell, this post will focus on how to Make MailPlus OAuth 1.0a REST API Call in SSIS.</p>
<p>&nbsp;</p>
<h2><span id="Prerequisites">Prerequisites</span></h2>
<p>Before we perform the steps listed in this article, you will need to make sure the following prerequisites are met:</p>
<ol>
<li><abbr title="SQL Server Integration Services">SSIS</abbr> designer installed. Sometimes it is referred to as <abbr title="Business Intelligence Development Studio">BIDS</abbr> or <abbr title="SQL Server Data Tools">SSDT</abbr> (<a href="https://docs.microsoft.com/en-us/sql/ssdt/download-sql-server-data-tools-ssdt" target="_blank" rel="noopener">download it from Microsoft site</a>).</li>
<li>Basic knowledge of SSIS package development using <em>Microsoft SQL Server Integration Services</em>.</li>
<li>Make sure <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">ZappySys SSIS PowerPack</a> is installed (<a href="https://zappysys.com/products/ssis-powerpack/download/" target="_blank" rel="noopener">download it</a>).</li>
<li>Credentials of MailPlus API.</li>
</ol>
<h2><span id="What_is_Walmart"><span id="What_is_WordPress">What is MailPlus?</span></span></h2>
<p><a href="https://spotler.com/mailplus-spotler" target="_blank" rel="noopener">MailPlus</a>, founded in 2004, is the number one ESP (Email Service Provider) in the Netherlands. MailPlus is an award winning solution that enables companies to send out their online communication, such as newsletters, easily and professionally.</p>
<h2>Where to get the MailPlus API Key and Secret?</h2>
<p>After activation of the MailPlus REST API in a MailPlus account you can get unique Key and Secret from there. The MailPlus REST API uses Oauth 1.0a (one leg, see Oauth 1.0a (One Leg) ). A consumer key and secret are required to access your MailPlus account. These can be created in your MailPlus account. The Key and Secret are always available via the startpage of a MailPlus account. Click on the tab “MailPlus Settings” and then “MailPlus Rest API”. In MailPlus eCom an authentication is already available.</p>
<h2>Call MailPlus Oauth 1.0a <span id="Step-By-Step_8211_CallSemantics3_REST_API_using_SSIS">REST API using SSIS</span></h2>
<p>Let’s start with an example. We use SSIS JSON Source component to make the call to MailPlus API, we will read list of all available temporary lists and load into SQL Server. First of All, Open Visual Studio and Create New SSIS Package Project.</p>
<ol>
<li>First of All, Drag and drop Data Flow Task from SSIS Toolbox and double click it to edit.
<div id="attachment_7934" style="width: 470px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-drag-drop-data-flow-task.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7934" class="wp-image-7934 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-drag-drop-data-flow-task.png" alt="Drag and Drop SSIS Data Flow Task from SSIS Toolbox" width="460" height="155" srcset="https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-drag-drop-data-flow-task.png 460w, https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-drag-drop-data-flow-task-300x101.png 300w" sizes="(max-width: 460px) 100vw, 460px" /></a><p id="caption-attachment-7934" class="wp-caption-text">Drag and Drop : SSIS Data Flow Task from SSIS Toolbox</p></div></li>
<li>From the SSIS toolbox drag and drop JSON Source on the data flow designer surface.
<div id="attachment_3766" style="width: 604px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-json-source-for-getting-basic-profile-from-linkedin.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3766" class="wp-image-3766 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-json-source-for-getting-basic-profile-from-linkedin.png" alt="Drag and Drop JSON Source Component" width="594" height="268" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-json-source-for-getting-basic-profile-from-linkedin.png 594w, https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-json-source-for-getting-basic-profile-from-linkedin-300x135.png 300w" sizes="(max-width: 594px) 100vw, 594px" /></a><p id="caption-attachment-3766" class="wp-caption-text">Drag and Drop JSON Source Component</p></div></li>
<li>Double click JSON Source and enter the following URL as below to get list of all available temporary lists and create the OAuth 1.0 Connection.<br />
<pre class="crayon-plain-tag">https://restapi.mailplus.nl/integrationservice-1.1.0/templist</pre>
<div id="attachment_8047" style="width: 826px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-mailplus-oauth1.0-connection.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8047" class="wp-image-8047 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-mailplus-oauth1.0-connection.png" alt="MailPlus Oauth 1.0a Connection" width="816" height="906" srcset="https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-mailplus-oauth1.0-connection.png 816w, https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-mailplus-oauth1.0-connection-270x300.png 270w, https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-mailplus-oauth1.0-connection-768x853.png 768w" sizes="(max-width: 816px) 100vw, 816px" /></a><p id="caption-attachment-8047" class="wp-caption-text">MailPlus Oauth 1.0a Connection</p></div></li>
<li>Finally click on Preview button to load the data.
<div id="attachment_8048" style="width: 730px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-mailplus-preview-data.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8048" class="wp-image-8048 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-mailplus-preview-data.png" alt="MailPlus Preview Data" width="720" height="755" srcset="https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-mailplus-preview-data.png 720w, https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-mailplus-preview-data-286x300.png 286w" sizes="(max-width: 720px) 100vw, 720px" /></a><p id="caption-attachment-8048" class="wp-caption-text">MailPlus Preview Data</p></div></li>
<li>You can find more MailPlus API Lists here on <a href="https://restdoc.mailplus.nl/doc/" target="_blank" rel="noopener">MailPlus Interactive API Documentation link.</a></li>
<li>That&#8217;s it we are ready to load all available temporary lists in SQL Server.</li>
</ol>
<h3><span id="Load_Walmart_API_data_into_SQL_Server">Load MailPlus REST API data into SQL Server</span></h3>
<div class="content_block" id="custom_post_widget-5617"><p>ZappySys SSIS PowerPack makes it easy to load data from various sources such as REST, SOAP, JSON, XML, CSV or from other source into SQL Server, or PostgreSQL, or Amazon Redshift, or other  targets. The <strong>Upsert Destination</strong> component allows you to automatically insert new records and update existing ones based on key columns. Below are the detailed steps to configure it.</p>
<h3>Step 1: Add Upsert Destination to Data Flow</h3>
<ol>
<li>Drag and drop the <strong>Upsert Destination</strong> component from the SSIS Toolbox.</li>
<li>Connect your source component (e.g., JSON / REST / Other Source) to the Upsert Destination.</li>
</ol>
<div class="wp-caption aligncenter">
<a href="https://zappysys.com/blog/wp-content/uploads/2017/08/ssis-data-flow-drag-drop-upsert-destination.png">
<img loading="lazy" decoding="async" class="size-full" alt="" src="https://zappysys.com/blog/wp-content/uploads/2017/08/ssis-data-flow-drag-drop-upsert-destination.png" /></a>
<p class="wp-caption-text">SSIS - Data Flow - Drang and Drop Upsert Destination Component</p>
</div>
<h3>Step 2: Configure Target Connection</h3>
<ol>
<li>Double-click the <strong>Upsert Destination</strong> component to open the configuration window.</li>
<li>Under <strong>Connection</strong>, select an existing target connection or click <strong>NEW</strong> to create a new connection.
<ul>
<li>Example: SQL Server, or PostgreSQL, or Amazon Redshift.</li>
</ul>
</li>
</ol>
<h3>Step 3: Select or Create Target Table</h3>
<ol>
<li>In the <strong>Target Table</strong> dropdown, select the table where you want to load data.</li>
<li>Optionally, click <strong>NEW</strong> to create a new table based on the source columns.</li>
</ol>
<div class="wp-caption aligncenter">
<a href="https://zappysys.com/blog/wp-content/uploads/2020/09/upsert-destination-configuration.png">
<img loading="lazy" decoding="async" class="size-full" alt="" src="https://zappysys.com/blog/wp-content/uploads/2020/09/upsert-destination-configuration.png" /></a>
<p class="wp-caption-text">Configure SSIS Upsert Destination Connection - Loading data (REST / SOAP / JSON / XML /CSV) into SQL Server or other target using SSIS</p>
</div>
<h3>Step 4: Map Columns</h3>
<ol>
<li>Go to the <strong>Mappings</strong> tab.</li>
<li>Click <strong>Auto Map</strong> to map source columns to target columns by name.</li>
<li>Ensure you <strong>check the Primary key column(s)</strong> that will determine whether a record is inserted or updated.</li>
<li>You can manually adjust the mappings if necessary.</li>
</ol>
 <div class="wp-caption aligncenter">
<a href="https://zappysys.com/blog/wp-content/uploads/2020/09/upsert-destination-key.png">
<img loading="lazy" decoding="async" class="size-full" alt="" src="https://zappysys.com/blog/wp-content/uploads/2020/09/upsert-destination-key.png" /></a>
<p class="wp-caption-text">SSIS Upsert Destination - Columns Mappings</p>
</div>
<h3>Step 5: Save Settings</h3>
<ul>
<li>Click <strong>OK</strong> to save the Upsert Destination configuration.</li>
</ul>
<h3>Step 6: Optional: Add Logging or Analysis</h3>
<ul>
<li>You may add extra destination components to log the number of inserted vs. updated records for monitoring or auditing purposes.</li>
</ul>
<h3>Step 7: Execute the Package</h3>
<ul>
<li>Run your SSIS package and verify that the data is correctly inserted and updated in the target table.</li>
</ul>
<div class="wp-caption aligncenter">
<a href="https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-upsert-destination-execute.png">
<img loading="lazy" decoding="async" class="size-full" alt="" src="https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-upsert-destination-execute.png" /></a>
<p class="wp-caption-text">SSIS Upsert Destination Execution</p>
</div></div>
<h2><span id="Conclusion">Conclusion</span></h2>
<p>After all, we saw you how to extract information from REST API such as MailPlus REST API using OAuth1.0 Connection and load into SQL Server. We also learned techniques like How to create OAuth1.0 Connection. To explore many other scenarios not discussed in this article download <a href="https://zappysys.com/products/ssis-powerpack/">SSIS PowerPack from here (includes 70+ Components)</a>.</p>
<h2><span id="References">References</span></h2>
<p>Finally, you can use the following links for more information:</p>
<ul>
<li style="list-style-type: none;">
<ul>
<li>Help File: <a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/json-source.htm" target="_blank" rel="noopener">JSON Source(REST API or File)</a></li>
<li><a href="https://restdoc.mailplus.nl/doc/" target="_blank" rel="noopener">MailPlus API</a></li>
</ul>
</li>
</ul>
<p>The post <a href="https://zappysys.com/blog/make-mailplus-oauth-1-0a-rest-api-call-ssis/">How to Make MailPlus OAuth 1.0a REST API Call in SSIS</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to read PayPal API data in SSIS</title>
		<link>https://zappysys.com/blog/read-paypal-api-data-ssis/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Sat, 24 Aug 2019 08:36:05 +0000</pubDate>
				<category><![CDATA[REST API]]></category>
		<category><![CDATA[REST API Integration]]></category>
		<category><![CDATA[SSIS JSON Source (File/REST)]]></category>
		<category><![CDATA[SSIS Logging Task]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[oauth]]></category>
		<category><![CDATA[oauth2]]></category>
		<category><![CDATA[paypal]]></category>
		<category><![CDATA[ssis]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=7822</guid>

					<description><![CDATA[<p>Introduction In this article, we will see how to read PayPal API data in SSIS and load into SQL Server. This blog mainly focuses on SSIS approach but steps mentioned to call PayPal APIs can be useful for any developer regardless of which programming language or tool set you use. We will also see How to send [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/read-paypal-api-data-ssis/">How to read PayPal API data in SSIS</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2><span id="Introduction">Introduction</span></h2>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2019/08/paypal-logo-preview.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="alignleft wp-image-7825 size-thumbnail" title="PayPal" src="https://zappysys.com/blog/wp-content/uploads/2019/08/paypal-logo-preview-150x150.png" alt="PayPal" width="150" height="150" srcset="https://zappysys.com/blog/wp-content/uploads/2019/08/paypal-logo-preview-150x150.png 150w, https://zappysys.com/blog/wp-content/uploads/2019/08/paypal-logo-preview-300x300.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/08/paypal-logo-preview.png 512w" sizes="(max-width: 150px) 100vw, 150px" /></a>In this article, we will see how to read PayPal API data in SSIS and load into SQL Server. This blog mainly focuses on SSIS approach but steps mentioned to call PayPal APIs can be useful for any developer regardless of which programming language or tool set you use. We will also see How to send basic Authorization header along with body in OAuth2.</p>
<p>We will go through the steps to read data from PayPal Transactions and Load into MS SQL Server.</p>
<p>In nutshell, this post will focus on how to make PayPal API Call using SSIS.</p>
<p>&nbsp;</p>
<h2><span id="Prerequisites">Prerequisites</span></h2>
<p>Before we perform the steps listed in this article, you will need to make sure the following prerequisites are met:</p>
<ol>
<li><abbr title="SQL Server Integration Services">SSIS</abbr> designer installed. Sometimes it is referred to as <abbr title="Business Intelligence Development Studio">BIDS</abbr> or <abbr title="SQL Server Data Tools">SSDT</abbr> (<a href="https://docs.microsoft.com/en-us/sql/ssdt/download-sql-server-data-tools-ssdt" target="_blank" rel="noopener">download it from Microsoft site</a>).</li>
<li>Basic knowledge of SSIS package development using <em>Microsoft SQL Server Integration Services</em>.</li>
<li>Make sure <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">ZappySys SSIS PowerPack</a> is installed (<a href="https://zappysys.com/products/ssis-powerpack/download/" target="_blank" rel="noopener">download it</a>).</li>
<li>Credentials of PayPal API. Click <a href="https://developer.paypal.com/developer/applications/" target="_blank" rel="noopener">here</a> to create API.</li>
</ol>
<h2><span id="What_is_Walmart"><span id="What_is_WordPress">What is PayPal?</span></span></h2>
<p><a href="https://www.paypal.com" target="_blank" rel="noopener">PayPal</a> is an American company operating a worldwide online payments system that supports online money transfers and serves as an electronic alternative to traditional paper methods like checks and money orders. The company operates as a payment processor for online vendors, auction sites, and many other commercial users, for which it charges a fee in exchange for benefits such as one-click transactions and password memory. PayPal&#8217;s payment system, also called PayPal, is considered a type of payment rail.</p>
<h2 class="dx-content-title">Get Started with PayPal API</h2>
<p>If you have need to automate PayPal operations (e.g. read / write / update / delete ) then you can use PayPal REST API. Before you can integrate a PayPal product or solution, you must set up your development environment to get OAuth 2.0 client ID and secret credentials for the sandbox and live environments. You exchange these credentials for an access token that authorizes your REST API calls. To test your web and mobile apps, you create sandbox accounts.</p>
<h3 id="get-credentials" class="dx-anchor">Get PayPal credentials</h3>
<p>To generate OAuth 2.0 credentials for the sandbox and live environments:</p>
<ol>
<li><a href="https://www.paypal.com/signin?returnUri=https%3A%2F%2Fdeveloper.paypal.com%2Fdeveloper%2Fapplications" target="_blank" rel="noopener"><strong>Log into Dashboard</strong></a> and type your PayPal personal or business account email and password.</li>
<li>In the <strong>REST API apps</strong> section, click <strong>Create App</strong>. The purpose of this app is to generate your credentials.</li>
<li>Type a name for your app and click <strong>Create App</strong>. The page shows your sandbox app information, which includes your credentials.<br />
<blockquote class="dx-blockquote-note"><p><strong>Note:</strong> To show your live app information, toggle to <strong>Live</strong>.</p></blockquote>
</li>
<li>Copy and save the client ID and secret for your sandbox app.
<div id="attachment_7837" style="width: 730px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/08/paypal-client-ID-and-secret.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7837" class="wp-image-7837 size-medium_large" src="https://zappysys.com/blog/wp-content/uploads/2019/08/paypal-client-ID-and-secret-768x443.png" alt="PayPal Client ID and Secret" width="720" height="415" srcset="https://zappysys.com/blog/wp-content/uploads/2019/08/paypal-client-ID-and-secret-768x443.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/08/paypal-client-ID-and-secret-300x173.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/08/paypal-client-ID-and-secret.png 940w" sizes="(max-width: 720px) 100vw, 720px" /></a><p id="caption-attachment-7837" class="wp-caption-text">PayPal Client ID and Secret</p></div></li>
<li>Review your app details and save your app.</li>
</ol>
<h2><span id="Read_Walmart_API_Data_using_SSIS_JSON_Source"><span id="Read_data_fromWordPressusing_SSIS_JSON_Source">Read PayPal API Data using SSIS JSON Source</span></span></h2>
<p>Let’s start with an example. We use SSIS JSON Source component to make the call to PayPal API, we will read PayPal data and load into SQL Server. First of All, Open Visual Studio and Create New SSIS Package Project.</p>
<p>In REST API calls, include the URL to the API service for the environment:</p>
<ul class="compact">
<li>Sandbox: <code>https://api.sandbox.paypal.com</code></li>
<li>Live: <code>https://api.paypal.com</code></li>
</ul>
<h3><span id="GetDynamic_Token_Configure_ZS-HTTP_Connection"><span id="Step-1_GetDynamic_Token_Configure_ZS-HTTP_Connection">Create Basic OAuth Client Credentials Grant (Configure ZS-OAuth Connection)</span></span></h3>
<p>To get API response data using SOAP / REST API call, you need to get an API Token from your token request URL. Follow the steps mentioned below to get API Token:</p>
<ol>
<li>Now, Right Click on Connection Managers Window, and one Context menu appears for creating a new connection manager.
<div id="attachment_4382" style="width: 730px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/07/ssis-connection-manager-create-new-connection-e1531164541889.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4382" class="wp-image-4382 size-medium_large" src="https://zappysys.com/blog/wp-content/uploads/2018/07/ssis-connection-manager-create-new-connection-768x462.png" alt="Connection Manager Window: Create New Connection" width="720" height="433" /></a><p id="caption-attachment-4382" class="wp-caption-text">Connection Manager Window: Create New Connection</p></div></li>
<li>Select ZS-OAuth Connection Manager from the list of Connection Managers and, double-click on it or click on Add button to add a new Connection Manager. By Default, The created connection manager is of Package-Level. You can set Project Level Connection manager too If you want.
<div id="attachment_4724" style="width: 681px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-connection-managers-list-select-zs-oauth-connection-manager.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4724" class="wp-image-4724 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-connection-managers-list-select-zs-oauth-connection-manager.png" alt="SSIS Connection Maangers List: Select O-AUTH Connection Manager" width="671" height="549" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-connection-managers-list-select-zs-oauth-connection-manager.png 671w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-connection-managers-list-select-zs-oauth-connection-manager-300x245.png 300w" sizes="(max-width: 671px) 100vw, 671px" /></a><p id="caption-attachment-4724" class="wp-caption-text">SSIS Connection Mangers List: Select O-AUTH Connection Manager</p></div></li>
<li>In the SSIS ZS OAuth Connection Manager, Select Provider as Custom, select version as OAuth2 and select Grant Type as  Client Credentials Grant. Enter the credentials and access token url and test the connection.<br />
<pre class="crayon-plain-tag">https://api.sandbox.paypal.com/v1/oauth2/token</pre>
&nbsp;</p>
<div id="attachment_7841" style="width: 671px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/08/ssis-oauth-basic-client-credential-grant.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7841" class="wp-image-7841 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/08/ssis-oauth-basic-client-credential-grant.png" alt="ZS OAuth Connection – Client Credentials Grant " width="661" height="694" srcset="https://zappysys.com/blog/wp-content/uploads/2019/08/ssis-oauth-basic-client-credential-grant.png 661w, https://zappysys.com/blog/wp-content/uploads/2019/08/ssis-oauth-basic-client-credential-grant-286x300.png 286w" sizes="(max-width: 661px) 100vw, 661px" /></a><p id="caption-attachment-7841" class="wp-caption-text">ZS OAuth Connection – Client Credentials Grant</p></div></li>
<li>Click on OK button to save OAuth Connection configure settings.</li>
</ol>
<p>That’s it we have successfully configured Connection for PayPal API in SSIS. In the next section, we will see how to use this connection and read various data from PayPal API.</p>
<h3>Read <span id="Read_Walmart_API_Data_in_SSIS"><span id="Read_YouTube_Playlists_in_SSIS">PayPal </span></span><span id="Read_Walmart_API_Data_in_SSIS"><span id="Read_YouTube_Playlists_in_SSIS">API Data in SSIS</span></span></h3>
<p>Once we have done creating HTTP Connection Manager we can move forward to read PayPal API data inside Data Flow. So lets Configure SSIS JSON / REST API Source.</p>
<ol>
<li>First of All, Drag and drop Data Flow Task from SSIS Toolbox and double click it to edit.
<div id="attachment_7934" style="width: 470px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-drag-drop-data-flow-task.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7934" class="size-full wp-image-7934" src="https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-drag-drop-data-flow-task.png" alt="Drag and Drop SSIS Data Flow Task from SSIS Toolbox" width="460" height="155" srcset="https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-drag-drop-data-flow-task.png 460w, https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-drag-drop-data-flow-task-300x101.png 300w" sizes="(max-width: 460px) 100vw, 460px" /></a><p id="caption-attachment-7934" class="wp-caption-text">Drag and Drop : SSIS Data Flow Task from SSIS Toolbox</p></div></li>
<li>From the SSIS toolbox drag and drop JSON Source on the dataflow designer surface.
<div id="attachment_3766" style="width: 604px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-json-source-for-getting-basic-profile-from-linkedin.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3766" class="wp-image-3766 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-json-source-for-getting-basic-profile-from-linkedin.png" alt="Drag and Drop JSON Source Component" width="594" height="268" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-json-source-for-getting-basic-profile-from-linkedin.png 594w, https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-json-source-for-getting-basic-profile-from-linkedin-300x135.png 300w" sizes="(max-width: 594px) 100vw, 594px" /></a><p id="caption-attachment-3766" class="wp-caption-text">Drag and Drop JSON Source Component</p></div></li>
<li>Double click JSON Source and enter the following URL as below to get invoices and select that created OAuth Connection.<br />
<pre class="crayon-plain-tag">https://api.sandbox.paypal.com/v1/invoicing/invoices?page=0&amp;page_size=100&amp;total_count_required=true</pre>
<div id="attachment_7842" style="width: 730px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/08/ssis-json-source-set-url-connection.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7842" class="wp-image-7842 size-medium_large" src="https://zappysys.com/blog/wp-content/uploads/2019/08/ssis-json-source-set-url-connection-768x682.png" alt="SSIS JSON Source" width="720" height="639" srcset="https://zappysys.com/blog/wp-content/uploads/2019/08/ssis-json-source-set-url-connection-768x682.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/08/ssis-json-source-set-url-connection-300x266.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/08/ssis-json-source-set-url-connection.png 826w" sizes="(max-width: 720px) 100vw, 720px" /></a><p id="caption-attachment-7842" class="wp-caption-text">SSIS JSON Source</p></div></li>
<li>Now Go to Pagination tab select mode as Url Parameter and add indicator as <pre class="crayon-plain-tag">page</pre>  and Add the increment value same as <pre class="crayon-plain-tag">page_size</pre>  value we set in url, there for in our case we set 100. For pagination call please click here for reference to this link.
<div id="attachment_7843" style="width: 730px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/08/ssis-paypal-pagination.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7843" class="size-medium_large wp-image-7843" src="https://zappysys.com/blog/wp-content/uploads/2019/08/ssis-paypal-pagination-768x682.png" alt="PayPal Pagination" width="720" height="639" srcset="https://zappysys.com/blog/wp-content/uploads/2019/08/ssis-paypal-pagination-768x682.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/08/ssis-paypal-pagination-300x266.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/08/ssis-paypal-pagination.png 826w" sizes="(max-width: 720px) 100vw, 720px" /></a><p id="caption-attachment-7843" class="wp-caption-text">PayPal Pagination</p></div></li>
<li>Select the desire Array Filter and click on preview.
<div id="attachment_7844" style="width: 730px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/08/ssis-paypal-preview.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7844" class="size-medium_large wp-image-7844" src="https://zappysys.com/blog/wp-content/uploads/2019/08/ssis-paypal-preview-768x528.png" alt="PayPal Preview" width="720" height="495" srcset="https://zappysys.com/blog/wp-content/uploads/2019/08/ssis-paypal-preview-768x528.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/08/ssis-paypal-preview-300x206.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/08/ssis-paypal-preview-1024x705.png 1024w, https://zappysys.com/blog/wp-content/uploads/2019/08/ssis-paypal-preview.png 1071w" sizes="(max-width: 720px) 100vw, 720px" /></a><p id="caption-attachment-7844" class="wp-caption-text">PayPal Preview</p></div></li>
<li>That’s it, you are ready to load PayPal API Data into SQL Server.</li>
</ol>
<h3><span id="Load_Walmart_API_data_into_SQL_Server">Load PayPal API data into SQL Server</span></h3>
<div class="content_block" id="custom_post_widget-5617"><p>ZappySys SSIS PowerPack makes it easy to load data from various sources such as REST, SOAP, JSON, XML, CSV or from other source into SQL Server, or PostgreSQL, or Amazon Redshift, or other  targets. The <strong>Upsert Destination</strong> component allows you to automatically insert new records and update existing ones based on key columns. Below are the detailed steps to configure it.</p>
<h3>Step 1: Add Upsert Destination to Data Flow</h3>
<ol>
<li>Drag and drop the <strong>Upsert Destination</strong> component from the SSIS Toolbox.</li>
<li>Connect your source component (e.g., JSON / REST / Other Source) to the Upsert Destination.</li>
</ol>
<div class="wp-caption aligncenter">
<a href="https://zappysys.com/blog/wp-content/uploads/2017/08/ssis-data-flow-drag-drop-upsert-destination.png">
<img loading="lazy" decoding="async" class="size-full" alt="" src="https://zappysys.com/blog/wp-content/uploads/2017/08/ssis-data-flow-drag-drop-upsert-destination.png" /></a>
<p class="wp-caption-text">SSIS - Data Flow - Drang and Drop Upsert Destination Component</p>
</div>
<h3>Step 2: Configure Target Connection</h3>
<ol>
<li>Double-click the <strong>Upsert Destination</strong> component to open the configuration window.</li>
<li>Under <strong>Connection</strong>, select an existing target connection or click <strong>NEW</strong> to create a new connection.
<ul>
<li>Example: SQL Server, or PostgreSQL, or Amazon Redshift.</li>
</ul>
</li>
</ol>
<h3>Step 3: Select or Create Target Table</h3>
<ol>
<li>In the <strong>Target Table</strong> dropdown, select the table where you want to load data.</li>
<li>Optionally, click <strong>NEW</strong> to create a new table based on the source columns.</li>
</ol>
<div class="wp-caption aligncenter">
<a href="https://zappysys.com/blog/wp-content/uploads/2020/09/upsert-destination-configuration.png">
<img loading="lazy" decoding="async" class="size-full" alt="" src="https://zappysys.com/blog/wp-content/uploads/2020/09/upsert-destination-configuration.png" /></a>
<p class="wp-caption-text">Configure SSIS Upsert Destination Connection - Loading data (REST / SOAP / JSON / XML /CSV) into SQL Server or other target using SSIS</p>
</div>
<h3>Step 4: Map Columns</h3>
<ol>
<li>Go to the <strong>Mappings</strong> tab.</li>
<li>Click <strong>Auto Map</strong> to map source columns to target columns by name.</li>
<li>Ensure you <strong>check the Primary key column(s)</strong> that will determine whether a record is inserted or updated.</li>
<li>You can manually adjust the mappings if necessary.</li>
</ol>
 <div class="wp-caption aligncenter">
<a href="https://zappysys.com/blog/wp-content/uploads/2020/09/upsert-destination-key.png">
<img loading="lazy" decoding="async" class="size-full" alt="" src="https://zappysys.com/blog/wp-content/uploads/2020/09/upsert-destination-key.png" /></a>
<p class="wp-caption-text">SSIS Upsert Destination - Columns Mappings</p>
</div>
<h3>Step 5: Save Settings</h3>
<ul>
<li>Click <strong>OK</strong> to save the Upsert Destination configuration.</li>
</ul>
<h3>Step 6: Optional: Add Logging or Analysis</h3>
<ul>
<li>You may add extra destination components to log the number of inserted vs. updated records for monitoring or auditing purposes.</li>
</ul>
<h3>Step 7: Execute the Package</h3>
<ul>
<li>Run your SSIS package and verify that the data is correctly inserted and updated in the target table.</li>
</ul>
<div class="wp-caption aligncenter">
<a href="https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-upsert-destination-execute.png">
<img loading="lazy" decoding="async" class="size-full" alt="" src="https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-upsert-destination-execute.png" /></a>
<p class="wp-caption-text">SSIS Upsert Destination Execution</p>
</div></div>
<h2><span id="Conclusion">Conclusion</span></h2>
<p>After all, we saw you how to extract information from REST API such as PayPal REST API using HTTP Connection and load into SQL Server. We also learned techniques like How to get Dynamic Token using HTTP Connection. To explore many other scenarios not discussed in this article download <a href="https://zappysys.com/products/ssis-powerpack/">SSIS PowerPack from here (includes 70+ Components)</a>.</p>
<h2><span id="References">References</span></h2>
<p>Finally, you can use the following links for more information:</p>
<ul>
<li>Help File: <a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/json-source.htm" target="_blank" rel="noopener">JSON Source(REST API or File)</a>, <a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/ssis-logging-task.htm" target="_blank" rel="noopener">ZS Logging Task</a></li>
<li><a href="https://developer.paypal.com/docs/api/overview/" target="_blank" rel="noopener">PayPal API</a></li>
<li><a href="https://zappysys.com/blog/call-soap-rest-api-using-dynamic-token-ssis/" target="_blank" rel="noopener">Dynamic token generation</a></li>
</ul>
<p>The post <a href="https://zappysys.com/blog/read-paypal-api-data-ssis/">How to read PayPal API data in SSIS</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
