How to get ONE record from "Find records" step?

Is there a way to fetch just one record or take the first/last one from the returned list?

In table A I have a record with an email.
In table B, I also have records with their emails.

I need to update A record with B attributes but they come from different sources and are not associated - they just have the same emails.

Unfortunately, there is no native built-in way to do that with automations, so you would need to find a different way of doing it.

You could write a custom JavaScript, or you could use an automation tool like Integromat which lets you limit your searches to 1 found record, and also lets you filter your search results, sort your search results, aggregate your search results, iterate through your search results, and more.

There might even be a better way of structuring your entire base so that you don’t need to use automations to do it at all.

Uh… I have two data sources that put the data in different tables. The only way to associate them then is via email.

By a custom JS code you mean a scripting step?

Yes, a scripting step.

Are you doing this with linked records? Is there any chance of making the email field the primary field of Table B?

Are you doing this with linked records?

Unfortunately not, they come from different sources.

Is there any chance of making the email field the primary field of Table B?

Yes, I think so.

The origin of the records should not affect whether or not you can link them together.

If the primary field of Table B is the email then you can do one of two things:

  1. Convert Table A’s email field into a Link to Another Record field pointing to Table B.
  2. Keep Table A’s email field the same and add a new field for the Link to Another Record pointing to Table B.

Option 1 means you won’t need any automations at all, Option 2 means you could use a simple Update Record step in an automation to copy a Table A record’s {Email} value into the {Link to Table B} field (no script required).

Once you’ve done either 1 or 2, then add add Lookup fields to Table A to bring in Table B’s values.

1 Like

Email in table A is actually already a lookup from another table.

In Option 2 the issue is that a record in table B appears later than the record in table A. It means I cannot automate the update of table A since there is no corresponding record in table B yet.