hi there. i’m making attempting to make my first scenario:
create a linkedin organization image post by inserting the following from a regular mailchimp campaign:
- image from the campaign html (containing a string such as ‘linkedin’ in the filename?)
- the campaign archive url
- the campaign subject line
i think mostly struggling with scraping the desired image from the campaign html
thanks for any help
Can you give an example of the HTML code? To pull out something like that you’ll need to look for a pattern. You can also upload the file to a cloud storage and pull it from there if it’s an image you created.
i can ensure filename contains a given string
Here’s a regex pattern to parse HTML for an image tag where the filename contains the string “linkedin”:
<img\s+[^>]*src=["']?([^"'\s>]*linkedin[^"'\s>]*\.(?:jpg|jpeg|png|gif|webp|bmp|svg))["']?[^>]*>
Use groups like this (?([\s\S]*?)) to separate the image html, archive url, and the subject line
not sure where to insert parser. this is where i’m currently at
You need to first down load the file from the url for the image. Use the “HTTP” module “Get File” Then you can map the “File” section in the Linkedin module.
yes, have been trying to see which item outputs html/ content from campaign …
What is in the “inline css”?
Maybe try the get campaign module and see if that pulls more data on the campaign?
I don’t use mailchimp so not too familar with thier data structure.
Hope this helps!