Best answer

Use the line items created by a regex formatter with Airtable's find or create record

  • 19 September 2023
  • 6 replies
  • 46 views

Userlevel 1
Badge

I have a Zap with a new-email-message trigger.  Each email will have one or two IDs in the subject and a PDF attachment.  My goal is to create an airtable table record that contains the ID and the attachment.

I created a regex text formatter to split the subject into line items.  For example:

output
1
0 Y123456789
2
1 Z123456789

Next, I try to use these line items with Airtable’s “Find many records (with line item support)”.  I chose the desired field to search and output 0 and the search value.

Unfortunately, only one of the two records is actually created in Airtable.

What am I missing?

icon

Best answer by Troy Tessalone 19 September 2023, 22:01

View original

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

6 replies

Userlevel 7
Badge +14

Hi @craibuc 

Good question.

Try using the Looping app to iterate thru each item: https://zapier.com/apps/looping/help

Userlevel 1
Badge

Here’s the results of the extract pattern, text formatter:

which is connected to the looping app:

 

Unfortunately, the loop only processes once, even when it’s published.

Am I mapping the values between the two steps correctly?

Userlevel 7
Badge +14

@craibuc 

Can you post screenshots with how your Formatter step is configured?

That’s because these are separate data points.

 

Userlevel 1
Badge

the regular expression matches IDs that start with Y or Z, with numerical endings.  In the example, two IDs are identified.

Userlevel 7
Badge +14

@craibuc

Try using this Zap action: Formatter > Text > Split

 

OR

 

Try using a JavaScript Code step instead of a Formatter step.

 

CONFIG

 

CODE

let Set = inputData.Set.split(" ~ ");

output = [{Set}];

 

OUTPUT

 

Userlevel 1
Badge

That worked.  Thanks.