Skip to content

feat(nodes): WordPress integration with blog publishing support Closes #33#45

Closed
DheerajShrivastav wants to merge 4 commits into
wespreadjam:mainfrom
DheerajShrivastav:feat/wordpress-integration
Closed

feat(nodes): WordPress integration with blog publishing support Closes #33#45
DheerajShrivastav wants to merge 4 commits into
wespreadjam:mainfrom
DheerajShrivastav:feat/wordpress-integration

Conversation

@DheerajShrivastav
Copy link
Copy Markdown
Contributor

Summary

Implements comprehensive WordPress integration for blog management and media upload.

Closes #33

Features

  • ✅ Basic Auth credential support
  • ✅ 4 WordPress operations: createPost, updatePost, getPosts, uploadMedia
  • ✅ Complete Zod schema validation
  • ✅ Comprehensive test suite (773 lines)
  • ✅ Normalized output with pagination support
  • ✅ Proper error handling with fetchWithRetry

Implementation Details

  • Follows CONTRIBUTING.md patterns exactly
  • Uses camelCase node naming: wordpressCreatePost, etc.
  • Supports subpaths in siteUrl configuration
  • Includes media upload with base64 content support
  • Full TypeScript type safety

Testing

  • All 28 nodes register successfully
  • Complete unit test coverage
  • Manual testing with WordPress API confirmed

DheerajShrivastav and others added 4 commits March 1, 2026 21:39
Closes wespreadjam#33

- Add wordpressCreatePost node — creates a new post via POST /wp-json/wp/v2/posts,
  defaults to draft status; supports categories, tags, featuredMediaId
  (mapped to featured_media), excerpt, slug
- Add wordpressUpdatePost node — partially updates a post via
  POST /wp-json/wp/v2/posts/{id}; only sends explicitly provided fields
- Add wordpressGetPosts node — fetches posts via GET /wp-json/wp/v2/posts;
  supports status, perPage (mapped to per_page, capped 1-100), page, search;
  reads X-WP-Total response header for totalFound; returns
  { posts, meta: { totalFound, limit, offset } }
- Add wordpressCredential using defineBasicCredential with siteUrl, username,
  applicationPassword fields; Authorization header computed at runtime as
  Basic base64(username:applicationPassword)
- Normalize raw WP REST API snake_case responses to consistent camelCase
  shape (title.rendered -> title, featured_media -> featuredMedia, etc.)
- Support siteUrl subpaths (e.g. https://example.com/blog) and strip
  trailing slashes before building endpoint URLs
- Add wordpress to NodeCredentials interface in core
- Register all three nodes in builtInNodes (27 total)
- Use fetchWithRetry for all API calls
- 43 unit tests: credential metadata, schema validation, normalizer,
  request shaping, auth header, X-WP-Total parsing, offset computation,
  subpath/trailing slash handling, missing credentials errors, error responses

Co-Authored-By: Claude <noreply@anthropic.com>
@MAlshaik
Copy link
Copy Markdown
Contributor

MAlshaik commented Mar 3, 2026

Merged in commit a86d34f. Thank you for the WordPress integration! 🎉

@MAlshaik MAlshaik closed this Mar 3, 2026
@DheerajShrivastav
Copy link
Copy Markdown
Contributor Author

Hey @MAlshaik , thanks so much for merging this and the other PR! I’m really glad the features are helpful. I noticed that for both PRs, the commits were pushed directly to main instead of using GitHub’s merge, so my GitHub profile didn't get the author credit/contribution squares for the work. Since I'm actively trying to build up my open-source profile, would it be possible to use the standard merge button or the --author flag for future PRs? I'd really appreciate it!

@MAlshaik
Copy link
Copy Markdown
Contributor

MAlshaik commented Mar 4, 2026

Hey yes sorry about this i fixed the issue and gave u the author. let me know if there is any problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Integration] WordPress - Blog publishing

2 participants