• Instructions to Ask a Question

    For any assistance, please click the "Ask a Question" button and select the Pabbly product for which you require support.

    We offer seven comprehensive applications designed to help you efficiently manage and grow your business:

    Our support team endeavors to respond within 24 business hours (Monday to Friday, 10:00 AM to 6:00 PM IST). We appreciate your understanding and patience.

    🚀 Exclusive Lifetime Offers 🚀

    We invite you to take advantage of our special one-time payment plans, providing lifetime access to select applications:

    • 🔥 Pabbly Connect — Lifetime Access for $249View Offer
    • 🔥 Pabbly Subscription Billing — Lifetime Access for $249View Offer
    • 🔥 Pabbly Chatflow — Lifetime Access for $249View Offer

    Make a one-time investment and enjoy the advantages of robust business management tools for years to come.

adding images in wordpress post content.

hi i am building a wordpress automation which repurposes the content using rss feeds. So i have achieved everything now one last step is to add images within wordpress post description. now lets say i have 5 paragraphs and i want to add images after each paragraph then how should i proceed please. thank you.
this is my current workflow in which i am working.
 

ArshilAhmad

Moderator
Staff member
If your content remains consistent, you can use the Text Formatter to split it into multiple paragraphs. In the WordPress action step, you can then map the first paragraph, followed by the first image, then the next paragraph, next image and so on.

If the content isn’t consistent, you can directly provide the images to Gemini and ask it to insert them between each paragraph. This approach is helpful since you won’t be able to reliably split the content into multiple paragraphs when it's inconsistent.
 
i understand. now the paragraphs are split into lets say 6 small paragraphs. i can map the image in each paragraph and this is fine. now what happens if the post length is smaller or bigger. then how will it deal the mapped images for each paragraph. because i dont want to come back and map the images again. so if i setup the initial workflow of paragraghs with 6 images. then what will happen if next article is split into 4 paragraphs how will the image mapping work.
and what happens if next article is 10 paragraphs but i setup the initial workflow for 6 paragraphs and 6 images only. now will it automatically be able to post 10 images for that paragraph?
 

Preeti Paryani

Well-known member
Staff member
Hello @serwar24554,

Thank you for sharing your use case in detail.

The functionality you're aiming to achieve, dynamically inserting images after each paragraph based on varying paragraph lengths, is currently not possible using the inbuilt features alone. This is because the standard mapping in the workflow doesn’t support dynamic pairing of images and paragraphs based on content length.

Introducing an iterator in the workflow will cause it to create separate posts for each paragraph or image, which doesn’t align with your goal of combining multiple paragraphs and images into a single post.

That said, your use case can be achieved through a custom code module. You can write a code snippet that:

  • Retrieves the AI-generated content (both text and images),
  • Splits the content into paragraphs,
  • Injects images after each paragraph as per your logic,
  • And finally returns a single formatted post body.
You can then map the result of this code in the WordPress: Create Post action step to publish the complete content.

Please note that while this approach is feasible, we may not be able to assist you in writing the complete custom code. You may set it up at your end and test to see if it fulfills your requirement. Feel free to update us on how it goes or if you encounter any specific implementation issues.
 
Top