Calling a webhook using return value from earlier webhook

I am trying to set up a bot to call a webhook to POST a new product to Shopify, to create new product with 4 images this requires 4 webhooks that run one after the other. The first webhook is a general POST that creates the product, and the return values from this webhook include the new Product ID, which are required for the subsequent 3 Webhooks to be able to add the images.

The target URL for the last 3 Webhooks says “Template that yields a URL is supported”, however using a usual CONCATENATE formula doesn’t seem to be working.

The target URL needs to be something like this:

https://myshop.myshopify.com/admin/api/2024-10/products/14873695256951/images.json

The product ID is returned in the first webhook, and can be called by inputting [Create Product].[product.id]

So, I have tried these attempts below at forming the expression to target the URL but none have worked:

<< CONCATENATE(“https://myshop.myshopify.com/admin/api/2024-10/products/”,[Create Product].[product.id],“/images.json”)>>

CONCATENATE(“https://myshop.myshopify.com/admin/api/2024-10/products/”,[Create Product].[product.id],“/images.json”)

What am I doing wrong? And does anyone know what needs to be done to get it to work correctly? I know the URL I’m trying to form is correct as when I manually put in the Product ID it works, but it’s not being read correctly at the moment.

Thanks in Advance

Hello-

Did you name your column for the return value as “product”? If yes, did you test your API via Postman? If not I suggest that you test it. There’s a possibility that the field name is not “id”.

1 Like

[Create Product].[product.id] is the location that Appsheet tells me is the location of the return value.

I’ll be honest that this is not something I know much about. Do I need to add a physical column to the table of data, and have the return values go into that column? Or is the return value held virtually with the bot/automation.

The API definitely works as if I manually put in the product ID then it works perfectly. I’m just struggling to get the URL to be formed by the return value of the first webhook.

I’ve been trying to find walk-through on YouTube etc but very little about appsheet.

Method 1: You can check the error in the automation monitor or audit history.

Method 2: You can go to postman’s website and fill out the URL, Authorization and Header.

Once you’ve filled these out, click ‘Send,’ and the result will appear at the bottom. You can then check if ‘id’ is the correct field from Shopify.

1 Like