Using a Call API action in workflow with webhook trigger

I have a workflow that is triggered by a webhook.

I want to use the response to that webhook in a subsequent call API step.
I need to use a JSON query to get a value from the webhook response and then use that in my API call.
I then need to store that response in my table.

Is that possible? It doesn’t look like I can do it.

Yes, that should be possible. How far have you gotten with it so far?

How do I get the result?

If you add a Query JSON step, you should be able to point it at the Call API step and access the return value.

1 Like

Do you know what causes this type of error? I couldn’t find a reference to that XFs…

Here is the JSON I thought I was referencing:


(see “company_name”)

Looks the return value is not being recognised as valid JSON. Try passing it through a JSON Parse step first.

Thanks. The Glide docs don’t seem to account for using a Query JSON action in a workflow triggered by a webhook so I appreciate your help.

Which action do I use?

I’ll try the parse step (I can’t see why it isn’t valid JSON in the first place).

Is the value in the JSON field correct?

haha, oops! Sorry, my bad - there is no such thing. I must have had Make in my head (which does have a JSON Parse module).

It does look correct, yes.
But why are you targeting the Add Row step with the Query JSON?
I think that’s where the problem is - the Add Row will be returning a RowID value, and that certainly isn’t valid JSON.
You need to target the Call API step.

1 Like

I think I found the solution.

The JSON input should be the request body rather than the add row to company_data step because that doesn’t have any response that I can see.

Next to solve the Call API error :crazy_face:

Can you show us what’s the error in the Call API step? How are you referencing the previous step’s value in the Call API step?

The Call API step seems to work correctly.

Here is how it is set up:

What I’m stuck on his how to store that value from the Response Body in my row. Row is – and I can’t select a row (I actually want to specify a column to set the values).

The way to do it is as follows:

  • Query the table that you want to update, and apply one or more filters so only the row you want to update will be matched.
  • Add a Single Value step, targeting the Query, and selecting First->Whole row
  • Use a Set Column Values step, selecting the column you want to update via the previous Single Value step.
2 Likes

Excellent, trying now.

How do I trigger a webhook from a workflow? I can’t see a way to add an authorization value to the header, I can only add a body.

If it needs authentication headers, you should use Call API instead of a webhook.

yes, however I was wanting to trigger another glide workflow (and I thought a webhook is the only way I can do that)

You can use either Trigger Webhook or Call API.

2 Likes

k so I can call a webhook’s url using a Call API action?

Yes, you can. Just treat that URL like any other URLs you have used so far, with a POST call.

1 Like