Workflow not working - API Connector

When clicking on a calendar date, the corresponding card with the information of the existing reservation for that date does not appear.

It worked correctly until the end of June, and without making any changes to the workflow, it stopped working.

Steps:

1 - Click the day 2 painted in red

1

2 - Data to send in the workflow

3 - Value in the URL parameters

4 - Empty return of the expected values

4

The queries are made through the API Connector plugin and work when I pass the same parameters “P2299” and “02/07/2024” in the test connection of the plugin’s endpoint. Returning the expected values as shown in the image below:

Can you share the whole API Connector settings?

1 Like

The API connector settings (The endpoint has been omitted for security reasons.):

Everything work in API Connector but not when running WF?
But in API Connector, you have a different date… what if you put the same date?

Yes, it works in the API Connector, but not when running the WF.

Sorry, I had attached the wrong screenshot, the correct one would be this:

If you can, activate the capture response header and the include errors checkbox.
Reinitialize API Connector and Update your workflow (because this will add “body” to the body response key). Once it’s done, run the WF an in inspector, check the body’s raw data (and post a screenshot here)

I did and the reponse was:

Untitled design (2)

This is the translation of the raw body text from an exception raised by our API:

{"ERROR":"The application behaved unexpectedly. Please contact the administrators."}

Now let’s try to debug:
create a requestbin.com and send the request from API Connector (be sure this one is working when you send it to API)
Run the WF
Compare both results

The response in the requestbin was:

Did you create request from both API connector and run mode? Compare both request.
Actually, I cannot do anything with your screenshot.

1 Like

Not sure if this matters for your situation, but Bubble typically displays the date in the American format. 02/07/2024 = February 7th, 2024. Are you passing it along in the format that you need to pass it along in?

In your API connector, you are sending the date the other way around.

Not sure if that will make a difference. Hope it helps. :blush:

2 Likes

I actually didn’t send it with Run in the application. Here’s the result when running it from there:
Untitled design (5)

The date format is being sent incorrectly in Run. I believe that’s the issue. Do you know why this is happening?

Yes, this happened in the earlier versions of the application, but I have made corrections to use the dd/mm/yyyy format and ensure it is properly used in the endpoint query.

Can you share settings of the data field? (in the action/wf)

The settings of the data field:

The problem was found here and i could make the fix in the workflow. Thanks for the help @Jici

1 Like