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.