| 28 | |
| 29 | // [START dialogflow_cx_create_page_sample] |
| 30 | async function createPage(projectId, agentId, flowId, location, displayName) { |
| 31 | const pagesClient = new PagesClient(); |
| 32 | |
| 33 | const createPageRequest = { |
| 34 | parent: `projects/${projectId}/locations/${location}/agents/${agentId}/flows/${flowId}`, |
| 35 | page: { |
| 36 | displayName: displayName, |
| 37 | }, |
| 38 | }; |
| 39 | |
| 40 | const response = await pagesClient.createPage(createPageRequest); |
| 41 | console.log(response); |
| 42 | } |
| 43 | // [END dialogflow_cx_create_page_sample] |
| 44 | |
| 45 | await createPage(projectId, agentId, flowId, location, displayName); |