{"id":4456,"date":"2024-04-15T00:55:58","date_gmt":"2024-04-14T16:55:58","guid":{"rendered":"https:\/\/webflow.tenten.co\/?p=4456"},"modified":"2024-04-15T00:55:58","modified_gmt":"2024-04-14T16:55:58","slug":"initiate-http-communication-using-logic","status":"publish","type":"post","link":"https:\/\/webflow.tenten.co\/en\/initiate-http-communication-using-logic\/","title":{"rendered":"Initiate HTTP communication using Logic"},"content":{"rendered":"\n<div class=\"docs_rich-text w-richtext\">\n<h6><strong>Prior to commencing:<\/strong> Take a look at the Logic overview to acquaint yourself with Logic.<\/h6>\n<p>Utilizing HTTP requests are potent mechanisms for accessing external resources and enhancing the interactivity of your website. You have the capability to employ Webflow Logic\u2019s <strong>Create HTTP communication<\/strong> block to seek information <em>from<\/em> or convey information<em> to<\/em> external applications. Subsequently, you can make use of the response data in following steps within your workflow \u2014 facilitating a seamless integration of Logic with your external applications.\u00a0<\/p>\n<p>Within this tutorial, you will grasp:<\/p>\n<ol role=\"list\">\n<li>What constitutes an HTTP request?<\/li>\n<li>The composition of an HTTP request<\/li>\n<li>How to oversee authentication credentials<\/li>\n<li>The composition of an HTTP response<\/li>\n<li>How to test Initiate HTTP communication blocks<\/li>\n<li>FAQ and problem-solving<\/li>\n<\/ol>\n<h2>What constitutes an HTTP request?\u00a0<\/h2>\n<p>HTTP, known as Hypertext Transfer Protocol, serves as a protocol utilized for the transmission of data over the internet. The internet comprises resources (e.g., HTML files, stylesheets, scripts, images, etc.) hosted across numerous servers. HTTP requests allow us to gain access to these resources.<\/p>\n<p>In order to access content on the internet, your browser (or \u201cthe client\u201d) necessitates sending requests to these servers for the resources it desires. Upon receiving the requested resources from the servers, the browser proceeds to exhibit these resources to you. HTTP requests grant you the ability to view <em>this<\/em> page at present!\u00a0<\/p>\n<p>When you input \u201cwebflow.com\u201d (or any other URL) into your browser\u2019s address bar, your browser transmits a GET request to the server to retrieve the webpage in order to exhibit it within the browser. <strong>GET<\/strong> requests represent a singular type of HTTP method accessible for a client to request a resource. We will delve further into the other prevalent request methods (POST, PUT, PATCH, and DELETE) at a later stage in this tutorial.\u00a0<\/p>\n<h3>Executing HTTP requests utilizing Logic<\/h3>\n<p>In the realm of Logic, you possess the ability to automate HTTP requests towards APIs. An API, or application programming interface, essentially serves as an intermediary that facilitates the communication between 2 distinct applications \u2014 in this scenario, your Logic workflow and your external technological framework (i.e., the amalgamation of tools and services utilized to empower your website). For instance, you could request records from Airtable to incorporate within your workflow, or dispatch data from your Webflow site to Airtable. APIs enable you to carry out CRUD operations and empower your applications.\u00a0<\/p>\n<p>CRUD operations denote the 4 fundamental operations that software applications should be capable of executing \u2014 Create, Read, Update, and Delete. Users need to possess the ability to create data, read data (i.e., obtain access to the data within the application user interface), update or modify the data, and erase the data. You could perceive the Webflow CMS as a CRUD application where you can create, view (read), modify (update), and erase CMS items.\u00a0<\/p>\n<p>The prevalent HTTP request methods correspond to CRUD operations:<\/p>\n<div class=\"w-embed\">\n<div role=\"table\" aria-label=\"HTTP request methods and CRUD operations\" class=\"w-layout-grid product-page_size-tbl\">\n<div role=\"rowgroup\">\n<div role=\"row\" class=\"product-page_size-table-row\"><span role=\"columnheader\" class=\"product-page_size-table-cell cc-header\">HTTP request method(s)<\/span><span role=\"columnheader\" class=\"product-page_size-table-cell cc-header\">Corresponding CRUD operation<\/span><\/div>\n<\/div>\n<div role=\"rowgroup\">\n<div role=\"row\" class=\"product-page_size-table-row\"><span role=\"cell\" class=\"product-page_size-table-cell\">POST<\/span><span role=\"cell\" class=\"product-page_size-table-cell\">Create<\/span><\/div>\n<div role=\"row\" class=\"product-page_size-table-row\"><span role=\"cell\" class=\"product-page_size-table-cell cc-colored\">GET<\/span><span role=\"cell\" class=\"product-page_size-table-cell cc-colored\">Read<\/span><\/div>\n<div role=\"row\" class=\"product-page_size-table-row\"><span role=\"cell\" class=\"product-page_size-table-cell\">PUT, PATCH<\/span><span role=\"cell\" class=\"product-page_size-table-cell\">Update<\/span><\/div>\n<div role=\"row\" class=\"product-page_size-table-row\"><span role=\"cell\" class=\"product-page_size-table-cell cc-colored\">DELETE<\/span><span role=\"cell\" class=\"product-page_size-table-cell cc-colored\">Delete<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>To illustrate using a real-world comparison, an API is akin to a bank, where CRUD operations parallel the activities feasible at a bank. When you visit a bank, you can access (<em>read<\/em>) records pertaining to your available funds and transactions, deposit (<em>create<\/em>) money into your account, <em>update<\/em> your account details, and withdraw (<em>delete<\/em>) money from your account. Prior to partaking in any of these activities at the bank, you must authenticate yourself with identification and specify your intentions to the bank \u2014 analogous principles hold true for interfacing with APIs.\u00a0<\/p>\n<h4>Getting started<\/h4>\n<p>To kick off the process of initiating HTTP requests within  Logic:\u00a0<\/p>\n<ol role=\"list\">\n<li>Access <strong>Logic panel <\/strong>&gt;<strong> Flows <\/strong>&gt;<strong> Flow editor<\/strong><\/li>\n<li>Drag a<strong> Create HTTP communication <\/strong>block onto the canvas<\/li>\n<\/ol>\n<figure class=\"w-richtext-align-fullwidth w-richtext-figure-type-image\">\n<div><img decoding=\"async\" src=\"https:\/\/webflow-s3.tenten.co\/2024\/04\/64b94ba16bd63379357cace5_6480b9192dcb0e4059ad5d1a_4e8af804.png\" title=\"64b94ba16bd63379357cace5_6480b9192dcb0e4059ad5d1a_4e8af804\"><\/div>\n<\/figure>\n<h2>The composition of an HTTP request<\/h2>\n<p>An HTTP request <strong>should<\/strong> encompass:<\/p>\n<ul role=\"list\">\n<li>A request method<\/li>\n<li>A request URL and endpoint path<\/li>\n<\/ul>\n<p>Additionally, an HTTP request may incorporate:<\/p>\n<ul role=\"list\">\n<li>Authentication<\/li>\n<li>A request body<\/li>\n<li>Request headers<\/li>\n<li>Query strings<\/li>\n<\/ul>\n<h3>Authentication<\/h3>\n<p>Analogous to presenting your identification at a bank, numerous APIs mandate you to authenticate and ascertain your identity when seeking resources. There exist 3 options for authentication:<\/p>\n<ul role=\"list\">\n<li>None (pertaining to APIs not necessitating authentication)<\/li>\n<li>API token<\/li>\n<li>Username &amp; password<\/li>\n<\/ul>\n<h6><strong>Remark: <\/strong>The specific authentication credentials requisite hinge on the API to which you are directing your request, necessitating you to refer to the respective API documentation for this information. Each API is structured differently, and not every authentication format aligns with all APIs.\u00a0<\/h6>\n<p>Delve into more details regarding managing authentication credentials.<\/p>\n<h4>How to include an API token credential<\/h4>\n<p>Analogous to a password, an API token (occasionally referred to as an \u201cAPI key\u201d or \u201caccess token\u201d) serves to denote the site or application engendering an HTTP request to an API. All API tokens deployed within Logic are securely stored.<\/p>\n<blockquote><p><strong>Essential: <\/strong>It is imperative to note that despite Webflow storing credentials securely, Webflow lacks control over any server or third-party service receiving that credential via Logic workflows.\u00a0<\/p><\/blockquote>\n<h6><strong>Remark: <\/strong>You retain the option to incorporate an API token within the request headers or query parameters, contingent on the requisites of the API to which you are directing your request.\u00a0<\/h6>\n<h5>Within request headers<\/h5>\n<h6><strong>Prior to commencement: <\/strong>Consult the documentation for the API intended to receive your request. This aids in determining how and where to generate an API token, as well as how to structure your request headers. The designation employed for your header value (e.g., Authorization, X-API-Key, etc.) hinges on the API receiving the request. Delve further into request headers.<\/h6>\n<p>To append an API token credential within your request headers:\u00a0<\/p>\n<ol role=\"list\">\n<li>Copy your <strong>API token <\/strong>allocated for the API intended to receive your request<\/li>\n<li>Access <strong>Logic panel<\/strong> &gt; <strong>Flows<\/strong> tab &gt; <strong>Flow editor <\/strong>within Webflow<\/li>\n<li>Select the <strong>Create HTTP communication<\/strong> block on the canvas to unveil <strong>Block settings<\/strong><\/li>\n<li>Opt for <strong>API token<\/strong> amidst the<strong>Verification<\/strong> selector<\/li>\n<li>Pick <strong>Heading<\/strong> from the <strong>Include in<\/strong> selector<\/li>\n<li>Insert a value for your heading (e.g., Authorization, X-API-Key, etc.) in the <strong>Header<\/strong> box\u00a0<\/li>\n<li>Press <strong>Choose a credential <\/strong>below <strong>Identification<\/strong><\/li>\n<li>Press <strong>Add new identification\u00a0<\/strong><\/li>\n<li>Name your API key (e.g., Airtable API key) in the <strong>Title<\/strong> box and provide a summary in the <strong>Definition<\/strong> box if you desire\u00a0<\/li>\n<li>Select <strong>API key<\/strong> from the <strong>Kind<\/strong> selector<\/li>\n<li>Paste your <strong>API key<\/strong> into the <strong>Authentication<\/strong> box<\/li>\n<li>Press <strong>Generate<\/strong><\/li>\n<\/ol>\n<blockquote><p><strong>Essential: <\/strong>If the API you\u2019re sending a request to necessitates bearer verification, you will need to include \u201cBearer\u201d into the <strong>Token<\/strong> box before your API key (e.g., Bearer {token}).<\/p><\/blockquote>\n<figure class=\"w-richtext-align-fullwidth w-richtext-figure-type-image\">\n<div><img decoding=\"async\" src=\"https:\/\/webflow-s3.tenten.co\/2024\/04\/64b94ba16bd63379357cacda_6480b950f8e241543f898e88_9840b5f5.png\" title=\"64b94ba16bd63379357cacda_6480b950f8e241543f898e88_9840b5f5\"><\/div>\n<\/figure>\n<p>After adding your API key, you can pick it from the <strong>Identification<\/strong> selector for future HTTP requests.<\/p>\n<h5>Within query parameters<\/h5>\n<h6><strong>Prior to commencing: <\/strong>Refer to the API\u2019s documentation where you\u2019re sending your request. This will aid in recognizing how and where to produce an API key as well as how to format your query parameters. The key-value pairs utilized for your query parameters are determined by the API you\u2019re sending the request to. Learn more about query parameters.<\/h6>\n<p>To incorporate an API key credential into your query parameters:\u00a0<\/p>\n<ol role=\"list\">\n<li>Duplicate your <strong>API key <\/strong>for the API you\u2019re sending your request to<\/li>\n<li>Unveil <strong>Rationalize panel<\/strong> &gt; <strong>Currents<\/strong> tab &gt; <strong>Work editor <\/strong>in Webflow<\/li>\n<li>Choose <strong>API key<\/strong> from the <strong>Verification<\/strong> selector<\/li>\n<li>Choose <strong>Inquiries<\/strong> from the <strong>Include in<\/strong> selector<\/li>\n<li>Insert the key for your query parameter (e.g., \u201ckey\u201d in key=value, or \u201capi_key\u201d in api_key=value) in the <strong>Query parameter<\/strong> box<\/li>\n<li>Press <strong>Choose a credential <\/strong>below <strong>Identification<\/strong><\/li>\n<li>Press <strong>Add new identification\u00a0<\/strong><\/li>\n<li>Name your API key (e.g., TMDB API key) in the <strong>Title<\/strong> box and add a summary in the <strong>Definition<\/strong> box if you desire<\/li>\n<li>Paste your <strong>API key<\/strong> into the <strong>Authentication<\/strong> box \u2014 this will serve as the value in your key-value pair<\/li>\n<li>Press <strong>Generate<\/strong><\/li>\n<\/ol>\n<blockquote><p><strong>Essential: <\/strong>Only the key in your key-value pair (e.g., the \u201ckey\u201d in key=value) should be added in the <strong>Query parameter<\/strong> box. The value (i.e., your API key) will be automatically appended to the query parameters in the request. Remember that the key will vary based on the API you\u2019re sending your request to, so please refer to the third-party\u2019s API documentation for this detail.\u00a0<\/p><\/blockquote>\n<figure class=\"w-richtext-align-fullwidth w-richtext-figure-type-image\">\n<div><img decoding=\"async\" src=\"https:\/\/webflow-s3.tenten.co\/2024\/04\/64b94ba16bd63379357cacd0_6480b9828b1b3a3ea7468d4d_17d80a12.png\" alt=\"An example GET request to TheMovieDB API. The API key in the query params uses \u201capi_key\u201d for the key.\" title=\"64b94ba16bd63379357cacd0_6480b9828b1b3a3ea7468d4d_17d80a12\"><\/div>\n<\/figure>\n<p>After adding your API key, you can select it from the <strong>Identification<\/strong> selector for use in future HTTP requests.<\/p>\n<h4>How to incorporate a username and password identification<\/h4>\n<p>Some APIs may need verification with a username and password rather than an API key. All usernames and passwords used with Logic are kept securely.\u00a0<\/p>\n<blockquote><p><strong>Essential: <\/strong>While Webflow securely stores verifications, Webflow lacks control over any server or third-party service you transmit that verification to using Logic flows.\u00a0<\/p><\/blockquote>\n<p>To include a username and password identification:\u00a0\u00a0<\/p>\n<ol role=\"list\">\n<li>Unveil <strong>Rationalize panel<\/strong> &gt; <strong>Currents<\/strong> tab &gt; <strong>Work editor <\/strong>in Webflow<\/li>\n<li>Select the <strong>Make HTTP request <\/strong>block on the canvas to open its <strong>Block settings<\/strong><\/li>\n<li>Choose <strong>Username &amp; password <\/strong>from the <strong>Verification<\/strong> selector<\/li>\n<li>Press <strong>Choose a credential <\/strong>below <strong>Identification<\/strong><\/li>\n<li>Press <strong>Add new identification<\/strong><\/li>\n<li>Name your identifications (e.g., Mailchimp identifications) in the <strong>Title<\/strong> box and add a summary in the <strong>Definition<\/strong> box if you desire<\/li>\n<li>Choose <strong>Username &amp; password <\/strong>in the <strong>Kind<\/strong> selector<\/li>\n<li>Insert your username and password in the <strong>Username<\/strong> and <strong>Password<\/strong> boxes (the username and password are those from the external service)\u00a0<\/li>\n<li>Press <strong>Generate<\/strong><\/li>\n<\/ol>\n<p>After incorporating your username and password, you can select them from the <strong>Identification<\/strong> selector for use in future HTTP requests.<\/p>\n<h3>Request URL and endpoint path\u00a0<\/h3>\n<p>Each HTTP request must include a request URL and endpoint path to indicate the server where you\u2019re directing your request.\u00a0<\/p>\n<p>For instance, to create a new contact in Mailchimp using the <a href=\"https:\/\/mailchimp.com\/developer\/marketing\/api\/\">Mailchimp API<\/a>, you\u2019d make a POST request to <strong>https:\/\/{region}.api.mailchimp.com\/3.0\/lists\/{listID}\/members<\/strong>. In this instance, the request URL is <strong>https:\/\/{region}.api.mailchimp.com\/3.0<\/strong> and the endpoint path is <strong>\/lists\/{listID}\/members<\/strong>.\u00a0<\/p>\n<p>You can input the request URL and endpoint path in the <strong>URL<\/strong> box of the <strong>Make HTTP request<\/strong><strong>block settings<\/strong>. You can also tap the purple \u201c<strong>dot<\/strong>\u201d icon in the URL box to include dynamic data (e.g., output data from previous blocks) to your request URL.\u00a0<\/p>\n<figure class=\"w-richtext-align-fullwidth w-richtext-figure-type-image\">\n<div><img decoding=\"async\" src=\"https:\/\/webflow-s3.tenten.co\/2024\/04\/64b94ba16bd63379357cace8_6480b9a901e292c6d38ca8c9_34a0a7e2.png\" title=\"64b94ba16bd63379357cace8_6480b9a901e292c6d38ca8c9_34a0a7e2\"><\/div>\n<\/figure>\n<h6><strong>Note:<\/strong> The request URL and endpoint path will vary based on the API you\u2019re sending your request to, so you\u2019ll need to refer to the third-party\u2019s API documentation for this detail.<\/h6>\n<h3>Inquiry strings<\/h3>\n<p>Inquiry strings are an optional component of a URL that lets you relay information to and from a server by adding that information to the end of the URL. Inquiry strings usually come after a question mark (?) in the URL and can encompass one or more parameters as key-value pairs. An equal sign (=) segregates each key and value (e.g., key=value) and an ampersand (&amp;) divides multiple parameters (e.g., key1=value1&amp;key2=value2). These can be utilized for verification (e.g., adding an API key to the query parameters) or to forward dynamic data (e.g., data produced through a form submission).\u00a0<\/p>\n<p>Suppose you aim to utilize the <a href=\"https:\/\/developers.themoviedb.org\/3\/getting-started\/introduction\">The Movie Database API<\/a> to look up details about the movie Hot Rod. You\u2019d send a GET request to <strong>https:\/\/api.themoviedb.org\/3\/search\/movie?api_key={api_key}&amp;query=Hot+Rod<\/strong>. In this scenario, <strong>api_key<\/strong>and <strong>search<\/strong> are keywords, <strong>{token}<\/strong> stands in for a real API token, and <strong>Fast+Car<\/strong> represents another value. These keywords and values compose 2 parameters, forming the query string collectively: <strong>?token={token}&amp;search=Fast+Car<\/strong>.\u00a0<\/p>\n<p>By clicking the purple \u201c<strong>dot<\/strong>\u201d icon in the <strong>URL<\/strong> field of the <strong>Configure HTTP request<\/strong> <strong>block settings<\/strong>, you can integrate dynamic data (e.g., result data from prior blocks) into your query parameters.<\/p>\n<h6><strong>Note:<\/strong> The kind of parameters you incorporate in your HTTP request (if any) and their structure will rely on the API to which you are forwarding your request, hence it is advisable to consult the external API documentation for this insight.\u00a0<\/h6>\n<figure class=\"w-richtext-align-fullwidth w-richtext-figure-type-image\">\n<div><img decoding=\"async\" src=\"https:\/\/webflow-s3.tenten.co\/2024\/04\/64b94ba16bd63379357cad06_6480b9bc5e3e83bf0c9ace2b_54c44191.png\" title=\"64b94ba16bd63379357cad06_6480b9bc5e3e83bf0c9ace2b_54c44191\"><\/div>\n<\/figure>\n<h3>Request techniques<\/h3>\n<p>HTTP request methods describe the action of the request. The subsequent request methods are accessible in the <strong>Configure HTTP request<\/strong> block:\u00a0<\/p>\n<ul role=\"list\">\n<li>GET<\/li>\n<li>POST<\/li>\n<li>PUT<\/li>\n<li>PATCH<\/li>\n<li>DELETE<\/li>\n<\/ul>\n<figure class=\"w-richtext-align-fullwidth w-richtext-figure-type-image\">\n<div><img decoding=\"async\" src=\"https:\/\/webflow-s3.tenten.co\/2024\/04\/64b94ba16bd63379357cacf8_6480b9ce8b1b3a3ea746e65c_defcd487.png\" title=\"64b94ba16bd63379357cacf8_6480b9ce8b1b3a3ea746e65c_defcd487\"><\/div>\n<\/figure>\n<h4>GET<\/h4>\n<p>One can utilize the <strong>GET<\/strong> request technique to procure or read a resource. A flourishing <strong>GET<\/strong> request yields a response body containing the demanded information.\u00a0<\/p>\n<p>For instance, a <strong>GET<\/strong> request is adept at retrieving data about your subscriptions\/audiences in Mailchimp, or an enumeration of all the tables in your Airtable database.\u00a0<\/p>\n<figure class=\"w-richtext-align-fullwidth w-richtext-figure-type-image\">\n<div><img decoding=\"async\" src=\"https:\/\/webflow-s3.tenten.co\/2024\/04\/64b94ba16bd63379357cacc3_6480b9dcea5626e2ab0e8548_d8e3f619.png\" alt=\"An instance of a GET request to a personalized endpoint in Autocode.\" title=\"64b94ba16bd63379357cacc3_6480b9dcea5626e2ab0e8548_d8e3f619\"><\/div>\n<\/figure>\n<h4>POST<\/h4>\n<p>The <strong>POST<\/strong> request technique is valuable for crafting a fresh resource in an external service or database. A <strong>POST<\/strong> request necessitates a request body wherein you define the data for the resource to construct.\u00a0<\/p>\n<p>Suppose you wish to gather newsletter subscribers on your Webflow website and dispatch them to a Mailchimp list. You could architect a workflow entailing a form submission trigger and a <strong>Configure HTTP request<\/strong> block to convey a <strong>POST<\/strong> request to Mailchimp. The request body in this scenario would encapsulate the data from the form submission destined for Mailchimp.\u00a0<\/p>\n<figure class=\"w-richtext-align-fullwidth w-richtext-figure-type-image\">\n<div><img decoding=\"async\" src=\"https:\/\/webflow-s3.tenten.co\/2024\/04\/64b94ba16bd63379357caccd_6480b9f1a880853d610139b7_bde531de.png\" alt=\"An archetype POST request that appends a fresh subscriber to a Mailchimp list.\" title=\"64b94ba16bd63379357caccd_6480b9f1a880853d610139b7_bde531de\"><\/div>\n<\/figure>\n<h4>PUT<\/h4>\n<p>The <strong>PUT<\/strong> request technique is handy for altering or updating a resource. Should there be no extant resource harmonizing the update request, a new resource will emerge. Numerous third-party services mandate that you enclose an existing record ID or distinct identifier in your <strong>PUT<\/strong> request for indicating the record to modify, instead of their system executing the verdict on existing record existence.<\/p>\n<blockquote><p><strong>Essential: <\/strong>The <strong>PUT<\/strong> request technique substitutes the <em>entire<\/em> requested resource with the data in the request body. This implies any unspecified values will overwrite the current values for the resource updated \u2014 a potential hazard in specific situations. For updating a <em>section<\/em> of an extant resource while retaining the rest unaltered, the PATCH request technique is recommended instead.<\/p><\/blockquote>\n<p>If the objective is to update an existing record in Airtable, one could transmit a <strong>PUT<\/strong> request to Airtable while appending the entire record from Airtable (i.e., the complete layout encompassing all cell values and the current record ID) along with the intended modifications in the request body. In case the record does not already exist in Airtable, the request will forge a fresh record. Should the record already be in Airtable and if any of the existing cell values remain empty in the request body, the request will supplant the existing record \u2014 implying previously filled cell values would become void post-request execution.\u00a0<\/p>\n<figure class=\"w-richtext-align-fullwidth w-richtext-figure-type-image\">\n<div><img decoding=\"async\" src=\"https:\/\/webflow-s3.tenten.co\/2024\/04\/64b94ba16bd63379357cace0_6480ba03ead1916bfa87363f_fb3f87c7.png\" title=\"64b94ba16bd63379357cace0_6480ba03ead1916bfa87363f_fb3f87c7\"><\/div><figcaption><em>An illustration of a PUT request employed to revise a record\u2019s Description attribute in Airtable. The total Airtable record layout (i.e., Record ID and Name) is transmitted in the request body together with the fresh description to confirm minimal interference with the current data.<\/em><\/figcaption><\/figure>\n<h4>PATCH<\/h4>\n<p>The <strong>PATCH<\/strong> request technique mirrors the <strong>PUT<\/strong> approach, however, <strong>PATCH<\/strong> enables modification or update of <em>portion<\/em> of a resource, opposed to the entire resource. The data to be updated necessitates inclusion solely in the request body.<\/p>\n<p>For instance, if adjusting the description attribute of an existing record in Airtable without altering other attributes, a <strong>PATCH<\/strong> request carrying solely the record ID and the intended description for the record could be dispatched. The <strong>PATCH<\/strong> request adjusts only the designated field of the record, leaving other attributes untouched.\u00a0<\/p>\n<figure class=\"w-richtext-align-fullwidth w-richtext-figure-type-image\">\n<div><img decoding=\"async\" src=\"https:\/\/webflow-s3.tenten.co\/2024\/04\/64b94ba16bd63379357cacf5_6480ba1e6342e40e730933eb_c8f9b231.png\" title=\"64b94ba16bd63379357cacf5_6480ba1e6342e40e730933eb_c8f9b231\"><\/div><figcaption><em>An instance of a PATCH request deployed to amend a record\u2019s Description attribute in Airtable. The PATCH request adjusts solely the specified part of the record conveyed via the request, which in this instance is solely the Description attribute. The Record ID pinpoints the record for amendment.<\/em><\/figcaption><\/figure>\n<h4>DELETE\u00a0<\/h4>\n<p>The <strong>DELETE<\/strong> request serves for erasing a resource.\u00a0<\/p>\n<p>For instance, one could initiate a <strong>DELETE<\/strong> request to Mailchimp for dismantling an audience, or to Hubspot for extricating a redundant lead from monitoring.<\/p>\n<figure class=\"w-richtext-align-fullwidth w-richtext-figure-type-image\">\n<div><img decoding=\"async\" src=\"https:\/\/webflow-s3.tenten.co\/2024\/04\/64b94ba16bd63379357cacd4_6480ba33daf277a80eda6414_17c4e7f4.png\" alt=\"An exemplar DELETE request utilized to expunge a list in Mailchimp.\" title=\"64b94ba16bd63379357cacd4_6480ba33daf277a80eda6414_17c4e7f4\"><\/div>\n<\/figure>\n<h3>Request descriptors<\/h3>\n<p>Request descriptors generate context about an HTTP request so the server can respond suitably. For instance, in GET requests, request descriptors can specify the desired response format, or in POST requests, they can indicate the data type being forwarded.\u00a0<\/p>\n<h6><strong>Note:<\/strong> The request descriptors in your HTTP request (if any) differ based on the API for which your request is designated, thus it is recommended to consult the external API documentation for specifics.\u00a0<\/h6>\n<p>Toinclude a request header in the <strong>Send HTTP request<\/strong> module:\u00a0<\/p>\n<ol role=\"list\">\n<li>Access <strong>Send HTTP request module settings<\/strong> &gt; <strong>General<\/strong> &gt; <strong>Headers<\/strong>\u00a0<\/li>\n<li>Tap on the \u201c<strong>plus<\/strong>\u201d symbol\u00a0<\/li>\n<li>Specify a name and value for the header<\/li>\n<\/ol>\n<p>To remove a request header, simply click the \u201c<strong>trash<\/strong>\u201d icon.<\/p>\n<figure class=\"w-richtext-align-fullwidth w-richtext-figure-type-image\">\n<div><img decoding=\"async\" src=\"https:\/\/webflow-s3.tenten.co\/2024\/04\/64b94ba16bd63379357caced_6480ba5bdaf277a80edaa68d_cabe3968.png\" alt=\"A common HTTP request header includes the name \u201ccontent-type\u201d with the value \u201capplication\/json\u201d.\" title=\"64b94ba16bd63379357caced_6480ba5bdaf277a80edaa68d_cabe3968\"><\/div>\n<\/figure>\n<h6><strong>Reminder:<\/strong> In case you create a header without entering a name and value, the Flow editor will save it as an unknown value. It is advised to remove unidentified headers to prevent issues. You can do this by clicking the \u201c<strong>trash<\/strong>\u201d icon located next to the header.<\/h6>\n<h3>Request data<\/h3>\n<p>The request data comprises the information you intend to transfer to the server with your request. For instance, in a POST request, it could be the entity you wish to generate. The presence of a request body is not mandatory for certain requests &#8211; such as when fetching a resource via a GET request, where specifying content in the body is unnecessary. The <strong>Request data<\/strong> section is visible in <strong>Send HTTP request module settings<\/strong> &gt; <strong>General<\/strong> when choosing a method that necessitates a request body (e.g., POST, PUT, or PATCH).\u00a0<\/p>\n<p>You will structure your request body using JSON (JavaScript Object Notation). JSON serves as a text-based data format comprising key\/value pairs enclosed in double quotes and separated by a colon, for example:\u00a0<\/p>\n<div class=\"w-embed\">\n<div class=\"code-block\">\n<pre class=\"code-block_body\"><code id=\"snippet1\" class=\"code-block_code\">\n\"Name\": \"Rod Kimble\"\n<\/code><\/pre>\n<\/div>\n<\/div>\n<p>JSON objects forming the request body may harbor multiple key\/value pairs, delimited by commas. For instance:\u00a0<\/p>\n<div class=\"w-embed\">\n<div class=\"code-block\">\n<pre class=\"code-block_body\"><code id=\"snippet1\" class=\"code-block_code\">\n{\n  \"Name\": \"Rod Kimble\",\n  \"Occupation\": \"Stuntman\"\n}\n<\/code><\/pre>\n<\/div>\n<\/div>\n<blockquote><p><strong>Crucial:<\/strong> Any stray comma, omitted colon, or absent quote can render your JSON file invalid, leading to request failure. Due to the complexity of manually parsing JSON, using a free tool like <a href=\"https:\/\/jsonlint.com\/\">JSONLint<\/a> is recommended for validation.\u00a0<\/p><\/blockquote>\n<p>You can integrate dynamic data from your flow into the request body by clicking the purple \u201c<strong>dot<\/strong>\u201d icon in the <strong>Body (JSON) <\/strong>field. Supported data types include:\u00a0<\/p>\n<ul role=\"list\">\n<li>Plain<\/li>\n<li>Email<\/li>\n<li>Phone\u00a0<\/li>\n<li>Number<\/li>\n<li>Text Area<\/li>\n<li>Checkbox<\/li>\n<li>Timestamp<\/li>\n<\/ul>\n<h6><strong>Note:<\/strong> The specifics included in the request body will rely on the API to which you are dispatching the request; hence, consulting the third-party API documentation is essential for this information.\u00a0<\/h6>\n<figure class=\"w-richtext-align-fullwidth w-richtext-figure-type-image\">\n<div><img decoding=\"async\" src=\"https:\/\/webflow-s3.tenten.co\/2024\/04\/64b94ba16bd63379357cacc7_6480ba74530f28480b1a83e3_3fff44d3.png\" title=\"64b94ba16bd63379357cacc7_6480ba74530f28480b1a83e3_3fff44d3\"><\/div>\n<\/figure>\n<h2>Managing authentication credentials<\/h2>\n<p>Credentials (e.g., API tokens, usernames, passwords, etc.) are securely stored within Webflow \u2014 encrypted during transmission and at rest. Once a credential is established, even its creator cannot access its actual value within the Webflow UI; solely the user-defined names assigned to the created credentials are visible.\u00a0<\/p>\n<blockquote><p><strong>Crucial:<\/strong> While Webflow ensures secure storage of credentials, it does not govern any server or third-party service receiving those credentials through Logic flows.\u00a0<\/p><\/blockquote>\n<h3>Adding new credentials<\/h3>\n<p>To introduce a new credential, navigate to <strong>Block settings<\/strong> &gt; <strong>Authentication<\/strong> &gt; <strong>Select a credential<\/strong> and choose <strong>Add new credential<\/strong>. The process for including a credential varies according to the credential type (e.g., API token or username &amp; password).\u00a0<\/p>\n<p>and approved by the server. Codes starting with &#8220;2&#8221; indicate a victorious response.<\/p>\n<p><strong>200 OK<\/strong> is the standard reply for thriving HTTP requests, but the reply may vary depending on the request method. <strong>201 Created<\/strong>, for instance, is the most prevalent reply to successful <strong>POST<\/strong> requests.\u00a0<\/p>\n<p><a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTTP\/Status#successful_responses\">Take a look at the MDN documentation on successful responses<\/a>.<\/p>\n<h4>Redirection responses<\/h4>\n<p>Redirection status codes show that the client needs to take additional steps to finalize the HTTP request. This can occur if the request has multiple potential responses or if the URL of the solicited resource has been permanently altered. Codes starting with &#8220;3&#8221; imply a redirection response.\u00a0<\/p>\n<p><a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTTP\/Status#redirection_messages\">Explore the MDN documentation on redirection responses<\/a>.<\/p>\n<h4>Client error responses<\/h4>\n<p>Client error status codes show that the server cannot or won&#8217;t process the request due to an issue triggered by the client. This implies that there&#8217;s a problem on the requester&#8217;s (i.e., your) side. Client error status codes may be issued in response to requests sent with flawed syntax, lacking the necessary authentication, to a resource that doesn&#8217;t exist, etc. Codes starting with &#8220;4&#8221; indicate a client error response.\u00a0<\/p>\n<p><a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTTP\/Status#client_error_responses\">Refer to the MDN documentation on client error responses<\/a>.<\/p>\n<h4>Server error responses<\/h4>\n<p>Server error responses demonstrate that the server failed to finish a request or is unable to do so. This indicates that there&#8217;s an issue on the third-party service&#8217;s side. Codes starting with &#8220;5&#8221; signify a server error response.\u00a0<\/p>\n<p><a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTTP\/Status#server_error_responses\">Read up on the MDN documentation on server error responses<\/a>.<\/p>\n<h3>Response headers<\/h3>\n<p>Response headers are HTTP headers that encompass extra context for the response, like details about the responding server, data type, host address, etc.\u00a0<\/p>\n<h3>Response body<\/h3>\n<p>Once an HTTP request prospers, the response body includes either:<\/p>\n<ul role=\"list\">\n<li>the resource requested by the client, or\u00a0<\/li>\n<li>some details about the status of the action requested by the client<\/li>\n<\/ul>\n<figure class=\"w-richtext-align-fullwidth w-richtext-figure-type-image\">\n<div><img decoding=\"async\" src=\"https:\/\/webflow-s3.tenten.co\/2024\/04\/64b94ba16bd63379357cacfd_6480baa8ddbd33811e20c1bb_9e1ae1e6.png\" title=\"64b94ba16bd63379357cacfd_6480baa8ddbd33811e20c1bb_9e1ae1e6\"><\/div><figcaption><em>An example of a successful response body sent by Mailchimp in response to a POST request to create a new subscriber. The response body contains information about the new subscriber in Mailchimp.<\/em><\/figcaption><\/figure>\n<p>If an HTTP request fails, the response body might furnish:<\/p>\n<ul role=\"list\">\n<li>further insights into the reasons for the error, or\u00a0<\/li>\n<li>actions that the client should take to finalize their request<\/li>\n<\/ul>\n<p>Not all responses will feature a response body.\u00a0<\/p>\n<h2>How to test Make HTTP request blocks<\/h2>\n<p>You can independently test <strong>Make HTTP request<\/strong> blocks from the rest of your workflow for streamlined troubleshooting.\u00a0<\/p>\n<p>To assess a <strong>Make HTTP request<\/strong> block:\u00a0<\/p>\n<ol role=\"list\">\n<li>Access <strong>Logic panel<\/strong> &gt; <strong>Flows<\/strong> tab &gt; <strong>Flow editor\u00a0<\/strong><\/li>\n<li>Right-click on the <strong>Make HTTP request<\/strong> block on the canvas and opt for <strong>Test this action<\/strong>, or choose the <strong>Make HTTP request<\/strong> block on the canvas and click <strong>Run test<\/strong><strong> to complete setup<\/strong> in <strong>Block settings<\/strong><\/li>\n<li>Input sample data in the modal menu window<\/li>\n<li>Press <strong>Run test<\/strong><\/li>\n<\/ol>\n<p>Learn more about testing workflows.<\/p>\n<h3>Additional resources for testing HTTP requests<\/h3>\n<p>You can leverage complimentary services like <a href=\"http:\/\/webhook.site\/\">webhook.site<\/a> or <a href=\"https:\/\/requestbin.com\/\">requestbin.com<\/a> to test HTTP requests. These services supply sample API endpoints so you can validate your requests without transferring any data actually.\u00a0<\/p>\n<p>You can also utilize <a href=\"https:\/\/www.postman.com\/\">Postman<\/a>, a free API client, to delve into API endpoints and test HTTP requests. This can aid in debugging your requests externally from Logic.\u00a0<\/p>\n<h2>FAQ and troubleshooting<\/h2>\n<h3>My HTTP request is falling short, but I&#8217;m uncertain why.\u00a0<\/h3>\n<p>You can depend on response status codes (and, occasionally, the response body) to furnish more insights into why your HTTP request might be failing \u2014 for instance, it might be failing due to a client error or a server error.\u00a0<\/p>\n<p>If you&#8217;re receiving a client error response, your request may be flawed. It could be beneficial to validate your JSON using a complimentary tool like <a href=\"https:\/\/jsonlint.com\/\">JSONLint<\/a> to address any syntax errors.\u00a0<\/p>\n<p>You can also test individual <strong>Make HTTP request<\/strong> blocks for simpler troubleshooting. Learn how to test Make HTTP request blocks.\u00a0<\/p>\n<p>If you&#8217;re still uncertain why your HTTP request is failing, please contact the third-party service where you&#8217;re dispatching your request for added support and resources.\u00a0<\/p>\n<p>If you believe you&#8217;re encountering issues with the Make HTTP request block itself, kindly <a href=\"https:\/\/support.webflow.com\/get-support\">get in touch with our customer support team for assistance<\/a>.\u00a0Please ensure to include your <strong>Flow ID<\/strong> with your submission.\u00a0<\/p>\n<figure class=\"w-richtext-align-fullwidth w-richtext-figure-type-image\">\n<div><img decoding=\"async\" src=\"https:\/\/webflow-s3.tenten.co\/2024\/04\/64b94ba16bd63379357cacdd_6480bad1896fd74aebefb82c_8043f156.png\" title=\"64b94ba16bd63379357cacdd_6480bad1896fd74aebefb82c_8043f156\"><\/div>\n<\/figure>\n<h3>What&#8217;s the contrast between PUT and PATCH?\u00a0<\/h3>\n<p>A PUT request will construct a <em>fresh<\/em> resource if it cannot locate the specified resource to update. The PUT request technique also substitutes the entire requested resource with the data in the request body. This implies that any unspecified values will overwrite existing values for the resource you update \u2014 which can be harmful in some scenarios.\u00a0<\/p>\n<p>With a PATCH request, you can modify <em>section<\/em> of a resource by presenting only the data you wish to update.\u00a0<\/p>\n<h3>Can other Workspace members view any credentials (e.g., third-party API keys, usernames and passwords) I&#8217;ve included?\u00a0<\/h3>\n<p>Workspace members can administer, utilize, and view segments of credentials. Nonetheless, once a credential has been established, no one, including the original creator of that credential, can view the actual value of the credential in the Webflow UI. In essence, Workspace members can observe the user-defined names for the credentials created, but cannot access the actual values for API tokens or usernames and passwords.<\/p>\n<h3>How does Webflow store and manage credentials?\u00a0<\/h3>\n<p>Credentials are stored securely \u2014 always encrypted in transit and always encrypted at rest. Once a credential has been established, no one, including the original creator of that credential, can view the actual value of the credential in the Webflow UI. You&#8217;ll solely be capable of viewing the user-defined names for the credentials created.\u00a0<\/p>\n<p>Kindly note that while Webflow stores credentials securely, Webflow does not govern any server you transmit the credential to using Logic flows.\u00a0<\/p>\n<h3>What occurs to credentials when a site is duplicated or transferred?\u00a0<\/h3>\n<p>Credentials are not retained when a site is duplicated or transferred. Any credentials used in your flows will need to be reestablished after the site has been duplicated or transferred.<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"Use the Make HTTP request block to connect Logic with your external tech stack.","protected":false},"author":2,"featured_media":5222,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"om_disable_all_campaigns":false,"inline_featured_image":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"csco_display_header_overlay":false,"csco_singular_sidebar":"","csco_page_header_type":"","footnotes":""},"categories":[298],"tags":[],"class_list":{"0":"post-4456","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-logic","8":"cs-entry"},"acf":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/webflow.tenten.co\/en\/wp-json\/wp\/v2\/posts\/4456","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webflow.tenten.co\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webflow.tenten.co\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webflow.tenten.co\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/webflow.tenten.co\/en\/wp-json\/wp\/v2\/comments?post=4456"}],"version-history":[{"count":0,"href":"https:\/\/webflow.tenten.co\/en\/wp-json\/wp\/v2\/posts\/4456\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/webflow.tenten.co\/en\/wp-json\/wp\/v2\/media\/5330"}],"wp:attachment":[{"href":"https:\/\/webflow.tenten.co\/en\/wp-json\/wp\/v2\/media?parent=4456"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webflow.tenten.co\/en\/wp-json\/wp\/v2\/categories?post=4456"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webflow.tenten.co\/en\/wp-json\/wp\/v2\/tags?post=4456"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}