Interaction with AI

  • n8n version: latest docker pull image
  • Database (default: SQLite): Postgressql
  • n8n EXECUTIONS_PROCESS setting (default: own, main): no idea
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
  • Operating system: Docker on Synology NAS

Hi,

I would like to interact with an AI assistant via mail.
Basis is very easy, that works. By then I would like it to create a blogpost based upon input I give.
It should then reply and ask if ok. When I say it is ok, it can post it, if I have remarks it should redo it until I say it is ok.
Just like with an employee.

Thanks for your feedback!
J

Without going in too deep, it doesn’t sound to complicated. But without further details, it might be hard to give you useful hints.
It sounds like the interaction by mail works already. So its the blogpost part you are asking about? The question is what kind of blog do you use. If it has some kind of api, it should be easy to send the post to your blog.
Can you give some more details?

Ive done this. It will depend on the blog software. I have mine post it in Draft mode on the blog and then email me letting me know it is ready. I can then go in and read it, make sure it is right, and schedule the post to go live on a given date.

Blogging to WordPress works well for me—I send an email with the topic or content, and it uses OpenAI to generate the blog post, setting it as a draft with an image on WordPress.

What I’d like to improve is adding a review step before posting. Instead of directly saving the draft to WordPress, I’d prefer to receive an email with the proposed content and image, where I can review and request changes, similar to a ChatGPT session. Once I’m satisfied, I could then confirm for it, all via mail, to publish or schedule the post.

I’d also like a way to check which posts are in draft via mail. Ideally, it would respond with a list of drafts, and I could select a specific post (by ID) to review and edit as needed. After finalizing the content and image, I’d have the option to publish, schedule, or keep it in draft.

So like a social media manager which I can mail to and ask to take actions on blogposts.

I see. Sounds like you could use a merge. Then send the prepared post to one input and your confirmation to the second input. If they are both positive you can send the post to WP. Use “Choose Branch” mode in the merge node. It shouldn’t be a problem to repeat the review until you are ready to send the confirmation to merge.

The problem with WP and drafts is, that the are protected. At least they were when i looked into it a long time ago. Out of the box, you are not able to get them with the API. You can change the API behavior though. So its possible but needs some work.
Depending on your use case, you could try a workaround. Maybe treat those specific drafts as regular posts and put them in a hidden category, then fetch them from there.

Thanks! The back and forth concept via mail is key for me. Appreciate your input but don’t understand how you would implement that.
So the AI assistant creates a draft blog, answers with it and asks if ok, then I say no or yes. It should not recreate the blog right, it should use same content to work with and iterate on it or deploy to WordPress.

Listing WordPress drafts I can tackle later on :grin:

This is just a rough untested mockup, but maybe it gives you an idea. It’s not my previous suggestion with the merge node. Controlling the switch with a specific phrase in your email should be pretty straightforward. And if you get the WP drafts issue handled, you could add another rule to the switch. Maybe something like “confirmpost”, “sendtodrafts” and no phrase for rewriting.

1 Like

Will try, thanks!!

One thing though: the AI needs to create a blog post following specific guidelines, like a title, intro, key takeaways, and reference links. It should be able to take input from a website link (by scraping the site) and, later, from other sources like YouTube or X. Then, it will create the blog post with an image and check back with me to confirm if it’s ready to publish.

The process involves back-and-forth on the article and picture: I review each draft, and if I’m not satisfied, I provide feedback on what to change. Once I’m happy with it, I give the final OK to post.

Essentially, it’s like a ChatGPT interaction: you iterate until satisfied, and then take the action. Initially, it might be easier to test this workflow via chat and then replace chat with email.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.