Hi @John_CMA
What is the link to the Wix API endpoint you used to configure the API request in the Zap step?
@John_CMA
Wix API endpoint: https://dev.wix.com/docs/rest/business-solutions/blog/draft-posts/create-draft-post
NOTES
- Try using this Zap action: Webhooks - Custom Request (POST)
- Not sure you need the ?siteId=X in the URL
- Not sure you need the Header for accountId
- There is no parameter for ‘status’ in the documentation
- The ‘content’ field is listed as: Reserved for internal use
- May need to use a different parameter
- Make sure to check out which fields are required/optional/conditionally required
- Make sure to check the valid values and field formats
{
"draftPost": {
"title": "Hello, world!",
"featured": true,
"categoryIds": e"10a5d26e-5028-4f74-92be-e5163c06b58b"],
"memberId": "8a8b9b73-4da8-47a5-8268-4396e68a0605",
"hashtags": h"world"],
"commentingEnabled": true,
"tagIds": "191dcdb7-9319-456d-9a66-eba05ef87bb7"],
"relatedPostIds": d"07f89894-5ce2-4736-9793-b36ec4719d96"],
"language": "en",
"richContent": {
"nodes":
{
"type": "PARAGRAPH",
"id": "pvirv1",
"nodes":
{
"type": "TEXT",
"id": "",
"nodes": ],
"textData": {
"text": "Hello world",
"decorations": o]
}
}
],
"paragraphData": {}
}
]
}
},
"fieldsets": i"URL", "RICH_CONTENT"]
}
Thanks for your response! The URL I originally tried to set the webhook step up with was https://www.wixapis.com/blog/v3/draft-posts. However, after attempting to troubleshoot I adjusted the Wix API endpoint to be https://www.wixapis.com/blog/v3/draft-posts?siteId=7819023f-1f8d-4306-8147-bab48d010a71. The part that I added to the URL pertains to my account ID. Of course neither of the above versions worked. I’ll reconfigure my webhook step based on your advice, and see if that helps...
I messed around with this zap all day, and still couldn’t seem to get it to do its thing. My workflow is as follows:
I use monday.com as a database that’s pre-populated with a ton of potential blog post content, and so monday.com is the zap trigger. The trigger then sends a single blog post idea to my assistant in the open ai playground. That assistant uses that data to create a blog post in Markdown format, with clickable links, block quotes, a clickable title/meta title, etc.
From there, the generated content gets sent to formatter by zapier, which converts the Markdown content into HTML. Its mapping this HTML in the webhook step that seems to be my main problem. Unfortunately, it seems that Wix uses richContent to map out blog content. So, @Troy Tessalone you were absolutely correct when you said that the “content” parameter in Wix is restricted for internal use. Rather than being able to place the dynamic HTML as “content’s” key value pair, it now appears that the only way to do this is to go through the Wix richContent and map node by node. I by no means have a developer background. So, to me this sounds like I need to reconfigure my entire automation so that my OpenAI assistant generates little blocks of HTML for each respective node of the richContent mapping framework. I’m quite certain that I’m not explaining this very well, but its been a long day with negative progress. So, needless to say - I’m feeling a bit beat up.
I think at this point my working plan is to scrape the entire WIX REST API documentation into a few documents, and try to use those documents as training data for my other OpenAI assistant that’s been helping me work through this. Once that assistant is trained on the most current Wix API documentation, then maybe it will be able to help me crawl through reconfiguring this whole automation.
That’s where I am currently - unless you or anyone else have any better suggestions.