Skip to main content
All CollectionsHow-tosArticlesBuilding blocks
Building blocks - HTTP request action
Building blocks - HTTP request action

This article is designed to guide you through understanding and setting up HTTP request actions.

Yanni Hajioannou avatar
Written by Yanni Hajioannou
Updated yesterday

Overview

HTTP request actions come into play when you need to reach out to other platforms in your story. In this article, we'll go through a checklist, including some tips of building out an HTTP request action.

Tines references

Before getting started, we recommend familiarizing yourself with the surrounding functionality this article covers:

Tines Tip: Need some inspiration with building out your story? Check out our story library!

Make it happen

✅Check one: Is there a Tines template?

It may be possible that a template has already been created for the API call you're looking to make.

  1. Grab from the templates on the bottom left and drag into the story.

  2. Then select the task from the template you'd like to use.

✅Check two: Does the platform offer API documentation?

Visit the platform's API documentation to explore the types of calls can be made. Let's look at an example using Slack:

  1. Using your search engine, enter the platform's name and API documentation.

  2. Select the API documentation (i.e. Slack documentation). From there you should be able to identify the task you are trying to complete. For our Slack example, here's a screenshot of all the possible chat API calls:

  3. Continuing with our Slack example, let's look at chat.delete:

✅Check Three: Is there a cURL example of the API call?

Platform API documentation will sometimes offer a cURL example of the API call. Whether you understand how to build a cURL command from scratch or copy it from platform docs, you can paste the command directly onto your storyboard in Tines and it will automatically create an HTTP action with that command's configuration. We call this feature curl2Tines. Here we can see what a cURL request example looks like.

When you paste it into the story it'll look something like this:

Tines Tip: Make sure to double-check for any additional action configuration modifications required to make the API call.

💡Or, build an HTTP request action from scratch

  1. Identify the URL Endpoint (i.e. look at the platform's API docs to see the URL we are making the request to). Continuing with our Slack example, let's look at the reactions.list API call:

  2. Pull an HTTP request action into your story.

  3. Create a unique name that describes what you're trying to accomplish

  4. Set the URL in the action to the URL from the API docs

  5. Update the method of the action to whatever is mentioned in the API docs. In our Slack example, this API call is using a GET method.

  6. The parameters of an API call are the specifics of that request. Generally there will be requirements that the vendor needs in the request to provide a successful response. There are also typically optional fields that you can send over in your request. In this example we have "token" as a requirement, and "user" as an optional field we'll be adding.

Tines Tip: Set up your basic config, then get your API key / token for testing. This makes it so you can have most of the action configured and then get the final item of the API key. If you are unable to acquire the API key for a service, now is a good time to reach out to your team to make a formal request for it.

Did this answer your question?