arazzo: 1.0.1 info: title: WhatsApp Send Text and Mark Inbound Read summary: Send a text reply and mark the customer's inbound message as read. description: >- A typical customer service turn on the WhatsApp Cloud API. The workflow sends a text message reply to a customer and then marks the inbound message that prompted the reply as read so the customer sees the blue read receipt. Both actions use the same messages endpoint with different payload shapes. Every 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: whatsappCloudApi url: ../openapi/whatsapp-cloud-api-openapi.yml type: openapi workflows: - workflowId: send-text-and-mark-read summary: Send a text reply, then mark the originating inbound message as read. description: >- Sends a text message to the customer and then issues a status update against the messages endpoint to mark the inbound message identified by its message ID as read. inputs: type: object required: - accessToken - phoneNumberId - to - body - inboundMessageId properties: accessToken: type: string description: Access token with whatsapp_business_messaging permission. phoneNumberId: type: string description: The WhatsApp phone number ID that sends the message. to: type: string description: Recipient phone number in E.164 format without the leading plus. body: type: string description: The text body of the reply (max 4096 characters). inboundMessageId: type: string description: The wamid of the inbound message to mark as read. steps: - stepId: sendReply description: >- Send a text message reply to the customer with optional URL preview disabled by default. operationId: sendMessage parameters: - name: Authorization in: header value: Bearer $inputs.accessToken - name: phone-number-id in: path value: $inputs.phoneNumberId requestBody: contentType: application/json payload: messaging_product: whatsapp recipient_type: individual to: $inputs.to type: text text: body: $inputs.body successCriteria: - condition: $statusCode == 200 outputs: messageId: $response.body#/messages/0/id - stepId: markRead description: >- Mark the originating inbound message as read by sending a read status update against the same messages endpoint. operationId: sendMessage parameters: - name: Authorization in: header value: Bearer $inputs.accessToken - name: phone-number-id in: path value: $inputs.phoneNumberId requestBody: contentType: application/json payload: messaging_product: whatsapp status: read message_id: $inputs.inboundMessageId successCriteria: - condition: $statusCode == 200 outputs: success: $response.body#/success outputs: messageId: $steps.sendReply.outputs.messageId markedRead: $steps.markRead.outputs.success