Organízate con las colecciones
Guarda y clasifica el contenido según tus preferencias.
Crear un flujo de trabajo con la Google Cloud consola
En esta guía de inicio rápido se muestra cómo crear, desplegar y ejecutar tu primer flujo de trabajo con la consola de Google Cloud . El flujo de trabajo de ejemplo envía una solicitud a una API pública y, a continuación, devuelve la respuesta de la API.
Para seguir las instrucciones paso a paso de esta tarea directamente en la Google Cloud consola, haz clic en Ayúdame:
Es posible que las restricciones de seguridad definidas por tu organización te impidan completar los siguientes pasos. Para obtener información sobre cómo solucionar problemas, consulta el artículo Desarrollar aplicaciones en un entorno limitado Google Cloud .
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 introduzcas tu propio término de búsqueda, este flujo de trabajo usa tuGoogle Cloud ubicación para crear un término de búsqueda, que pasa a la API de Wikipedia. Se devuelve una lista de artículos de Wikipedia relacionados.
Selecciona Desplegar.
Ejecutar el flujo de trabajo
Una vez que tu flujo de trabajo se haya desplegado correctamente, puedes ejecutarlo por primera vez. Después de desplegarlo, accederás a su 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 Información, se muestran los resultados del flujo de trabajo.
Has desplegado y ejecutado tu primer flujo de trabajo.
Limpieza
Para evitar que se apliquen cargos en tu cuenta de Google Cloud por los recursos utilizados en esta página, sigue estos pasos.
En la Google Cloud consola, ve a la página Flujos de trabajo:
[[["Es fácil de entender","easyToUnderstand","thumb-up"],["Me ofreció una solución al problema","solvedMyProblem","thumb-up"],["Otro","otherUp","thumb-up"]],[["Es difícil de entender","hardToUnderstand","thumb-down"],["La información o el código de muestra no son correctos","incorrectInformationOrSampleCode","thumb-down"],["Me faltan las muestras o la información que necesito","missingTheInformationSamplesINeed","thumb-down"],["Problema de traducción","translationIssue","thumb-down"],["Otro","otherDown","thumb-down"]],["Última actualización: 2025-08-20 (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)"]]