Hello, I’ve already spent hours on this and got quite stuck.
I’m using airtable + make.com
airtable cell 1 contains a list of image links:
1._S3758502c-4d40-a8b8-d4ed1ae24f2.png
2._b5eeb3f1-9ac4-ad75-0fa73fbbccd8.png
2._34a41a6c-e782-966b-e24fc551da5b.png
3._caba3987-45db-b709-b58f2572795a.png
4._eaf600aa-47af-4db7-b560-ee2a9148.png
5._1ebfd8ab-93c4-460e-b7fa-f7d6fa00.png
5._e1c459ca-58d7-4cea-f18fb2c5a0d6.png
5._edf93dbf-46e2-a8d3-3f8f5ea3d394.png
cell 2 contains a full post in markdown:
## 1. SubHeading
>>>
There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which
<<<<
## 2. SubHeading
>>>
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer
<<<<
## 3. SubHeading
>>>
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s
<<<<
## 4. SubHeading
>>>
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s
<<<<
## 5. SubHeading
>>>
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s
I am trying to insert the correct images into the correct locations, there can be multiple images below each heading, after combining the data the end result needs to look like this:
1. SubHeading
1._S3758502c-aba1-4d40-a8b8-d4ed1a1e24f2.png
There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which
2. SubHeading
2._b5eeb3f1-9ac4-4f68-ad75-0fa73fbbccd8.png
2._34a41a6c-e782-4a3a-966b-e24fc551da5b.png
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry’s standard dummy text ever since the 1500s, when an unknown printer
3. SubHeading
3._caba3987-45db-4f73-b709-b58f2572795a.png
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry’s standard dummy text ever since the 1500s
4. SubHeading
4._eaf600aa-47af-4db7-b560-ee2ab66b9148.png
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry’s standard dummy text ever since the 1500s
5. SubHeading
5._1ebfd8ab-93c4-460e-b7fa-f7d647dcfa00.png
5._e1c459ca-58d7-4cea-aa82-f18fb2c5a0d6.png
5._edf93dbf-4dda-46e2-a8d3-3f8f5ea3d394.png
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry’s standard dummy text ever since the 1500s
Progress so far:
module 1:
retrieves the airtable record
module 2:
iterates over the post splitting into sections
{{split(42.Full post Test
; “<<<<”)}}
module 3:
I then use a text parser to extract the heading number
##\s*(\d+)
module 4:
Set multiple variables with heading number and post section content
module 5:
aggregates the previous module responose into an array
module 6:
second iterator splits the image list by new lines
{{split(42.Image list
; newline)}}
module 7:
second text parser which extracts the image file number
^(\d+)._
module 8:
set multiple variables with img_nr and img_value
module 9:
aggregates the previous module into an array
…and this is where I get stuck, a rough idea I have of what to do next:
- Match the IMTKEY from Array Aggregator 2 with the heading_number from Array Aggregator
- Replace the placeholder
>>>
in the post_section with the corresponding images. - Construct the final output with images inserted.
Am I on the right track? How would you proceed? Perhaps I’m missing something and it’s not even necessary to set variables for example?
Thank you in advanced for any kind of input!