Skip to main content

Send HTTP request action

Send a request to another service from an automation and save the response in a variable, for example send a new customer to your accounting system.

Written by Leo

Send HTTP request is an action that sends a request to a web address when your automation runs and saves the response in a variable. In the action list, its description reads Send an HTTP request and save the response in a variable for later use. It's meant to help you connect Tape to any service that has a web interface (an API), without a script.

You can use this action for many things, including:

  • Sending a new customer to your accounting system when a deal is won.

  • Asking a service for the current exchange rate and using it in a quote.

The action Send a HTTP request using GET method and save response in HTTP response, with URL, Request, and Show headers

Note:

  • Only public addresses. Tape refuses requests to private or internal addresses, such as localhost or hosts inside a private network. This protection is always on.

  • No login included. This action doesn't sign requests. For a service that needs an OAuth 2.0 login, use Send API request. Learn more about Send API request →

  • Requests send real data. A manual run sends real requests to the service. Test with a service that has a test mode.

Who can use the Send HTTP request action?

  • Automations are available on the Free, Plus, and Premium plans. The number of automation actions per month depends on your plan. See the limits for your plan on our pricing page.

  • To add or change this action, you need to be a workspace admin of the workspace the app is in. You also need full access to every app the automation uses.

Add the Send HTTP request action

To send an HTTP request from an automation:

  1. Open the database app and click the automations icon in the top bar (tooltip Create and view automations). The icon is only there for workspace admins, and not on mobile.

  2. Open an automation, or select New automation and choose a trigger.

  3. Select Add action → Send HTTP request. The step appears as Send a HTTP request.

  4. Select the method next to using. It starts as GET.

  5. Enter the address in URL.

  6. Add the data to send in Request. Type @ to insert record values.

  7. Select Show headers if the service needs headers.

  8. Select Create automation for a new automation, or Save changes for an existing one.

Adding Send HTTP request in an Expenses automation: Add action, selecting Send HTTP request, changing the method from GET to POST, typing <a href="https://api.acme.com/customers" rel="nofollow noopener noreferrer" target="_blank">https://api.acme.com/customers</a> in URL, clicking into Request, and selecting Show headers, which shows a header row with Add header and Hide headers

Send HTTP request settings

The action reads as a sentence: Send a HTTP request using GET method and save response in HTTP response. Below, you'll see:

  • The method: how the request is sent. Select it to choose:

  • GET asks the service for data.

  • POST sends data, usually to create something.

  • PUT sends data to replace something.

  • PATCH sends data to change part of something.

  • DELETE asks the service to delete something.

  • HTTP response: the name of the variable that holds the response, after and save response in. You can use it in later actions by typing @. You can rename it when you send more than one request. It holds the body of the answer, without the status code or headers.

  • URL: the address the request goes to. You can mix text with record values, for example https://api.acme.com/customers/ followed by the record's ID.

  • Request: the content that is sent along, for example text in JSON format. You can mix text with record values. Request is sent with every method if it isn't empty. Add URL parameters directly to the URL, for example ?status=open.

  • Show headers: opens the list of headers. Select Add header to add one, then fill in Header (the name, such as Content-Type) and Value (such as application/json). Select Hide headers to close the list. Values can contain record values.

  • Follow redirects: in the action's ••• menu. When it's on, the request follows redirects of the service to the new address. It's off by default.

Use the response in later actions

The response is saved in the variable named after and save response in. In a later action, type @ and select the variable, for example to write a value into a field with Update record, or add it to an email.

  • The variable holds the body of the response. If the service marks its answer as JSON (Content-Type: application/json), it's saved as an object, and you can read single values with Perform calculation or Execute script, for example var_http_response.id. Learn more about Execute script →

  • If a request has to finish before the next step, add the next action below it. Actions run from top to bottom, one after the other.

Let's look at an example

Let's say your sales team wants every won deal to create a customer in your accounting system. Here's how:

  1. Set the trigger to When a record is updated and select the field Stage.

  2. Add the filter Where Stage Has changed to "Won".

  3. Select Add action → Send HTTP request.

  4. Set the method to POST and enter https://api.acme.com/customers in URL.

  5. Select Show headers → Add header. Enter Content-Type as Header and application/json as Value.

  6. In Request, write the customer data in JSON format and insert the deal's Company and Email fields at the right places.

  7. Select Create automation.

The next time a deal is won, Tape sends the customer to the accounting system and saves the answer in HTTP response.

Send HTTP request errors

  • If the step fails, the run shows the step and its message in the automation's runs. Open the automation and click ▷ (View all runs) at the top, or use cmd/ctrl + 1. Each run shows its status, for example Success; select a run to see every step. For all automations, open Runs in the Automation Center and filter by App, Automation, or Status.

  • An error status like 404 or 500 doesn't fail the step. Only errors that stop the request do, for example an address that can't be reached. The response variable holds only the body of the answer, so check it in a later step.

  • If the address points to a private or internal host, the request is refused.

  • If the service blocks unknown servers, allow Tape's IP addresses. Learn more about IP addresses →

  • If the service doesn't answer, the run ends after three minutes at the latest. Learn more about limits →

Test, pause, or edit the Send HTTP request action

  • Manual run runs the automation once. Under Run on, select the records, then select Start run, or Save and start run if you have unsaved changes. The requests go to the real service.

  • New automations you create in the editor are Active right away. The status, Active or Paused, sits right below the automation's name in the editor. To pause one, select Active, then select Save changes. The status switches to Paused.

  • To change the action, open the automation, select the Send a HTTP request step, make your changes, then select Save changes.

Learn more

FAQs

Which methods can I use?

GET, POST, PUT, PATCH, and DELETE.

How do I send data to a service?

Set the method to POST, PUT, or PATCH, enter the address in URL, and write the data in Request. If the service expects JSON, add the header Content-Type with the value application/json.

Can I use the response?

Yes! The response is saved in the variable after and save response in. Type @ in a later action and select it. Learn more about record values and variables →

Can I call a service that needs a login?

If the service uses OAuth 2.0, use Send API request and select a connection. If it uses a key, add the key as a header. The key is saved in the automation, and everyone who can edit the automation can see it. Use a key that only has the rights the automation needs. Learn more about Send API request →

Can I send files or upload an image from a URL?

No. Request only sends text. To send a file, use http.upload in Execute script. Learn more about Execute script →

Which IP addresses does Tape use?

Requests come from a small set of fixed addresses, which can change. Learn more about IP addresses →

Can I call a service in my own network?

No. Tape only sends requests to public addresses. Requests to private, internal, and local addresses are refused.

Are there other actions I can use?

Yes! Actions can create and update records, add comments, send emails, create PDFs, call other services, and more. See every action in Automation actions →

Are you a developer using the Tape API for automations?

The automation API has its own documentation for developers. Full reference: http_call in the developer docs →

Still have questions? Find answers and get help from community experts in the Tape community →

Did this answer your question?