Skip to main content

Hi there,

 

I have replicated a MySQL database that I use for a separate web app to my Adalo records and use Zapier to update and create new records from new MySQL entries to Adalo records and vice-versa.

 

One such interaction that I’m having trouble with is assigning ‘devices’ to ‘users.’ I have a junction table in MySQL to connect these instances, as well as separate ‘devices’ and ‘users’ tables. When a new entry is made in the junction table ‘user_device’ on MySQL, I want to 

  1. Create a new record in my ‘user_device’ database on Adalo (functionally does nothing but I believe I need to create a new record to use the record ID in Adalo for the next step)
  2. Update the corresponding device_id in my ‘devices’ database on Adalo to add the ‘user_id’ to link that device to the user (background info, this is a many-to-many relationship).

 

I can successfully create a new record in Adalo as mentioned in step 1. But to update the ‘devices’ database and add the user to the record, my Zap is displaying the following:

 

Problem

Your Zap is likely to be missing a required field, or a field value wasn't in a recognized format. For example, if a field in your action step is expecting an email address, but the value given is a name, the app may return a 400 error.

Solution

Check that your fields are correctly set up and mapped to each other.

 

I am using the Record ID from the newly created record in Adalo, and only adding the ‘user_id’ to the ‘devices’ database. I am not missing any required fields but I am not certain what I am missing as I would imagine I don’t need to provide more information that Adalo needs to update the ‘device’ database.

 

 

 

Any advice is greatly appreciated!

Hey @Henrikcox,

It sounds like you are passing the newly created user_device id in as the Record ID when you would really want to be passing in a different id (the device’s record id).

The newly created record that your Zap creates will exist in your user_device database, not your device_id database. Do I have that right?

If so, to solve: Is there any way you can pass the right record id on so you can properly make the update? Perhaps if you store Adalo device record ids in MySQL, you can get this data from MySQL


Hi @ZappinAndy,

 

The newly created record that your Zap creates will exist in your user_device database, not your device_id database. Do I have that right?

 

Yes this is right, and I believe I see what you mean. I just tried creating a second zap that would use the new record in user_device (on Adalo) as the trigger to update the device database. Again to no luck, but I believe it’s because the only options for fields to use as a record ID only include what has been read on the trigger in the user_device fields.

 

So I understand correctly, are you suggesting I add a column to my devices table in MySQL to use as an Adalo record ID, or a different table? Right now it seems like it’s not able to pick up any of the fields from the devices table when I am attempting to trigger the update for it.  

 

Screenshot  shows my second zap, mentioned above, with all the possible options that can be chosen for record ID when devices table is selected as the table I want to update after a new record is created in Adalo’s user_device database.

 

 


Hey there, @Henrikcox! I wanted to touch base and see if you were able to set this up?
Apologies for not having more insight to offer here! @ZappinAndy may be able to offer more clarity but definitely keep us posted if you were able to get squared away solo! 

We’d love to know your solution! 😍


> So I understand correctly, are you suggesting I add a column to my devices table in MySQL to use as an Adalo record ID, or a different table? Right now it seems like it’s not able to pick up any of the fields from the devices table when I am attempting to trigger the update for it.  

 

That’s what I was thinking as a solution. E.g., if your devices all have an associated record in MySQL and a record in Adalo, making sure the Adalo ID is stored of the corresponding MySQL record. Adding that column in the devices table should help. But feel free to update here if you get stuck!


Apologies for the delay in response! This has been on my backburner for a couple of weeks. I went ahead and added Adalo_record_id columns to both MySQL and Adalo Records. I’m hitting a bump right now on my Zap where the field ‘Adalo_record_id’ isn’t showing as a field option when I set up my ‘Action’ step. It shows no problem in my Trigger, and I’ve made sure to refresh the fields so that it should get picked up. Any thought son this? I’m hoping once this is fixed, I’ll be able to see and select ‘Adalo record ID’ as a Record ID selection.

 


Reply