I want to create a flow that automaticly post blogpost on a wix website.
I have found the Wix API but have no experience coding in Active Pieces. Does someone feel like helping me creating this connection in Active Pieces?
Thanks in advance!
I want to create a flow that automaticly post blogpost on a wix website.
I have found the Wix API but have no experience coding in Active Pieces. Does someone feel like helping me creating this connection in Active Pieces?
Thanks in advance!
Hey @Media_Moens,
The Wix documentation you provided gives a good understanding of the data structure for creating a draft post. I’ll guide you through the process.
Preparation:
Ensure you’ve set up the necessary API access on Wix. They will typically require you to generate an API key or token for authentication.
Setting Up the HTTP Block:
a. Method: Set it to POST (as specified by Wix’s documentation for creating a blog post).
b. URL: Enter the endpoint URL provided by Wix for creating a blog post. (https://www.wixapis.com/blog/v3/draft-posts
)
c. Headers: This is where you would add any necessary headers for the request, such as Authorization (for your API key or token) and Content-Type set to application/json.
d. Query params: Unless Wix requires specific query parameters for creating a blog post, you can leave this blank or add the necessary parameters.
e. Body: This is where you structure your request payload. Based on the example you’ve given, it would look something like this:
{
"draftPost": {
"title": "Your Blog Post Title Here",
"featured": false,
"language": "en",
... (other necessary attributes)
}
}
This is the entire example that is given on Wix’ documentation page for creating a Draft Post, which should give you a good understanding of what fields to add:
{
"draftPost": {
"id": "448d1238-0072-4458-a280-bf81c2dd8af1",
"title": "Places to visit in europe",
"featured": false,
"categoryIds": [],
"memberId": "2d24cb8a-adcc-466a-ab59-fa74e0889a39",
"hashtags": [],
"commentingEnabled": true,
"minutesToRead": 0,
"tagIds": [],
"relatedPostIds": [],
"pricingPlanIds": [],
"language": "en",
"changeOrigin": "AUTO_SAVE",
"contentId": "622f285f7952527f485bc138",
"editingSessionId": "0aca7f65-1237-482e-bf51-6d14102ee691",
"status": "UNPUBLISHED",
"mostRecentContributorId": "2d24cb8a-adcc-466a-ab59-fa74e0889a37",
"hasUnpublishedChanges": true,
"editedDate": "2022-03-14T11:34:55.121Z",
"seoData": {
"tags": []
},
"seoShowInSearch": true,
"seoShowSnippetInSearch": true,
"slugs": [],
"createdDate": "2022-03-14T11:34:55.121Z"
}
}
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.