# Send HTTP requests, receive responses in Shopify Flow

The Shopwaive Development team has released a powerful new advanced tool for Flow automations. Teams can now use Shopwaive's new <mark style="color:blue;">**Send HTTP Request**</mark> action to send HTTP requests and receive response payloads with variables that may be used downstream in your Flow. You can make external requests to your endpoints or other 3rd parties, receive a response payload, and define a schema that extracts variables from the response that you can use elsewhere in downstream actions inside. [Learn more](https://docs.shopwaive.com/shopify/shopify-flow#send-http-requests)

{% hint style="info" %}
Need support for Shopify Plus integration? Reach out to our team at <support@shopwaive.com> and we'll be glad to support or consider new feature or available options with this release upon request.
{% endhint %}

### Send HTTP requests and receive response payloads all within the Flow environment

Follow the tutorial below to learn how to Send HTTP Requests within Shopify Flow and receive a JSON stringified response as variables you can use in downstream actions and conditional blocks.

<figure><img src="https://docs.shopwaive.com/~gitbook/image?url=https%3A%2F%2F1743155819-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F6HSAZj4RDucpQwVtzMYt%252Fuploads%252FALpcKHuf4y7HK01fYZ9O%252FSendHTTPRequest.png%3Falt%3Dmedia%26token%3D4ed018e9-f3b0-43cd-829d-2b457c16b851&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=7596e39d&#x26;sv=2" alt=""><figcaption></figcaption></figure>

With Shopwaive's <mark style="color:blue;">**Send HTTP request**</mark> action, you can make external requests to your endpoints or other 3rd parties, receive a response payload, and define a schema that extracts variables from the response that you can use elsewhere in downstream actions inside Flow.

To get started quickly, import an example <mark style="color:blue;">**Send HTTP request**</mark> Flow [here](https://cdn.shopify.com/s/files/1/0651/7650/2517/files/Send_HTTP_Request.flow?v=1764359742).

Step 1: Choose any trigger that starts the Flow. In our example, we choose <mark style="color:blue;">**Order created**</mark>

Step 2: Add the <mark style="color:blue;">**Send HTTP request**</mark> action in your Flow, add your payload and header to the request

<figure><img src="https://docs.shopwaive.com/~gitbook/image?url=https%3A%2F%2F1743155819-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F6HSAZj4RDucpQwVtzMYt%252Fuploads%252Fj28yXTFSP07bkwRePoyN%252Fpayload.png%3Falt%3Dmedia%26token%3D9f6ef293-a631-475b-ac53-26bf3b26ccb7&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=b1c4ed00&#x26;sv=2" alt=""><figcaption></figcaption></figure>

Step 3: Connect the <mark style="color:blue;">**Send HTTP request**</mark> action to the <mark style="color:blue;">**Run code**</mark> action

Step 4: Use the [example Flow provided above](https://cdn.shopify.com/s/files/1/0651/7650/2517/files/Send_HTTP_Request.flow?v=1764359742) as a reference to fill out the **Run code** action to properly extract data from the payload received. Responses from the <mark style="color:blue;">**Send HTTP request**</mark> action are returned as stringified JSON, so you'll need to use JSON.parse() within the <mark style="color:blue;">**Run code**</mark> action inside the **Write code** block to parse your data into variable schema format. In the example below, we are defining an object schema with arbirtrarily defined fields **`id`**, **`example`**, and **`email`**, but you can define your own. Ensure you use the Define outputs block to correctly define the schema field types.

<figure><img src="https://docs.shopwaive.com/~gitbook/image?url=https%3A%2F%2F1743155819-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F6HSAZj4RDucpQwVtzMYt%252Fuploads%252FjmBkti0ePXNfVzZKjD9v%252FwriteCode.png%3Falt%3Dmedia%26token%3D72f2c280-9f02-4e47-9747-c578a6b2226c&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=f45b32c8&#x26;sv=2" alt=""><figcaption></figcaption></figure>

Step 5: You can now reference your schema as variables such as {{runCode.email}} in downstream Flow actions and conditional blocks

<figure><img src="https://docs.shopwaive.com/~gitbook/image?url=https%3A%2F%2F1743155819-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F6HSAZj4RDucpQwVtzMYt%252Fuploads%252FZtnD5CLtEqkyfwBa6wpv%252FrunCode.png%3Falt%3Dmedia%26token%3Dc9a6a4bb-954c-4c56-b860-f93b1ac72eaa&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=2692b6b6&#x26;sv=2" alt=""><figcaption></figcaption></figure>

If you have any questions, or need support, just reach out to our dev team at <support@shopwaive.com>, we're happy to assist.
