Payload CMS

Interact with Payload CMS collections and globals

Overview

This node interacts with the Payload CMS API to perform various operations on authentication-enabled collections. Specifically, the 'Auth' resource with the 'Me' operation retrieves the current authenticated user's information from a specified auth-enabled collection. This is useful for workflows that need to verify or use the current user's data, such as personalizing content or managing user sessions.

Use Case Examples

  1. Retrieve the current user's profile information from the 'users' auth collection to display personalized dashboard data.
  2. Use the 'Me' operation to verify the logged-in user's identity before allowing access to restricted workflow steps.

Properties

Name Meaning
Auth Collection Specifies which auth-enabled collection to query for the current user information.
Additional Options Optional parameters to customize the request, such as depth of relationship population, pagination, sorting, filtering, field selection, and locale.

Output

JSON

  • json - The JSON response containing the current authenticated user's data from the specified auth collection.

Dependencies

  • Requires an API key credential for Payload CMS API authentication.

Troubleshooting

  • Authentication failures due to invalid or expired API credentials. Ensure the API key and base URL are correct and the token is refreshed if expired.
  • Errors parsing JSON in 'Where' clause if the JSON format is invalid. Validate JSON syntax before input.
  • Network or connectivity issues with the Payload CMS instance can cause request failures. Verify the CMS is accessible from the n8n environment.

Links

Discussion