Connecting to Contentful
Your users will need the following information to connect their Contentful account with your integration built with Paragon Connect:
- Content Management API Token
Connecting users can create a Content Management API Token under Settings > CMA tokens in Contentful.
This is an API-only integration - workflow actions for this integration are still in development. You can still connect user accounts, build workflows, and access the API for this integration.
Once your users have connected their Contentful account, you can use the Paragon SDK to access the Contentful Content Management API on behalf of connected users.
See the Contentful Content Management API reference for their full API documentation.
Any Content Management API endpoints can be accessed with the Paragon SDK as shown in this example.
// You can find your project ID in the Overview tab of any Integration
// Authenticate the user
paragon.authenticate(<ProjectId>, <UserToken>);
// List entries in a space
await paragon.request("contentful", "spaces/<space_id>/entries", {
method: "GET"
});
// Get a single entry
await paragon.request("contentful", "spaces/<space_id>/entries/<entry_id>", {
method: "GET"
});
Building Contentful workflows
Once your Contentful account is connected, you use the Contentful Request step to access any of Contentful’s Content Management API endpoints without the authentication piece.
When creating or updating records in Contentful, you can reference data from previous steps by typing {{ to invoke the variable menu.