arazzo: 1.0.1 info: title: Salesforce Experience Cloud Feed Post and Like summary: Post a feed element to a community and like it on behalf of the user. description: >- A lightweight engagement flow that publishes a feed element to an Experience Cloud site and then registers a like against it for the context user, confirming the like was recorded. Each step spells out its request inline so the flow can be read and executed without opening the underlying OpenAPI description. version: 1.0.0 sourceDescriptions: - name: connectCommunitiesApi url: ../openapi/salesforce-experience-cloud-connect-communities-openapi.yml type: openapi workflows: - workflowId: feed-post-like summary: Post a feed element and like it. description: >- Creates a feed element on a community feed and adds a like to it on behalf of the context user. inputs: type: object required: - accessToken - communityId - subjectId - postText properties: accessToken: type: string description: OAuth 2.0 bearer token for the Salesforce instance. communityId: type: string description: ID of the Experience Cloud site (community). subjectId: type: string description: ID of the parent record the post is attached to. postText: type: string description: Text body for the feed element. steps: - stepId: postFeedElement description: Create a text feed element on the community news feed. operationId: postFeedElement parameters: - name: Authorization in: header value: Bearer $inputs.accessToken - name: communityId in: path value: $inputs.communityId requestBody: contentType: application/json payload: feedElementType: FeedItem subjectId: $inputs.subjectId body: messageSegments: - type: Text text: $inputs.postText successCriteria: - condition: $statusCode == 201 outputs: feedElementId: $response.body#/id - stepId: likeFeedElement description: Add a like to the new feed element on behalf of the context user. operationId: likeFeedElement parameters: - name: Authorization in: header value: Bearer $inputs.accessToken - name: communityId in: path value: $inputs.communityId - name: feedElementId in: path value: $steps.postFeedElement.outputs.feedElementId successCriteria: - condition: $statusCode == 201 outputs: likeId: $response.body#/id outputs: feedElementId: $steps.postFeedElement.outputs.feedElementId likeId: $steps.likeFeedElement.outputs.likeId