<?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>Web Archives | ZappySys Blog</title>
	<atom:link href="https://zappysys.com/blog/tag/web/feed/" rel="self" type="application/rss+xml" />
	<link>https://zappysys.com/blog/tag/web/</link>
	<description>SSIS / ODBC Drivers / API Connectors for JSON, XML, Azure, Amazon AWS, Salesforce, MongoDB and more</description>
	<lastBuildDate>Thu, 11 Dec 2025 13:03:13 +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>Web Archives | ZappySys Blog</title>
	<link>https://zappysys.com/blog/tag/web/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>How to make Web API Destination dynamic (URL, Body, Headers)</title>
		<link>https://zappysys.com/blog/make-web-api-destination-dynamic-url-body-headers/</link>
		
		<dc:creator><![CDATA[ZappySys Team]]></dc:creator>
		<pubDate>Fri, 06 Mar 2020 03:51:19 +0000</pubDate>
				<category><![CDATA[SSIS WEB API Destination]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[dynamic]]></category>
		<category><![CDATA[ssis]]></category>
		<category><![CDATA[Web]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=8806</guid>

					<description><![CDATA[<p>Introduction In this article, we will show how to work with the Web API Destination and create a dynamic URL, Body or header. For this purpose, we will use the following components: ZappySys SSIS PowerPack component to make things work: &#160; In these examples, we are going to show different examples of how to send a dynamic URL, dynamic [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/make-web-api-destination-dynamic-url-body-headers/">How to make Web API Destination dynamic (URL, Body, Headers)</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 how to work with the Web API Destination and create a dynamic URL, Body or header. For this purpose, we will use the following components:</p>
<p><a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">ZappySys SSIS PowerPack</a> component to make things work:<br />
<div class="su-table su-table-alternate">
<table width="300">
<tbody>
<tr style="line-height: 0px">
<td width="50px"><a href="https://zappysys.com/products/ssis-powerpack/ssis-web-api-destination-connector/" target="_blank" rel="noopener"><br />
<img decoding="async" class="alignnone size-full wp-image-3074" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/web-api-destination/ssis-web-api-destination.png" alt="SSIS Web destination" width="50" height="50" /></a></td>
<td style="vertical-align: middle"><a href="https://zappysys.com/products/ssis-powerpack/ssis-web-api-destination-connector/" target="_blank" rel="noopener">SSIS Web API Destination (POST data to URL)</a></td>
</tr>
<tr style="line-height: 0px">
<td width="50px"><a href="https://zappysys.com/products/ssis-powerpack/ssis-json-generator-transform/" target="_blank" rel="noopener"><br />
<img decoding="async" class="alignnone size-full wp-image-3074" src="https://zappysys.com/images/SSIS-PowerPack/ssis-json-generator-transform.png" alt="JSON Generator Transform" width="50" height="50" /></a></td>
<td style="vertical-align: middle"><a href="https://zappysys.com/products/ssis-powerpack/ssis-json-generator-transform/" target="_blank" rel="noopener">SSIS JSON Generator Transform</a></td>
</tr>
</tbody>
</table>
</div>
<p>&nbsp;</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>
<p>In these examples, we are going to show different examples of how to send a dynamic URL, dynamic body and dynamic headers.</p>
<h2>How to make Web API Destination dynamic URL with the OLEDB Source</h2>
<ol>
<li>First of all, in this example, we are going to create a dynamic URL, we will use need the following URLs: <a href="https://jsonplaceholder.typicode.com/posts"><br />
https://jsonplaceholder.typicode.com/posts</a>, <a href="https://jsonplaceholder.typicode.com/comments">https://jsonplaceholder.typicode.com/comments</a>,<br />
<a href="https://jsonplaceholder.typicode.com/todos">https://jsonplaceholder.typicode.com/todos</a>, <a href="https://jsonplaceholder.typicode.com/users">https://jsonplaceholder.typicode.com/users</a>, and other similar URLs.</li>
<li>So, we will set the last part of the URL as a variable.</li>
<li>Also, will have a table with the values of the variable (posts, users, comments, etc):<br />
<pre class="crayon-plain-tag">CREATE TABLE [dbo].[webApiDest](
	[id] [smallint] NOT NULL,
	[type] [nchar](10) NULL,
 CONSTRAINT [PK_webApiDest] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
INSERT [dbo].[webApiDest] ([id], [type]) VALUES (1, N'posts     ')
INSERT [dbo].[webApiDest] ([id], [type]) VALUES (2, N'comments  ')
INSERT [dbo].[webApiDest] ([id], [type]) VALUES (3, N'todos     ')
INSERT [dbo].[webApiDest] ([id], [type]) VALUES (4, N'albums    ')
INSERT [dbo].[webApiDest] ([id], [type]) VALUES (5, N'photos    ')
INSERT [dbo].[webApiDest] ([id], [type]) VALUES (6, N'users     ')</pre>
&nbsp;</li>
<li>In addition, we are going to create a Data Flow with the following components as follows:<a href="https://zappysys.com/blog/wp-content/uploads/2020/03/ssis-json-generator-rest-api-web-destination.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8828" src="https://zappysys.com/blog/wp-content/uploads/2020/03/ssis-json-generator-rest-api-web-destination.png" alt="" width="302" height="249" srcset="https://zappysys.com/blog/wp-content/uploads/2020/03/ssis-json-generator-rest-api-web-destination.png 302w, https://zappysys.com/blog/wp-content/uploads/2020/03/ssis-json-generator-rest-api-web-destination-300x247.png 300w" sizes="(max-width: 302px) 100vw, 302px" /></a></li>
<li>Secondly, we will connect to the table created in the previous section<br />
using the OLEDB Source component:</p>
<div id="attachment_8829" style="width: 829px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2020/03/ssis-oledb-table.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8829" class="size-full wp-image-8829" src="https://zappysys.com/blog/wp-content/uploads/2020/03/ssis-oledb-table.png" alt="OLEDB-list-links" width="819" height="416" srcset="https://zappysys.com/blog/wp-content/uploads/2020/03/ssis-oledb-table.png 819w, https://zappysys.com/blog/wp-content/uploads/2020/03/ssis-oledb-table-300x152.png 300w, https://zappysys.com/blog/wp-content/uploads/2020/03/ssis-oledb-table-768x390.png 768w" sizes="(max-width: 819px) 100vw, 819px" /></a><p id="caption-attachment-8829" class="wp-caption-text">OLEDB-Source-Data</p></div></li>
</ol>
<h2>How to make Web API Destination dynamic URL in SSIS with the ZS JSON Generator Transform</h2>
<ol>
<li>Also, in the JSON Generator transform, right-click on Mapping and select add elements:
<div id="attachment_8831" style="width: 746px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2020/03/ssis-json-generator-transform-add-1.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8831" class="size-full wp-image-8831" src="https://zappysys.com/blog/wp-content/uploads/2020/03/ssis-json-generator-transform-add-1.png" alt="convert-tsql-json" width="736" height="623" srcset="https://zappysys.com/blog/wp-content/uploads/2020/03/ssis-json-generator-transform-add-1.png 736w, https://zappysys.com/blog/wp-content/uploads/2020/03/ssis-json-generator-transform-add-1-300x254.png 300w" sizes="(max-width: 736px) 100vw, 736px" /></a><p id="caption-attachment-8831" class="wp-caption-text">add-elements-JSON</p></div></li>
<li>Check the add multiple bound options and check the two columns:
<div id="attachment_8832" style="width: 405px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2020/03/ssis-json-add-multiple-bound.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8832" class="size-full wp-image-8832" src="https://zappysys.com/blog/wp-content/uploads/2020/03/ssis-json-add-multiple-bound.png" alt="SSIS Multiple bound" width="395" height="482" srcset="https://zappysys.com/blog/wp-content/uploads/2020/03/ssis-json-add-multiple-bound.png 395w, https://zappysys.com/blog/wp-content/uploads/2020/03/ssis-json-add-multiple-bound-246x300.png 246w" sizes="(max-width: 395px) 100vw, 395px" /></a><p id="caption-attachment-8832" class="wp-caption-text">Add JSON elements</p></div></li>
<li>Pay attention to this step because this and the next one are the most important steps. Right-click the type element and select edit.
<div id="attachment_8833" style="width: 743px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2020/03/ssis-edit-type.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8833" class="size-full wp-image-8833" src="https://zappysys.com/blog/wp-content/uploads/2020/03/ssis-edit-type.png" alt="Edit-ssis-outstream" width="733" height="612" srcset="https://zappysys.com/blog/wp-content/uploads/2020/03/ssis-edit-type.png 733w, https://zappysys.com/blog/wp-content/uploads/2020/03/ssis-edit-type-300x250.png 300w" sizes="(max-width: 733px) 100vw, 733px" /></a><p id="caption-attachment-8833" class="wp-caption-text">Edit JSON element</p></div></li>
<li>The hide from output will hide the type from the output but will be present as a variable. Also, when we want to hide in the JSON created that element.
<div id="attachment_8834" style="width: 405px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2020/03/ssis-hide-output-include-downstream.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8834" class="size-full wp-image-8834" src="https://zappysys.com/blog/wp-content/uploads/2020/03/ssis-hide-output-include-downstream.png" alt="column-downstream" width="395" height="482" srcset="https://zappysys.com/blog/wp-content/uploads/2020/03/ssis-hide-output-include-downstream.png 395w, https://zappysys.com/blog/wp-content/uploads/2020/03/ssis-hide-output-include-downstream-246x300.png 246w" sizes="(max-width: 395px) 100vw, 395px" /></a><p id="caption-attachment-8834" class="wp-caption-text">Column downstream</p></div></li>
<li>In addition, the include columns in the downstream option are the option that will allow sending the type as a variable from the JSON Generator Transform to the Web API destination.</li>
</ol>
<h2>How to make Web API Destination dynamic URL in SSIS with the ZS JSON Generator Transform</h2>
<ol>
<li>First of all, we will add the input column for the body. This will send the ZSON generator into the body.
<div id="attachment_8835" style="width: 708px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2020/03/ssis-web-api-destination-input-column-body.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8835" class="size-full wp-image-8835" src="https://zappysys.com/blog/wp-content/uploads/2020/03/ssis-web-api-destination-input-column-body.png" alt="Body-ssis-JSON" width="698" height="307" srcset="https://zappysys.com/blog/wp-content/uploads/2020/03/ssis-web-api-destination-input-column-body.png 698w, https://zappysys.com/blog/wp-content/uploads/2020/03/ssis-web-api-destination-input-column-body-300x132.png 300w" sizes="(max-width: 698px) 100vw, 698px" /></a><p id="caption-attachment-8835" class="wp-caption-text">Body input</p></div></li>
<li>In connections, we will create a ZS-HTTP connection to the <a href="https://jsonplaceholder.typicode.com/">https://jsonplaceholder.typicode.com/</a> site:
<div id="attachment_8837" style="width: 736px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2020/03/ssis-http-zs-connection.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8837" class="size-full wp-image-8837" src="https://zappysys.com/blog/wp-content/uploads/2020/03/ssis-http-zs-connection.png" alt="http connection" width="726" height="653" srcset="https://zappysys.com/blog/wp-content/uploads/2020/03/ssis-http-zs-connection.png 726w, https://zappysys.com/blog/wp-content/uploads/2020/03/ssis-http-zs-connection-300x270.png 300w" sizes="(max-width: 726px) 100vw, 726px" /></a><p id="caption-attachment-8837" class="wp-caption-text">SSIS HTTP Connection</p></div></li>
<li>In the URL we will create a dynamic part with the type as a variable that gets the values from the SQL Server table and the type column.</li>
<li>You can write &lt;%type%&gt; manually, or edit the URL to use placeholders and get the type variable from the columns folder:
<div id="attachment_8839" style="width: 706px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2020/03/ssis-url-type-dynamic.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8839" class="size-full wp-image-8839" src="https://zappysys.com/blog/wp-content/uploads/2020/03/ssis-url-type-dynamic.png" alt="ssis dynamic link" width="696" height="380" srcset="https://zappysys.com/blog/wp-content/uploads/2020/03/ssis-url-type-dynamic.png 696w, https://zappysys.com/blog/wp-content/uploads/2020/03/ssis-url-type-dynamic-300x164.png 300w" sizes="(max-width: 696px) 100vw, 696px" /></a><p id="caption-attachment-8839" class="wp-caption-text">SSIS web api dynamic link</p></div></li>
<li>The Web API configuration will be something like this:
<div id="attachment_8840" style="width: 711px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2020/03/ssis-web-api-destination-final.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8840" class="size-full wp-image-8840" src="https://zappysys.com/blog/wp-content/uploads/2020/03/ssis-web-api-destination-final.png" alt="SSIS-configuration-web-api" width="701" height="673" srcset="https://zappysys.com/blog/wp-content/uploads/2020/03/ssis-web-api-destination-final.png 701w, https://zappysys.com/blog/wp-content/uploads/2020/03/ssis-web-api-destination-final-300x288.png 300w" sizes="(max-width: 701px) 100vw, 701px" /></a><p id="caption-attachment-8840" class="wp-caption-text">Final SSIS configuration</p></div></li>
<li>Finally, run the package.</li>
</ol>
<h2>Conclusion</h2>
<p>In this article, we learned how to send a dynamic URL to REST API. If you want to test the tool, you can download it here:</p>
<ul>
<li><a href="https://zappysys.com/products/odbc-powerpack/download/">ZappySys PowerPack</a></li>
</ul>
<p>&nbsp;</p>
<p>The post <a href="https://zappysys.com/blog/make-web-api-destination-dynamic-url-body-headers/">How to make Web API Destination dynamic (URL, Body, Headers)</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>
	</channel>
</rss>
