{"id":9974,"date":"2023-03-27T11:44:37","date_gmt":"2023-03-27T11:44:37","guid":{"rendered":"https:\/\/zappysys.com\/blog\/?p=9974"},"modified":"2023-03-27T11:44:37","modified_gmt":"2023-03-27T11:44:37","slug":"how-to-get-all-urls-from-emails-from-outlook","status":"publish","type":"post","link":"https:\/\/zappysys.com\/blog\/how-to-get-all-urls-from-emails-from-outlook\/","title":{"rendered":"How to get all URLs from emails from Outlook"},"content":{"rendered":"<h2><strong>Introduction<\/strong><\/h2>\n<p style=\"text-align: left;\">This time we will explain how to get all URLS from emails using MS Outlook.\u00a0Sometimes we need get <a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2023\/03\/microsoft-office-365-api-integration-150x150.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-10001 alignleft\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2023\/03\/microsoft-office-365-api-integration-150x150.png\" alt=\"\" width=\"73\" height=\"73\" \/><\/a>all URLs from emails. In this post, we will show how to do this. Step by step using SSIS.<\/p>\n<p style=\"text-align: left;\"><a href=\"https:\/\/developer.microsoft.com\/en-us\/graph\/docs\/concepts\/overview\" target=\"_blank\" rel=\"noopener\">Microsoft Graph API<\/a>\u00a0is a unified way to access many Microsoft services API including\u00a0<strong>Office 365 API<\/strong><\/p>\n<h2><strong>Prerequisites<\/strong><\/h2>\n<p>Before we perform steps listed in this article, you will need to make sure following prerequisites are met:<\/p>\n<ol>\n<li>SSIS designer installed. Sometimes it is referred as BIDS or SSDT (<a href=\"https:\/\/learn.microsoft.com\/en-us\/sql\/ssdt\/download-sql-server-data-tools-ssdt?view=sql-server-ver16\">download it from Microsoft site<\/a>).<\/li>\n<li>Basic knowledge of SSIS package development using Microsoft SQL Server Integration Services.<\/li>\n<li>Make sure <a href=\"https:\/\/zappysys.com\/products\/ssis-powerpack\/\">ZappySys SSIS PowerPack<\/a> is installed (<a href=\"https:\/\/zappysys.com\/products\/ssis-powerpack\/download\/\">download it<\/a>).<\/li>\n<li>Optional (If you want to Deploy and Schedule ) &#8211; <a href=\"https:\/\/zappysys.zendesk.com\/hc\/en-us\/articles\/360035974593\">Deploy and Schedule SSIS Packages<\/a><\/li>\n<\/ol>\n<h2><strong>Steps-by-step process to download images from HTML using SSIS<\/strong><\/h2>\n<h3><span id=\"Register_Application_OAuth2_App_for_Graph_API\">Register Application (OAuth2 App for Graph API)<\/span><\/h3>\n<p>First, check our article about how to get the OAuth2 connection, click <a href=\"https:\/\/zappysys.com\/blog\/get-office-365-mail-attachments-using-ssis\/#Register_Application_OAuth2_App_for_Graph_API\">here for the article<\/a><\/p>\n<h3>Get the information for the body content from the emails<\/h3>\n<p>1. Now, Drag and Drop SSIS\u00a0<b>Data Flow Task<\/b>\u00a0from SSIS Toolbox.<\/p>\n<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\" width=\"460\" height=\"155\" \/><p class=\"wp-caption-text\">Drag and drop Data flow task<\/p><\/div>\n<p>2. Double click on the DataFlow task to see the DataFlow designer surface.<\/p>\n<p>3. From the SSIS toolbox drag and drop JSON Source on the dataflow designer surface.<\/p>\n<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\" width=\"541\" height=\"144\" \/><p class=\"wp-caption-text\">Drag and drop a JSON sourcec<\/p><\/div>\n<p>4. Select the <strong>OAuth connection<\/strong> you created, then use this URL to get the body content<\/p>\n<pre class=\"lang:default decode:true \">https:\/\/graph.microsoft.com\/v1.0\/me\/messages?$select=subject,body,bodyPreview,uniqueBody<\/pre>\n<p>&nbsp;<\/p>\n<div id=\"attachment_9985\" style=\"width: 838px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2023\/03\/JSON-URLS.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-9985\" class=\"wp-image-9985 size-full\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2023\/03\/JSON-URLS.png\" alt=\"Filter the body content\" width=\"828\" height=\"735\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2023\/03\/JSON-URLS.png 828w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2023\/03\/JSON-URLS-300x266.png 300w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2023\/03\/JSON-URLS-768x682.png 768w\" sizes=\"(max-width: 828px) 100vw, 828px\" \/><\/a><p id=\"caption-attachment-9985\" class=\"wp-caption-text\">Getting the information from the emails<\/p><\/div>\n<p>5. Drag and drop the <strong>trash destination<\/strong> and save the result in a file with the following configuration. Make sure to check the <strong>Overwrite target file if exists<\/strong>.<\/p>\n<div id=\"attachment_9986\" style=\"width: 648px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2023\/03\/trash-url.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-9986\" class=\"wp-image-9986 size-full\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2023\/03\/trash-url.png\" alt=\"Add destination and check the overwrite option\" width=\"638\" height=\"525\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2023\/03\/trash-url.png 638w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2023\/03\/trash-url-300x247.png 300w\" sizes=\"(max-width: 638px) 100vw, 638px\" \/><\/a><p id=\"caption-attachment-9986\" class=\"wp-caption-text\">Save the body from the emails in a file<\/p><\/div>\n<p>Now we have saved the email body in the file, to extract the links we need to go control flow and drag and drop the\u00a0Regular Expression Parser Task and follow the steps from below section.<\/p>\n<h3>Getting all URLs from emails inside a variable<\/h3>\n<p>6. The next step is to save the URLs&#8217;. We will use the Regular Expression Parser Task for this.<br \/>\nAlso, you need to use Regex and here is one example you can use, in this page\u00a0<a href=\"https:\/\/regex101.com\/\">Regex101<\/a> you can check more details about the expressions we are using:<\/p>\n<div id=\"attachment_9987\" style=\"width: 694px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2023\/03\/regex-urls.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-9987\" class=\"wp-image-9987 size-full\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2023\/03\/regex-urls.png\" alt=\"URLs from emails - Create the expression\" width=\"684\" height=\"695\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2023\/03\/regex-urls.png 684w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2023\/03\/regex-urls-295x300.png 295w\" sizes=\"(max-width: 684px) 100vw, 684px\" \/><\/a><p id=\"caption-attachment-9987\" class=\"wp-caption-text\">Getting all URL from the emails<\/p><\/div>\n<p>Expression: <span class=\"lang:default highlight:0 decode:true crayon-inline\">href=&#8221;(.*?)&#8221;{{*}}<\/span><\/p>\n<h3>Save the result in a file of the URLs from emails<\/h3>\n<p>7. Finally, use the<strong>\u00a0Logging task<\/strong> to save the URLs in a file, use the following configuration<\/p>\n<div id=\"attachment_9988\" style=\"width: 548px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2023\/03\/logging-urls.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-9988\" class=\"wp-image-9988 size-full\" src=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2023\/03\/logging-urls.png\" alt=\"URLs from emails - Configure the logging Task to save on a file\" width=\"538\" height=\"475\" srcset=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2023\/03\/logging-urls.png 538w, https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2023\/03\/logging-urls-300x265.png 300w\" sizes=\"(max-width: 538px) 100vw, 538px\" \/><\/a><p id=\"caption-attachment-9988\" class=\"wp-caption-text\">Uncheck all options and select message type as none<\/p><\/div>\n<h2>Conclusion<\/h2>\n<p>If everything is OK, you will be able to download the URLS from your emails. To do that, we read the list from the body of the emails. Then we get the URLs of the emails using expressions. Finally, we store them in a local file.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction This time we will explain how to get all URLS from emails using MS Outlook.\u00a0Sometimes we need get all URLs from emails. In this post, we will show how to do this. Step by step using SSIS. Microsoft Graph API\u00a0is a unified way to access many Microsoft services API including\u00a0Office 365 API Prerequisites Before [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":10001,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17,133],"tags":[610,235],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\r\n<title>How to get all URLs from emails from Outlook | ZappySys Blog<\/title>\r\n<meta name=\"description\" content=\"In this article, we will show how to get URLs from emails and save this information in a file using SQL Server Integration Services.\" \/>\r\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\r\n<link rel=\"canonical\" href=\"https:\/\/zappysys.com\/blog\/how-to-get-all-urls-from-emails-from-outlook\/\" \/>\r\n<meta property=\"og:locale\" content=\"en_US\" \/>\r\n<meta property=\"og:type\" content=\"article\" \/>\r\n<meta property=\"og:title\" content=\"How to get all URLs from emails from Outlook | ZappySys Blog\" \/>\r\n<meta property=\"og:description\" content=\"In this article, we will show how to get URLs from emails and save this information in a file using SQL Server Integration Services.\" \/>\r\n<meta property=\"og:url\" content=\"https:\/\/zappysys.com\/blog\/how-to-get-all-urls-from-emails-from-outlook\/\" \/>\r\n<meta property=\"og:site_name\" content=\"ZappySys Blog\" \/>\r\n<meta property=\"article:published_time\" content=\"2023-03-27T11:44:37+00:00\" \/>\r\n<meta property=\"og:image\" content=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2023\/03\/microsoft-office-365-api-integration-150x150.png\" \/>\r\n\t<meta property=\"og:image:width\" content=\"150\" \/>\r\n\t<meta property=\"og:image:height\" content=\"150\" \/>\r\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\r\n<meta name=\"author\" content=\"ZappySys Team\" \/>\r\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\r\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"ZappySys Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\r\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/zappysys.com\/blog\/how-to-get-all-urls-from-emails-from-outlook\/\",\"url\":\"https:\/\/zappysys.com\/blog\/how-to-get-all-urls-from-emails-from-outlook\/\",\"name\":\"How to get all URLs from emails from Outlook | ZappySys Blog\",\"isPartOf\":{\"@id\":\"https:\/\/zappysys.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/zappysys.com\/blog\/how-to-get-all-urls-from-emails-from-outlook\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/zappysys.com\/blog\/how-to-get-all-urls-from-emails-from-outlook\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2023\/03\/microsoft-office-365-api-integration-150x150.png\",\"datePublished\":\"2023-03-27T11:44:37+00:00\",\"dateModified\":\"2023-03-27T11:44:37+00:00\",\"author\":{\"@id\":\"https:\/\/zappysys.com\/blog\/#\/schema\/person\/91b041e2dcf7ece5f068893c1a68ac6e\"},\"description\":\"In this article, we will show how to get URLs from emails and save this information in a file using SQL Server Integration Services.\",\"breadcrumb\":{\"@id\":\"https:\/\/zappysys.com\/blog\/how-to-get-all-urls-from-emails-from-outlook\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/zappysys.com\/blog\/how-to-get-all-urls-from-emails-from-outlook\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/zappysys.com\/blog\/how-to-get-all-urls-from-emails-from-outlook\/#primaryimage\",\"url\":\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2023\/03\/microsoft-office-365-api-integration-150x150.png\",\"contentUrl\":\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2023\/03\/microsoft-office-365-api-integration-150x150.png\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/zappysys.com\/blog\/how-to-get-all-urls-from-emails-from-outlook\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/zappysys.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to get all URLs from emails from Outlook\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/zappysys.com\/blog\/#website\",\"url\":\"https:\/\/zappysys.com\/blog\/\",\"name\":\"ZappySys Blog\",\"description\":\"SSIS \/ ODBC Drivers \/ API Connectors for JSON, XML, Azure, Amazon AWS, Salesforce, MongoDB and more\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/zappysys.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/zappysys.com\/blog\/#\/schema\/person\/91b041e2dcf7ece5f068893c1a68ac6e\",\"name\":\"ZappySys Team\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/zappysys.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/746bec9c9d27f1b90bb181aa516ee234?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/746bec9c9d27f1b90bb181aa516ee234?s=96&d=mm&r=g\",\"caption\":\"ZappySys Team\"},\"sameAs\":[\"https:\/\/zappysys.com\"],\"url\":\"https:\/\/zappysys.com\/blog\/author\/dcalbimonte\/\"}]}<\/script>\r\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to get all URLs from emails from Outlook | ZappySys Blog","description":"In this article, we will show how to get URLs from emails and save this information in a file using SQL Server Integration Services.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/zappysys.com\/blog\/how-to-get-all-urls-from-emails-from-outlook\/","og_locale":"en_US","og_type":"article","og_title":"How to get all URLs from emails from Outlook | ZappySys Blog","og_description":"In this article, we will show how to get URLs from emails and save this information in a file using SQL Server Integration Services.","og_url":"https:\/\/zappysys.com\/blog\/how-to-get-all-urls-from-emails-from-outlook\/","og_site_name":"ZappySys Blog","article_published_time":"2023-03-27T11:44:37+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2023\/03\/microsoft-office-365-api-integration-150x150.png","type":"image\/png"}],"author":"ZappySys Team","twitter_card":"summary_large_image","twitter_misc":{"Written by":"ZappySys Team","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/zappysys.com\/blog\/how-to-get-all-urls-from-emails-from-outlook\/","url":"https:\/\/zappysys.com\/blog\/how-to-get-all-urls-from-emails-from-outlook\/","name":"How to get all URLs from emails from Outlook | ZappySys Blog","isPartOf":{"@id":"https:\/\/zappysys.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/zappysys.com\/blog\/how-to-get-all-urls-from-emails-from-outlook\/#primaryimage"},"image":{"@id":"https:\/\/zappysys.com\/blog\/how-to-get-all-urls-from-emails-from-outlook\/#primaryimage"},"thumbnailUrl":"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2023\/03\/microsoft-office-365-api-integration-150x150.png","datePublished":"2023-03-27T11:44:37+00:00","dateModified":"2023-03-27T11:44:37+00:00","author":{"@id":"https:\/\/zappysys.com\/blog\/#\/schema\/person\/91b041e2dcf7ece5f068893c1a68ac6e"},"description":"In this article, we will show how to get URLs from emails and save this information in a file using SQL Server Integration Services.","breadcrumb":{"@id":"https:\/\/zappysys.com\/blog\/how-to-get-all-urls-from-emails-from-outlook\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/zappysys.com\/blog\/how-to-get-all-urls-from-emails-from-outlook\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/zappysys.com\/blog\/how-to-get-all-urls-from-emails-from-outlook\/#primaryimage","url":"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2023\/03\/microsoft-office-365-api-integration-150x150.png","contentUrl":"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2023\/03\/microsoft-office-365-api-integration-150x150.png","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/zappysys.com\/blog\/how-to-get-all-urls-from-emails-from-outlook\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/zappysys.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to get all URLs from emails from Outlook"}]},{"@type":"WebSite","@id":"https:\/\/zappysys.com\/blog\/#website","url":"https:\/\/zappysys.com\/blog\/","name":"ZappySys Blog","description":"SSIS \/ ODBC Drivers \/ API Connectors for JSON, XML, Azure, Amazon AWS, Salesforce, MongoDB and more","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/zappysys.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/zappysys.com\/blog\/#\/schema\/person\/91b041e2dcf7ece5f068893c1a68ac6e","name":"ZappySys Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/zappysys.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/746bec9c9d27f1b90bb181aa516ee234?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/746bec9c9d27f1b90bb181aa516ee234?s=96&d=mm&r=g","caption":"ZappySys Team"},"sameAs":["https:\/\/zappysys.com"],"url":"https:\/\/zappysys.com\/blog\/author\/dcalbimonte\/"}]}},"_links":{"self":[{"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/posts\/9974"}],"collection":[{"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/comments?post=9974"}],"version-history":[{"count":14,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/posts\/9974\/revisions"}],"predecessor-version":[{"id":10235,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/posts\/9974\/revisions\/10235"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/media\/10001"}],"wp:attachment":[{"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/media?parent=9974"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/categories?post=9974"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/tags?post=9974"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}