Organiza tus páginas con colecciones
Guarda y categoriza el contenido según tus preferencias.
Crea un flujo de trabajo con la consola de Google Cloud
En esta guía de inicio rápido, se muestra cómo crear, implementar y ejecutar tu primer flujo de trabajo con la consola de Google Cloud . El flujo de trabajo de muestra envía una solicitud a una API pública y, luego, devuelve la respuesta de la API.
Para seguir la guía paso a paso sobre esta tarea directamente en la consola Google Cloud , haz clic en Guiarme:
Es posible que las restricciones de seguridad que define tu organización no te permitan completar los siguientes pasos. Para obtener información sobre la solución de problemas, consulta
Desarrolla aplicaciones en un entorno Google Cloud restringido.
Sign in to your Google Cloud account. If you're new to
Google Cloud,
create an account to evaluate how our products perform in
real-world scenarios. New customers also get $300 in free credits to
run, test, and deploy workloads.
In the Google Cloud console, on the project selector page,
select or create a Google Cloud project.
A menos que ingreses tu propio término de búsqueda, este flujo de trabajo usa tu ubicación deGoogle Cloud para construir un término de búsqueda que pasa a la API de Wikipedia. Se muestra una lista de artículos de Wikipedia relacionados.
Selecciona Implementar.
Ejecuta el flujo de trabajo
Una vez que se implementó correctamente tu flujo de trabajo, puedes ejecutarlo por primera vez. Después de implementar el flujo de trabajo, se te redireccionará a la página Detalles del flujo de trabajo.
En la página Detalles del flujo de trabajo, haz clic en play_arrowEjecutar.
En la página Ejecutar flujo de trabajo, haz clic en Ejecutar.
En el panel Resultado, se muestran los resultados del flujo de trabajo.
Implementaste y ejecutaste tu primer flujo de trabajo.
Limpia
Sigue estos pasos para evitar que se apliquen cargos a tu cuenta de Google Cloud por los recursos que usaste en esta página.
En la consola de Google Cloud , ve a la página Workflows:
[[["Fácil de comprender","easyToUnderstand","thumb-up"],["Resolvió mi problema","solvedMyProblem","thumb-up"],["Otro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Información o código de muestra incorrectos","incorrectInformationOrSampleCode","thumb-down"],["Faltan la información o los ejemplos que necesito","missingTheInformationSamplesINeed","thumb-down"],["Problema de traducción","translationIssue","thumb-down"],["Otro","otherDown","thumb-down"]],["Última actualización: 2025-09-04 (UTC)"],[],[],null,["# Quickstart: Create a workflow by using the Google Cloud console\n\nCreate a workflow by using the Google Cloud console\n===================================================\n\nThis quickstart shows you how to create, deploy, and execute your first workflow\nusing the Google Cloud console. The sample workflow sends a request to a\npublic API and then returns the API's response.\n\n*** ** * ** ***\n\nTo follow step-by-step guidance for this task directly in the\nGoogle Cloud console, click **Guide me**:\n\n[Guide me](https://console.cloud.google.com/freetrial?redirectPath=/?walkthrough_id=workflows--workflows_quickstart)\n\n*** ** * ** ***\n\nBefore you begin\n----------------\n\nSecurity constraints defined by your organization might prevent you from completing the\nfollowing steps. For troubleshooting information, see\n[Develop applications in a constrained Google Cloud environment](/resource-manager/docs/organization-policy/develop-apps-constrained-environment).\n\n- Sign in to your Google Cloud account. If you're new to Google Cloud, [create an account](https://console.cloud.google.com/freetrial) to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.\n- In the Google Cloud console, on the project selector page,\n select or create a Google Cloud project.\n\n | **Note**: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.\n\n [Go to project selector](https://console.cloud.google.com/projectselector2/home/dashboard)\n-\n [Verify that billing is enabled for your Google Cloud project](/billing/docs/how-to/verify-billing-enabled#confirm_billing_is_enabled_on_a_project).\n\n- In the Google Cloud console, on the project selector page,\n select or create a Google Cloud project.\n\n | **Note**: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.\n\n [Go to project selector](https://console.cloud.google.com/projectselector2/home/dashboard)\n-\n [Verify that billing is enabled for your Google Cloud project](/billing/docs/how-to/verify-billing-enabled#confirm_billing_is_enabled_on_a_project).\n\n1. Enable the Workflows API.\n\n [Enable the Workflows API](https://console.cloud.google.com/marketplace/product/google/workflows.googleapis.com)\n2. In the Google Cloud console, go to the **Service Accounts**\n page.\n\n [Go to Service Accounts](https://console.cloud.google.com/iam-admin/serviceaccounts)\n3. Select a project and then click **Create service account**.\n4. In the **Service account name** field, enter a name, such as `sa-name`.\n5. Click **Create and continue**.\n6. To send logs to Cloud Logging, click the **Select a role**\n field and select **Logging \\\u003e Logs Writer**.\n\n To learn more about service account roles and permissions, see\n [Grant a workflow permission to access\n Google Cloud resources](/workflows/docs/authentication).\n7. Click **Done**.\n\n\u003cbr /\u003e\n\nCreate and deploy a workflow\n----------------------------\n\n1. In the Google Cloud console, go to the **Workflows** page:\n\n\n [Go to Workflows](https://console.cloud.google.com/workflows)\n\n \u003cbr /\u003e\n\n2. On the **Workflows** page, click add**Create**.\n\n3. Enter a name for the new workflow, such as `myFirstWorkflow`.\n\n4. Choose **us-central1** for the region.\n\n5. For **service account**, select the service account you created earlier.\n\n6. Select **Next**.\n\n7. In the workflow editor, copy and paste the following workflow:\n\n ### YAML\n\n main:\n params: [input]\n steps:\n - checkSearchTermInInput:\n switch:\n - condition: '${\"searchTerm\" in input}'\n assign:\n - searchTerm: '${input.searchTerm}'\n next: readWikipedia\n - getLocation:\n call: sys.get_env\n args:\n name: GOOGLE_CLOUD_LOCATION\n result: location\n - setFromCallResult:\n assign:\n - searchTerm: '${text.split(location, \"-\")[0]}'\n - readWikipedia:\n call: http.get\n args:\n url: 'https://en.wikipedia.org/w/api.php'\n query:\n action: opensearch\n search: '${searchTerm}'\n result: wikiResult\n - returnOutput:\n return: '${wikiResult.body[1]}'\n\n ### JSON\n\n {\n \"main\": {\n \"params\": [\n \"input\"\n ],\n \"steps\": [\n {\n \"checkSearchTermInInput\": {\n \"switch\": [\n {\n \"condition\": \"${\\\"searchTerm\\\" in input}\",\n \"assign\": [\n {\n \"searchTerm\": \"${input.searchTerm}\"\n }\n ],\n \"next\": \"readWikipedia\"\n }\n ]\n }\n },\n {\n \"getLocation\": {\n \"call\": \"sys.get_env\",\n \"args\": {\n \"name\": \"GOOGLE_CLOUD_LOCATION\"\n },\n \"result\": \"location\"\n }\n },\n {\n \"setFromCallResult\": {\n \"assign\": [\n {\n \"searchTerm\": \"${text.split(location, \\\"-\\\")[0]}\"\n }\n ]\n }\n },\n {\n \"readWikipedia\": {\n \"call\": \"http.get\",\n \"args\": {\n \"url\": \"https://en.wikipedia.org/w/api.php\",\n \"query\": {\n \"action\": \"opensearch\",\n \"search\": \"${searchTerm}\"\n }\n },\n \"result\": \"wikiResult\"\n }\n },\n {\n \"returnOutput\": {\n \"return\": \"${wikiResult.body[1]}\"\n }\n }\n ]\n }\n }\n\n Unless you input your own search term, this workflow uses your\n Google Cloud location to construct a search term, which it passes to\n the [Wikipedia API](https://wikipedia.org/w/api.php). A list of\n related Wikipedia articles is returned.\n8. Select **Deploy**.\n\nExecute the workflow\n--------------------\n\nOnce your workflow has been successfully deployed, you can execute it for the\nfirst time. After deploying the workflow, you'll be taken to its\n**Workflow details** page.\n\n1. On the **Workflow details** page, click play_arrow**Execute**.\n\n2. On the **Execute workflow** page, click **Execute**.\n\n3. In the **Output** pane, your workflow's results are displayed.\n\nYou've deployed and executed your first workflow!\n\nClean up\n--------\n\n\nTo avoid incurring charges to your Google Cloud account for\nthe resources used on this page, follow these steps.\n\n1. In the Google Cloud console, go to the **Workflows** page:\n\n\n [Go to Workflows](https://console.cloud.google.com/workflows)\n\n \u003cbr /\u003e\n\n2. From the list of workflows, click a workflow to go to its\n **Workflow details** page.\n\n3. Click delete**Delete**.\n\n4. Type the name of the workflow and then click **Confirm**.\n\nWhat's next\n-----------\n\n- [Update an existing workflow](/workflows/docs/creating-updating-workflow#updating_a_workflow)\n\n- [Control the order of execution in a workflow](/workflows/docs/controlling-execution-order)\n\n- [Sample workflows](/workflows/docs/samples)\n\n- [Workflows syntax reference](/workflows/docs/reference/syntax)"]]