Hello all,
I have a scenario using an iterator which produces three bundles. Bundle 1 being a first name, bundle 2 a last name and bundle 3 an email address.
How can I extract these specific bundles to map into specific fields in an Airtable base for example?
e.g. Bundle 1 maps into the “First Name” field in Airtable, Bundle 2 maps into “Last Name” field etc.
I’ve tried to figure it out myself and searched through this forum, however had no luck.
Thanks in advance for any helps!
Hello @SdogEeinnarg,
For this, you can use an Array Aggregator and select the Iterator module as the source.
This will allow you to combine the values from the bundles into a single array.
There may be more efficient ways to handle it, but without the context of your entire scenario, it is difficult to advise any further.
Once that array is created, in subsequent modules after the Aggregator, you can either read directly from the Aggregator, or use a function like map() to make a simpler array, then use get() to get specific items from the array, either by name or position/index #.
Hope this helps!
2 Likes
Thanks @Donald_Mitchell , I’ll certainly play around with you suggestion.
To give more context with an image of the scenario below; my idea was to be able to send an email to my own email account with a coded subject line (for example #zzz follow up), which the scenario would filter for. The body of the email would be what I would want to capture e.g. first line = first name, second line = last name, third line = email address
As said above, below is a picture of the current scenario I’m playing with - I’m almost certain I’m doing it inefficiently, so I’m happy for you to poke holes in it.
Thanks again!
Hello @SdogEeinnarg,
Thanks for that. In this case then you could use a Match elements Text Parser module on the body of the email, if you can get the body to match one of the predefined patterns:
You would need the body to have something like
firstname: Rick
lastname: Bauer
Then that module could fairly easily extract the info.
If that’s not possible, then you could try a Match Pattern Text Parser module which let’s you extract data using a Regular Expression.
The body of the email is strictly entire contents of line one is the first name, line two is the second name, and line three is the email, like this:
Rick
Bauer
RBauer@example.com
Then, you could get away with splitting that body of text by {{newline}} (which creates an array), then use the get() function to get elements 1, 2, and 3, which correspond to first name, last name, email, respectively.
For the subject of the email, you could use a Match Pattern there as well, a separate module since each is operating on different texts.
Here’s a blueprint you can import into a new scenario and play around with.
Extract specific bundle value from iterator.json (9.2 KB)
2 Likes
Wonderful, implementing the blueprint worked a treat! Thank you very much, this is precisely what I was trying to achieve, and I appreciate you helping me with it as I think I would have struggled on my own with configuring the Extract Subject Code module - it’s helpful to have practical example of using this for future reference too.
Thank you very much @Donald_Mitchell !
2 Likes