Send API request is an action that sends a request to a service on your behalf and signs it with an OAuth 2.0 connection. The action list marks it with a New badge. It's meant to help you work with services that need a login, without handling tokens yourself.
You can use this action for many things, including:
Reading the open deals of your CRM and saving them in Tape.
Creating an event in a team calendar when a viewing is booked.
Note:
A connection is required. Without a connection, Tape skips the action when the automation runs.
Only public addresses. Tape refuses requests to private or internal addresses, such as
localhostor hosts inside a private network.Requests send real data. A
Manual runand aSimulated runboth send real requests to the service.
Who can use the Send API 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.
To choose, add, or edit a connection, you need to be an
Organization ownerorOrganization admin.
Add the Send API request action
To send an API request from an automation:
Open the database app and click the
Create and view automationsicon at the top.Open an automation, or select
New automationand choose a trigger.Select
Add action→Send API request. The step appears asSend an API request.Open
Choose a connectionand select the connection to the service. To add one, selectAdd connection. Enter aConnection name, then theClient ID,Client secret,Authorize URL, andToken URLfrom the service's API documentation.Scopes (optional)andResource owner details URL (optional)are optional. SelectSave connection. You can connect any service that supports OAuth 2.0.Select the method next to
using. It starts asGET.Enter the address in
URL. Without a URL, Tape skips the action.Add the data to send in
Request. Type@to insert record values.Select
Save changes.
Send API request settings
The action reads as a sentence: Send an API request using a method and save response in a variable. Below, you'll see:
Connection: the connection that signs the request. SelectChoose a connection. Learn more about OAuth 2.0 connections →method: how the request is sent. Select it to choose:GETasks the service for data.POSTsends data, usually to create something.PUTsends data to replace something.PATCHsends data to change part of something.DELETEasks the service to delete something.API response: the name of the variable that holds the response. You can use it in later actions by typing@.API responseholds thebody, thestatusCode, and theheadersof the answer, for examplevar_api_response.statusCode. To read single values, usePerform calculationorExecute script.URL: the address the request goes to. You can mix text with record values.Request: the data to send. It must be valid JSON, otherwise the step fails withHTTP call body is not a valid JSON string.Tape sendsRequestwithPOST,PUT, andPATCH.GETandDELETEdon't send it.Show headers: opens the list of headers. SelectAdd headerto add one, then fill inHeaderandValue. SelectHide headersto close the list. The connection adds its login for you, so you don't enter a token as a header.
The action's ••• menu has Follow redirects. It's off by default. It applies to GET requests: when it's on, the request follows redirects of the service to the new address. The menu also has Continue on error, Deactivate, Turn into, Duplicate, and Remove. Learn more about action settings →
Let's look at an example
Let's say your sales team keeps contacts in a CRM and wants every new lead in Tape to appear there. Here's how:
Set the trigger to
When a record is createdin the appLeads.Select
Add action→Send API request.Open
Choose a connectionand select the connection to your CRM.Set the method to
POSTand enterhttps://api.acme.com/v1/contactsinURL.Select
Show headers→Add header. EnterContent-TypeasHeaderandapplication/jsonasValue.In
Request, write the contact data in JSON format and insert the lead'sNameandEmailfields.Select
Save changes.
When a lead is created, Tape creates the contact in your CRM and saves the answer in API response.
Send API request errors
If the step fails, the run shows the step and its message in the automation's runs. Open the automation and select
▷next toManual run(View all runs,cmd+1). Each run shows its status, for exampleSuccess; select a run to see every step. For all automations, openRunsin the Automation Center and filter byApp,Automation, orStatus.If the connection was removed, select a connection again. If a connection shows
Broken, open the connection list, click•••next to the connection, and selectReauthorize.If the service answers with an error status, such as 404 or 500, the step fails. To let the run continue anyway, turn on
Continue on errorin the action's•••menu.The run doesn't show the response. To check it, insert
API responsein a later step, for example inAdd comment.If the address points to a private or internal host, the request is refused.
Test, pause, or edit the Send API request action
Manual runruns the automation once. UnderRun on, select the records, then selectSave and start run. The requests go to the real service.New automations you create in the editor are
Activeright away. The status,ActiveorPaused, sits right below the automation's name in the editor. To pause one, selectActive. It switches toPaused. Then selectSave changes.To change the action, open the automation, select the
Send an API requeststep, make your changes, then selectSave changes.
Learn more
FAQs
What's the difference between Send API request and Send HTTP request?
What's the difference between Send API request and Send HTTP request?
Both send a request to a web address. Send API request signs the request with an OAuth 2.0 connection, so it can reach services that need a login. Send HTTP request sends the request as is. Learn more about Send HTTP request →
Which services can I connect to?
Which services can I connect to?
Any service that supports OAuth 2.0. An organization owner or admin adds it with the service's client ID, client secret, and URLs. Learn more about OAuth 2.0 connections →
Do I need to renew the login?
Do I need to renew the login?
No, Tape refreshes the login of a connection automatically. If it can't, the connection shows Broken. Click ••• next to the connection and select Reauthorize.
Can I use the response in later actions?
Can I use the response in later actions?
Yes! The response is saved in the variable under save response in. Type @ in a later action and select it. Learn more about record values and variables →
Can I call a service in my own network?
Can I call a service in my own network?
No. Tape only sends requests to public addresses.
Are there other actions I can use?
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?
Are you a developer using the Tape API for automations?
The automation API has its own documentation for developers. Full reference: authenticated_http_call in the developer docs →
Still have questions? Find answers and get help from community experts in the Tape community →
