Hello. I am trying to map a series of fields in AirTable (“Pro 1”, “Pro 2”, “Pro 3” etc) to a Custom Field in Wordpress which is an array.
These are the fields in AirTable:
This is where I need to feed these values in:
Also - there are up to 5 fields in the source, but not all of them are always populated. Bonus points if I can just create the ones I need based on “are they empty or not”.
That’s a clever solution to create an array. Unfortunately even though I have my bundle packaged correctly, I still can’t insert the info in Wordpress. I’m afraid it’s an issue of ACF and “repeater” kind of fields.
Thank you for teaching me this little trick though!
I am extracting 5 fields from Airtable (‘Pro 1’, ‘Pro 2’, ‘Pro 3’, ‘Pro 4’, ‘Pro 5’)
I am then trying to insert these into Wordpress. Only this field (and a couple others structured in the same way) don’t work. Whatever I try to import in there, the end result is that field being “empty”.
In the Wordpress module (either create a post or update a post) there is a room for “custom fields”, in which you insert key/value pair.
If this field was flat, I could select “pros” as key and “string” as the value and the field would be successfully populated.
I can manage to create an array of these values (Pro 1-5) but only with the values, not a key/value combo like in the screenshot above.
I really don’t know how to add a key to the array → in the array I only have values.
This setup seems to work for me. I don’t use Wordpress in any of my workflows, so I’m not entirely sure if this is what you aim to achieve, but reading your replies it just might be.
The iterator creates an array from your Airtable fields (empty fields are omitted) and sends them out as new bundles for each field, then the aggregator adds them to an array with objects with the right target structure. The output of this aggregator module is what you add to the custom field in the Wordpress module.
Now, before we get to the “update post” part, which is where I have an issue, here is how these fields are if I read another post that was inserted manually:
The input has “pros.pro_line” because pro_line is nested inside “pro” and it’s where each value should go. I tried with just doing “pros” or just “pro_line” but nothing changes. At all.
The output well… it only says “empty” and you can see other fields (not nested) get inserted no problem:
Check out my last post and try adding an aggregator to your flow and set the target structure to the module field that you aim to target (Metadata (custom fields)) for instance.
If that works you can remove the “Set variable” module and directly insert it’s value into the iterator to save some ops.
Can you enter the values manually and run the scenario, if that gives you the aimed result? If so, run it manually and download the input bundles and take a screenshot of that. That way we can compare it to the mapped input and see where it is going wrong between mapping and manual inputs.
You download the input bundles by pressing the little download dropdown next to “Data size:” in the run summary.
I mean, how are you getting to this result? What are you entering? I can’t look into your scenario, unfortunately and I don’t work with the Wordpress modules more than I did today to try and find a solution for you.