Skip to content

CreateWhatsAppFlow

Source: src/AWS/SocialMessaging/CreateWhatsAppFlow.ts

Runtime binding for social-messaging:CreateWhatsAppFlow.

Creates a WhatsApp Flow (a rich interactive form users complete inside WhatsApp) on the bound account, in DRAFT status unless publish is set with a valid flowJson.

The deploy-time half grants social-messaging:CreateWhatsAppFlow on the bound WABA’s ARN and the runtime half injects the linked account id into every request. Provide the implementation with Effect.provide(AWS.SocialMessaging.CreateWhatsAppFlowHttp).

// init — bind the operation to the linked WABA
const createFlow = yield* AWS.SocialMessaging.CreateWhatsAppFlow(account);
// runtime
const { flowId, validationErrors } = yield* createFlow({
flowName: "appointment-booking",
categories: ["APPOINTMENT_BOOKING"],
});