{id} not being replaced in External Collection UPDATE (Supabase REST)

I’m really having a hard time and experiencing an issue with an External Collection connected to Supabase, where the {id} placeholder doesn’t seem to be substituted when performing an UPDATE.

Setup:

Headers (for all):
apikey, Authorization: Bearer <anon_key>, Content-Type: application/json, Prefer: return=representation

Flow in the app:

  1. On Screen A, I create a new macro_inputs row (step, adalo_user_id).
    The row is successfully created in Supabase.

  2. I then navigate to Screen B, where:

    • I have a List of Macro Inputs (External), filtered by adalo_user_id = Logged-In User > id, sorted by limit = 1

    • Inside the list cell I show Current Macro Inputs (External) > step, and have a button with the action:

    • Update → Current Macro Inputs (External), where I set step = 2.

The issue:

When I press the Update button, Supabase returns this error:

{
  "code": "22P02",
  "details": null,
  "hint": null,
  "message": "invalid input syntax for type bigint: \"{id}\""
}

This means the request being sent from Adalo to Supabase still contains:

?id=eq.{id}

instead of something like:

?id=eq.153

In other words, {id} is not being replaced with the current record’s primary key, even though:

  • The id field is present in the External Collection and detected as the primary key.

  • The Update action is configured as Update → Current Macro Inputs (External) inside a list cell.

  • A row definitely exists in the list (I can see it in Supabase and filter it by adalo_user_id).

My question:

Is there a known issue or specific requirement for {id} substitution in External Collections when:

  • Using Supabase REST with URLs like ?id=eq.{id}, and

  • Updating from within a list item using Update → Current [External Collection]?

Any guidance on why {id} would remain literal in the outgoing request (and not be replaced by the current record’s ID) would be really helpful.

Hi @bttrszn,

You’re using a custom action for update the record? If it is, you need to map the id with an input like this. :

Let me know!

Thank you and have a great day!

Hi @Dilon,

I’m not using a custom action as I am not familiar with it yet (non-tech person here :D). I’m using the normal update action from the API Test Set-up tho but I can try doing that too. I’ll let you know ina bit :slight_smile: Thank you!

No worries @bttrszn, thanks for the update! Where do you see the above error message? Inside the app or in Supabase?

I see the error code 22P02 inside the app when I preview it but I went to the devtools to check the actual error message.

Hello @bttrszn, If you’re seeing 22P02 in the preview and the devtools show {id} literally being sent, then the record isn’t passing the actual primary key into the update call. A few things to double check:

Make sure the id field is returned in both GET ALL and GET ONE. If the list item doesn’t contain a real id, the placeholder won’t be substituted.

Supabase bigint can sometimes be interpreted as text, which blocks substitution. Exposing the id as an integer (or through a view) usually fixes it.

Using {id} in the query string (?id=eq.{id}) isn’t always reliable. An endpoint with /macro_inputs/{id} works consistently.

If you share your GET ALL response (without sensitive data), I can tell you exactly where the issue is coming from.

Thank you!

Ali bazzi

Hi @bttrszn,

Aha, gotcha and thanks for the information!

Should be a simple fix, instead one curly bracket, add two > save > should be good! I mean when setting up the external collection. ( for example, instead this : https://[project].supabase.co/rest/v1/macro_inputs?id=eq.{id}, make it like this : https://[project].supabase.co/rest/v1/macro_inputs?id=eq.{{id}} )

Let me know!

Thank you and have a great day!

Thanks @Dilon! I tried this and there’s no error code but I couldn’t see the components on the next screen (screen b). It looks like the CREATE action on Screen A didn’t work although I can see rows were created on Supabase.

You’re very welcome @bttrszn! Would you be able to provide a quick screen recording with loom showing your current setup and preview?

Hi @Ali-Bazzi,

Thanks so much sharing that with me. I figured there’s something wrong with ?id=eq.{id} but here’s my GET all response:

[
{
“id”: 1,
“created_at”: “2025-11-10T16:14:36+00:00”,
“goal”: “test”,
“activity_level”: “Sedentary”,
“gender”: “Male”,
“age”: 28,
“weight_kg”: 84,
“progress_speed”: “moderate”,
“calculation_method”: “AI”,
“calories”: 1000,
“protein_g”: 1300,
“carbs_g”: 800,
“fat_g”: 200,
“completed_at”: “2025-11-10T16:18:07+00:00”,
“step”: 1,
“activity_k”: 8,
“speed_pct”: 1,
“protein_per_lb”: 1,
“legal_age”: true,
“height_cm”: 174,
“BMR”: 1,
“TDEE”: 1,
“protein”: 1,
“calories_g”: 1,
“adalo_user_id”: “1”
}
]

Thank you, @Dilon! Loom is currently lagging right now but I screen-recorded it and saved it on my drive. Do you have an email where I can send it to?

Hi @bttrszn,

No worries and I can send that but could you confirm if it’s the same in your settings?

  1. GET ALL : https://[your-project-id].supabase.co/rest/v1/macro_inputs?select=* (GET)
  2. GET ONE : https://[your-project-id].supabase.co/rest/v1/macro_inputs?id=eq.{{id}}&select=* (GET)
  3. CREATE : https://[your-project-id].supabase.co/rest/v1/macro_inputs (POST)
  4. UPDATE : https://[your-project-id].supabase.co/rest/v1/macro_inputs?id=eq.{{id}} (PATCH)
  5. DELETE : https://[your-project-id].supabase.co/rest/v1/macro_inputs?id=eq.{{id}} (DELETE)

Thank you and have a great day!

Hi @Dilon, yes. Its the same

Hello @bttrszn, you’re very welcome!

Thanks for sharing the GET ALL response. Your id is coming through correctly, but your adalo_user_id is returned as a string (“1”) instead of a number. When the list is filtered by adalo_user_id = Logged-In User > id and one side is numeric while the other is a string, the record loads visually but the underlying item doesn’t bind fully, especially the primary key. That’s why {id} stays literal during the update.

You have two options that you can try to fix it:

  1. Store adalo_user_id in Supabase as a numeric type, not text.

  2. Or expose it through a view as an integer.

After that, the list will pass the full record (including the PK), and the update request will correctly substitute the real ID.

Thank you!

Ali Bazzi

This worked! I also added Query Parameter for: adalo_user_id = iq.{logged in user > id}, limit = 1 and order = id.desc to make sure the flow works. I also had to delete all actions and conditional visibility from the screen b and set it right back. Thank you, @Dilon !!