Skip to main content

Call any API from a column (HTTP POST or GET)

The HTTP column calls an API for each row of your table with a GET or a POST request, and this article shows how to add one, test it and read an error.

Written by Umer Ishaq

What is the difference between an HTTP column and a webhook?

Data can travel two ways.

  • Out of Loopster. An HTTP column calls another tool from a row. This article is about the HTTP column.

  • Into Loopster. A table's webhook, or an API key, sends rows in. See Send rows into a table with a webhook.

How do I add an HTTP column?

  1. Click Add column, then Add enrichment.

  2. Open the Tools tab.

  3. Under Custom, click HTTP (POST/GET). It says "Call any API (GET / POST)" and is marked Free.

The Add column panel on the Tools tab, scrolled down to the Custom group. The HTTP (POST/GET) row, described as Tool, Call any API (GET / POST), with its Free tag, is outlined in red.

The column name box starts as "HTTP (POST/GET)".

What do I fill in?

Under Configuration:

  • Account: "Select account (optional)". The text says: "Saved authentication headers. Column headers below override account headers on conflict." Manage accounts opens Settings, then Connections.

  • Request: GET or POST. POST is selected first. PUT, PATCH and DELETE are not offered.

  • URL: "Enter URL (use @ to mention columns)". The hint says: "Base URL only. Use Query Params section below for GET params."

  • Headers: click + Add Header.

  • Body with POST, or Params with GET. Body is a JSON box that starts with the placeholder { "key": "value" }. Params has + Add Param. With GET there is no Body.

  • Retry on failure: on by default. Max retries starts at 3. Base wait starts at 1000 milliseconds, and you can set it from 100 to 30000. The panel notes "Backoff: 1s -> 2s -> 4s". Status codes lists 408, 413 and 429. Error codes lists ECONNREFUSED, ECONNRESET and ETIMEDOUT. Each setting has a Reset button.

The HTTP (POST/GET) column panel with its Configuration section open. It shows the Account box, Request with POST selected next to an empty URL box, Headers with an Add Header button, and a Body box showing the sample text { "key": "value" }. The Body box is outlined in red.

The panel has no field for a timeout, a throttle or a batch size. The only timing setting is Base wait under Retry on failure. It is the wait between retries.

What are Run Settings?

At the bottom of the panel is Run Settings:

  • Auto-run: "Runs this column on its own: for rows that arrive, and again for a row whose inputs change. Off means it only runs when you ask."

  • When the table's Auto-run is off, the panel says: "Table Auto-run is off. This column will only run manually until table Auto-run is enabled."

  • Add run condition: "Only run if this formula resolves to true." See Run a column only when a condition is true.

How do I test it before I run the whole column?

  1. Open the arrow next to the main button and choose Add column without running.

  2. Right-click a cell and choose Run 1 cell. A message says "Successfully queued 1 cell for processing", and the cell shows "Queued...".

  3. Read the result in the cell.

A table with an empty Normalize Domain cell selected in row 1 and its right-click menu open beside it. The menu lists Run 1 cell, Cut, Copy and Paste. The Run 1 cell item is outlined in red.

What does an error look like?

A request to an address ending in .invalid makes the cell show a red cross and: "API call failed: the request URL is not an allowed destination." The hover text repeats the same sentence. The footer turns red and says "1 cell failed".

In the Run column dialog, a cell that failed is not counted as empty. It is counted in Run N rows with no result, and it has its own button, Re-run N error rows, with the line "Retry rows that previously failed".

Does it cost money?

The picker marks the tool Free.

In our tests, cells that failed left no line in Usage history. Test a few rows first, then open History at the bottom right of the table and click Usage history. See See where your spend goes on the Usage page.

Troubleshooting

The cell says the request URL is not an allowed destination

What you see: The cell shows a red cross and: "API call failed: the request URL is not an allowed destination."

Why it happens: The app refuses the address in the URL box, for example an address ending in .invalid.

What to do:

  1. Open the column's settings and check the URL box.

  2. Fix the address.

  3. Click the play button on the column header. In the Run column dialog, click Re-run N error rows.

My HTTP column has no Body box

What you see: The panel shows Params and + Add Param, not Body.

Why it happens: Request is set to GET. With GET the panel has Params and no Body.

What to do: Put the values in Params. Or switch Request to POST to get a Body box.

I cannot pick PUT, PATCH or DELETE

What you see: Request offers only GET and POST.

Why it happens: The HTTP column has only those two.

What to do: Use GET or POST.

New rows do not call my API

What you see: Rows arrive in the table and the HTTP column stays empty.

Why it happens: One cause is that the table's Auto-run is off. Then the panel says: "Table Auto-run is off. This column will only run manually until table Auto-run is enabled."

What to do: Run the column yourself with its play button, or switch the table's Auto-run on. See Why didn't my column run?.

Good to know

  • Account is optional. Column headers override account headers when they clash.

  • Retry on failure is on by default. Check its settings before you run the column.

  • The row play button and the column header's play button are separate. The row button runs one row.

Did this answer your question?