How exactly can this be done?
Say your URL is the following:
On page “Example” have the following workflow:
When page is loaded and when get data from URL (parameter = amount) is not empty > schedule API workflow
Another possible route is to use Zapier to POST to the API endpoint. Not sure how your url with parameters is being generated in the first place, but you could use Zapier webhooks to receive the data you need and then send to endpoint.
Hey @emmanuel, I want to revive this thought and see if it’s something you guys can easily add…
Can we add the ability to “get data from URL” within the API Workflows area?
One use case is the original question in this post, but from what I understand his payload was fully sent in the URL, so there were workarounds. I have another use case when retrieving a webhook from an external shopping cart service. The issue is that the webhook payload does not include user account info, so we have no way of knowing whose data is coming in.
If we can have our users set up their webhook configuration with the endpoint plus an identifying parameter that contains their Bubble unique id (or something), we can then read that parameter as well and know whose shopping cart the data is coming from.
Part of this issue is the limited webhook data and the fact that the service itself has no API to begin with. Seeing as "get data from URL " inside API workflows would solve this issue for us completely (not to mention provide @thomas.schijf a much cleaner solution for his original question), it might be worth adding? If possible…?
It’s a data source, so wherever you have a dynamic expression you can have get data from an API. Including in actions.
Not sure I understand the issue.
Sorry, I’m not talking about Get data from an external API. In API Workflows, we don’t have the option “Get data from page URL” like we do in the regular app pages.
I want to retrieve a URL parameter from my own endpoint. For example, in SamCart (shopping cart service), I’d enter in my API endpoint here:
What I want to do is append a URL parameter to this endpoint so that each of my app users who want to integrate with their SamCart account will enter a “unique” endpoint in their SamCart settings. When a webhook goes out from SamCart to my app’s endpoint, I then want to retrieve the url parameter in addition to the rest of the JSON payload. I want to do this so that I know who the data is coming from when I go to create a thing in this API workflow. The webhook sends most of the data except for any identifying user information, so my parameter is to help me identify who it should be mapped backed to in my Bubble database.
It’s possible URL parameters in API endpoints isn’t a thing, and I just didn’t know… but if it is, my question to you is if that function can be added (Get data from page url).
Oh sorry my bad.
Just add this as a parameter to your API endpoint, that’s what the parameters are.
Ah nice!! I thought those were just for the payload coming in… Excellent, will try it out today. Thanks!
Hi @romanmg did you get any success with an endpoint retrieving URL parameters?
I tried it just now and the value didn’t get passed through.
I actually tabled this , but I will try tomorrow and let you know. You added a URL parameter to the endpoint and then added that parameter as a key, yes?
Thanks for checking, Gaby!
Ok @mishav I just tried this out on a very basic setup, and can confirm that it doesn’t work for me either The JSON payload comes in fine from the service (I’m testing with Shopify) but my URL param gets ignored.
Thanks for verifying this Gaby.
@emmanuel I’ve raised a bug report : )
Generally speaking for POST requests the parameters should be in the body of the request, and not as a querystring. Which is why you see this.
Is there any way to make querystring parameters accessible in API Workflow events?
This isn’t standard. We can put that on the wish list but cannot commit on this yet. Why is it an issue?
I am needing this ability as well, to post parameters via the url
Hey @emmanuel the issue is(at least this is what I am experiencing) is that for webhooks such as shopify we would want to assign user values to the webhook url since this value cannot be retrieved in the JSON payload from the webhook. Any chance you can add this in?
Any update on this???
Was this ever resolved? I’m running into the same need for Microsoft Graph webhooks. The webhook sends a validationToken and expects Bubble to return the token. I’m able to call the endpoint from Postman with the parameter in the body, but not in the URL. I think MS Graph is also sending it as part of the URL.
Doesn’t work in Postman with token in URL
Works in Postman with token in body
Error message from API Connector while Key is required on endpoint.
If I make the Key optional in the endpoint, then it gives Microsoft a 200 message, but then complains that the response doesn’t match. This is because Microsoft is sending it as part of the URL and Bubble is not recognizing it.
Details from MIcrosoft.
Any updates on this guys?
UPDATE okay, I see the solution here [New Feature] Ability to read parameters in the URL for API workflow endpoints