After integrating Cortex with ArgoCD, you can use Workflows to streamline and automate daily tasks. Rather than manually performing a sync through the ArgoCD UI, you can automate syncs by leveraging the ArgoCD API in a Workflow.This guide walks through a Workflow that will sync the ArgoCD application to the same cluster that ArgoCD is running, but to a different namespace, and will allow the user to choose options for the sync.
How to automate an ArgoCD sync with a Workflow in Cortex
In ArgoCD, navigate to your account settings then click Tokens > Generate New. Copy the token and store it in a secure location, as you will need it in the next steps.
Create a secret in Cortex.
Give the secret the name argocd.
For the secret value, enter the value of your ArgoCD API token.
Step 1: Create a Workflow
In the main nav of Cortex, click Workflows.
Follow the steps of the Workflows documentation to start creating a Workflow from scratch and configure its settings.
Give the Workflow a descriptive name such as “Create and sync application.”
In the Response template field you can pass a blank response body or use Mustache templating to create messages depending on what the user enters in each field.
For example, you may want to configure a response to confirm whether a sync was successful when the workflow is run. You could add the following to check the sync.status field. This example assumes you add an HTTP request action with the slug http-request in your Workflow:
{{#actions.http-request.outputs.body.status.sync.status}}Successfully synced application!{{/actions.http-request.outputs.body.status.sync.status}}{{^actions.http-request.outputs.body.status.sync.status}}Unable to sync application. Are you sure this application exists in ArgoCD?{{/actions.http-request.outputs.body.status.sync.status}}
Step 2: Add blocks to the Workflow
In your Workflow, you will add an HTTP request block to call the ArgoCD sync via the ArgoCD API, and a user input block where you define inputs that map to the JSON body of the block. The inputs should be the same sync options shown under Sync in your ArgoCD instance. The instructions below map REVISION, DRY RUN, and PRUNE as the sync options.See the Workflows documentation for more information on configuring blocks.
In the Workflow, click + to add a block. Select User input. Configure the block:
Block name: Enter a name for the block (e.g., User input).
Slug: The slug field is automatically populated based on the block name.
Under “User input fields,” click Add input. Configure the input:
Type: Select Text.
Name: Enter Revision.
Placeholder: Enter HEAD.
At the bottom of the modal, click Add input field.
Under “User input fields,” click Add input. Configure another input:
Type: Select Toggle.
Name: Enter Dry run.
At the bottom of the modal, click Add input field.
Under “User input fields,” click Add input. Configure another input:
Type: Select Toggle.
Name: Enter Prune.
At the bottom of the modal, click Add input field.
Click Save.
In the Workflow, click + to add another block. Select HTTP request. Configure the block:
Block name: Enter a name for the block (e.g., HTTP request).
Slug: The slug field is automatically populated based on the block name.
If you used a different name for your secret, replace argocd with your secret’s name.
Payload: Enter the payload referencing the output of the “User input” block. The payload that you supply can be templated and can reference an entity that the Workflow is being run with.
{"docsConfig":{"theme":"aspen","$schema":"https://mintlify.com/docs.json","name":"Cortex","colors":{"primary":"#653EE8","light":"#9378EF","dark":"#5132BA"},"logo":{"light":"https://mintcdn.com/cortex-290c0c42/JcmXgfdiEzZzqS2M/logo/cortex-light.svg?fit=max\u0026auto=format\u0026n=JcmXgfdiEzZzqS2M\u0026q=85\u0026s=3d32dd91336a0de9463a57e04f9b8bb3","dark":"https://mintcdn.com/cortex-290c0c42/JcmXgfdiEzZzqS2M/logo/cortex-dark.svg?fit=max\u0026auto=format\u0026n=JcmXgfdiEzZzqS2M\u0026q=85\u0026s=e664b364295c3625385d56e02110b4a7"},"favicon":{"light":"https://mintcdn.com/cortex-290c0c42/09VjkT_e7zMKfZOT/images/favicon.png?fit=max\u0026auto=format\u0026n=09VjkT_e7zMKfZOT\u0026q=85\u0026s=1689c84dea2d7ff7c17603f1d27163ae","dark":"https://mintcdn.com/cortex-290c0c42/09VjkT_e7zMKfZOT/images/favicon.png?fit=max\u0026auto=format\u0026n=09VjkT_e7zMKfZOT\u0026q=85\u0026s=1689c84dea2d7ff7c17603f1d27163ae"},"api":{"playground":{"display":"interactive"},"examples":{"prefill":true}},"appearance":{"default":"system"},"background":{"decoration":"gradient"},"navbar":{"links":[{"icon":"/images/us-flag.png","href":"https://app.getcortexapp.com/","label":"US"},{"icon":"/images/eu-flag.png","href":"https://app.eu.cortex.io/","label":"EU"}],"primary":{"type":"button","label":"Get a Demo","href":"https://www.cortex.io/demo"}},"footer":{"socials":{"github":"https://github.com/cortexapps","linkedin":"https://www.linkedin.com/company/cortexapp","youtube":"https://www.youtube.com/@cortex611","x":"https://twitter.com/GetCortexApp"},"links":[{"header":"Cortex","items":[{"label":"Cortex website","href":"https://cortex.io"},{"label":"Product log in (US)","href":"https://app.getcortexapp.com/login"},{"label":"Product log in (EU)","href":"https://app.eu.cortex.io/login"},{"label":"Privacy Policy","href":"https://www.cortex.io/legal/privacy-policy"},{"label":"Security Policy","href":"https://www.cortex.io/legal/security-policy"},{"label":"Terms of Service","href":"https://www.cortex.io/legal/terms-of-service"},{"label":"Status Page","href":"https://status.cortex.io/"}]},{"header":"Resources","items":[{"label":"Cortex Academy","href":"https://academy.cortex.io/"},{"label":"Blog","href":"https://www.cortex.io/blog"},{"label":"Engineering Blog","href":"https://builders.cortex.io/"},{"label":"Braintrust","href":"https://www.braintrust.cortex.io/"},{"label":"Contact Support","href":"https://support.cortex.io/"}]}]},"fonts":{"heading":{"family":"Inter"},"body":{"family":"Inter"}},"icons":{"library":"fontawesome"},"styling":{"eyebrows":"breadcrumbs","latex":false},"contextual":{"options":["copy","view","chatgpt","claude","download-pdf"],"display":"header"},"interaction":{"drilldown":true},"metadata":{"timestamp":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"cortex-290c0c42","hasAudioNarration":false,"actualSubdomain":"cortex-290c0c42","customDomains":["docs.cortex.io"],"gitSource":{"type":"github","owner":"cortexapps","repo":"brainpower","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true,"agentFeedback":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"REMOVE_BRANDING":{"status":"ENABLED"},"CONTEXTUAL_FEEDBACK":{"status":"ENABLED"},"CODE_SNIPPET_FEEDBACK":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6b0466ce839604291956a9f8","clientVersion":"0.0.4304","searchFilterCounts":[{"language":"default","tag":"API Reference","count":664},{"language":"default","tag":"REST API operations","count":663},{"language":"default","tag":"Integrations","count":490},{"language":"default","tag":"Product Docs","count":240},{"language":"default","tag":"Connect data","count":125},{"language":"default","tag":"Cookbooks","count":51},{"language":"default","tag":"Product areas","count":50},{"language":"default","tag":"Workflows","count":47},{"language":"default","tag":"Entities overview","count":38},{"language":"default","tag":"Configure","count":37}],"searchSettings":{"showContentSnippets":true}},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"privacy":{"consentBanner":{"enabled":true}},"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":":where(img[src^=\"/images/\"]){display:block;margin-left:auto;margin-right:auto;max-width:100%;height:auto}#navbar li.navbar-link>a{background-color:rgb(3 7 18 / 0.06)}#navbar li.navbar-link>a:hover{background-color:rgb(3 7 18 / 0.12)}html.dark #navbar li.navbar-link>a{background-color:rgb(255 255 255 / 0.07)}html.dark #navbar li.navbar-link>a:hover{background-color:rgb(255 255 255 / 0.14)}#content-area .mdx-content{--tw-prose-links: #7458DB;--tw-prose-invert-links: #C0AFFF}html.dark #content-area .mdx-content :where(a):not(:where([class~=\"not-prose\"],[class~=\"not-prose\"] *)){color:#C0AFFF}.product-tab{background-color:#F3F4F6!important;color:#000!important}.product-tab[data-active=\"true\"]{background-color:#E6E7E9!important}html.dark .product-tab{background-color:rgb(255 255 255 / 0.1)!important;color:#fff!important}html.dark .product-tab[data-active=\"true\"]{background-color:#653EE8!important}.product-item[data-active=\"true\"]{background-color:#E6E7E9}html.dark .product-item[data-active=\"true\"]{background-color:rgb(255 255 255 / 0.05)}.product-item-arrow{opacity:0}.product-item-arrow svg{width:14px!important;height:14px!important;max-width:14px;max-height:14px;flex-shrink:0}.product-item-arrow[data-active=\"true\"]{opacity:1}#kapa-search-ask-row{display:flex;align-items:center;gap:0.5rem;margin:0 0.375rem 0.375rem;padding:0.625rem 0.75rem;border-top:1px solid rgb(229 231 235);background:transparent;font-size:0.875rem;font-weight:500;color:rgb(3 7 18);text-align:left;cursor:pointer}#kapa-search-ask-row[hidden]{display:none}#kapa-search-ask-row:hover{background:rgb(0 0 0 / 0.03)}#kapa-search-ask-row svg{width:1rem;height:1rem;flex-shrink:0;color:rgb(var(--primary))}#kapa-search-ask-row .kapa-search-ask-label{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#kapa-search-ask-row kbd{padding:0 0.3rem;border:1px solid rgb(229 231 235);border-radius:0.25rem;font-family:inherit;font-size:0.75rem;color:rgb(107 114 128)}.dark #kapa-search-ask-row{border-top-color:rgb(255 255 255 / 0.1);color:#fff}.dark #kapa-search-ask-row:hover{background:rgb(255 255 255 / 0.05)}.dark #kapa-search-ask-row svg{color:rgb(var(--primary-light))}.dark #kapa-search-ask-row kbd{border-color:rgb(255 255 255 / 0.1);color:rgb(156 163 175)}#assistant-entry,#assistant-entry-mobile{display:none!important}#kapa-ask-button{display:none;flex:none;align-items:center;gap:0.375rem;height:2.25rem;margin-left:0.5rem;padding:0 0.875rem 0 0.75rem;border-radius:9999px;background:rgb(3 7 18 / 0.03);font-size:0.875rem;font-weight:500;color:rgb(55 65 81);cursor:pointer}@media (min-width: 1024px){#kapa-ask-button{display:flex}}#kapa-ask-button:hover{background:rgb(3 7 18 / 0.1)}#kapa-ask-button svg{width:1rem;height:1rem;color:rgb(var(--primary))}html.dark #kapa-ask-button{background:rgb(255 255 255 / 0.03);color:rgb(209 213 219)}html.dark #kapa-ask-button:hover{background:rgb(255 255 255 / 0.1)}html.dark #kapa-ask-button svg{color:rgb(var(--primary-light))}"},{"filePath":"status-tags.css","content":".nav-tag-pill[data-status]{background-color:var(--status-tag-color)!important;border-color:var(--status-tag-color)!important}.nav-tag-pill[data-status],.nav-tag-pill[data-status] .nav-tag-pill-text{color:#FFFFFF!important}.nav-tag-pill[data-status=\"research-preview\"]{--status-tag-color: #7B2D6B}.nav-tag-pill[data-status=\"public-beta\"]{--status-tag-color: #1D4ED8}.nav-tag-pill[data-status=\"private-beta\"]{--status-tag-color: #8C1D3A}.nav-tag-pill[data-status]{white-space:nowrap;flex-shrink:0}"},{"filePath":"changelog-dates.css","content":"html[data-changelog-page] #changelog-filters{height:100%;min-height:0}html[data-changelog-page] #changelog-filters>#changelog-filters{display:flex;flex-direction:column;height:auto;max-height:100%;overflow:hidden}html[data-changelog-page] #changelog-filters>#changelog-filters>*{flex-shrink:0}#changelog-dates{flex:1 1 auto!important;flex-shrink:1!important;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:0.5rem 0.25rem 1.5rem 0}#changelog-dates [hidden]{display:none!important}#changelog-dates .changelog-dates-toggle{display:flex;text-decoration:none;align-items:center;justify-content:space-between;width:100%;padding:0.375rem 0;font-weight:500;color:rgb(55 65 81);cursor:pointer}#changelog-dates .changelog-dates-toggle svg{width:0.875rem;height:0.875rem;transition:transform 150ms ease}#changelog-dates .changelog-dates-year[data-open] .changelog-dates-toggle svg{transform:rotate(90deg)}#changelog-dates .changelog-dates-list{display:none;list-style:none;margin:0.25rem 0 0.5rem;padding:0}#changelog-dates .changelog-dates-year[data-open] .changelog-dates-list{display:block}#changelog-dates .changelog-dates-list li{margin:0;padding:0}#changelog-dates .changelog-dates-list a{display:block;padding:0.25rem 0 0.25rem 1rem;border-left:1px solid rgb(3 7 18 / 0.05);color:rgb(75 85 99);text-decoration:none}#changelog-dates .changelog-dates-toggle:hover,#changelog-dates .changelog-dates-list a:hover{color:rgb(17 24 39)}#changelog-dates .changelog-dates-list a:hover{border-left-color:rgb(3 7 18 / 0.2)}#changelog-dates .changelog-dates-list li[data-active] a{color:rgb(var(--primary));border-left-color:rgb(var(--primary));font-weight:500}html.dark #changelog-dates .changelog-dates-toggle{color:rgb(209 213 219)}html.dark #changelog-dates .changelog-dates-list a{color:rgb(156 163 175);border-left-color:rgb(255 255 255 / 0.1)}html.dark #changelog-dates .changelog-dates-toggle:hover,html.dark #changelog-dates .changelog-dates-list a:hover{color:rgb(243 244 246)}html.dark #changelog-dates .changelog-dates-list a:hover{border-left-color:rgb(255 255 255 / 0.2)}html.dark #changelog-dates .changelog-dates-list li[data-active] a{color:rgb(var(--primary-light));border-left-color:rgb(var(--primary-light))}.update-container[data-untagged-hidden],h2[hidden]{display:none!important}"}]}
{"page":{"pagePath":"guides/operational-readiness/argocd-workflow","slug":"/guides/operational-readiness/argocd-workflow","pageMetadata":{"title":"Automate a sync in ArgoCD","description":null,"href":"/guides/operational-readiness/argocd-workflow"},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];const RecipeBadges=({badges=[]})=>{const map={\"recipe\":{label:`Recipe`,color:`#A86400`},\"ai-excellence\":{label:`AI excellence`,color:`#653EE8`},\"production-readiness\":{label:`Production readiness`,color:`#226686`},\"incident-mgmt\":{label:`Incident management`,color:`#86198F`},\"migrations\":{label:`Migrations`,color:`#0E7C66`},\"compliance\":{label:`Compliance`,color:`#475569`},\"dora\":{label:`DORA metrics`,color:`#1D4ED8`},\"security\":{label:`Security`,color:`#B42318`},\"operational-readiness\":{label:`Operational readiness`,color:`#B54708`},\"dev-onboarding\":{label:`Developer onboarding`,color:`#C11574`}};const items=badges.map(key=>map[key]).filter(Boolean);if(items.length===0)return null;return _jsx(`div`,{className:`not-prose mint-flex mint-flex-wrap mint-gap-2 mint-mb-6`,children:items.map(b=>_jsx(`span`,{className:`mint-rounded-lg mint-px-2 mint-py-1 mint-text-xs mint-font-medium`,style:{backgroundColor:b.color,color:b.textColor||`#FFFFFF`},children:b.label},b.label))})};function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,OptimizedImage,_MdxComponentBoundary}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,true);if(!_MdxComponentBoundary)_missingMdxReference(`_MdxComponentBoundary`,true);return _jsxs(_Fragment,{children:[_jsx(_MdxComponentBoundary,{name:`RecipeBadges`,children:_jsx(RecipeBadges,{badges:[`recipe`,`operational-readiness`]})}),`\n`,_jsxs(_components.p,{children:[`After integrating Cortex with `,_jsx(_components.a,{href:`/ingesting-data-into-cortex/integrations/argocd`,children:`ArgoCD`}),`, you can use `,_jsx(_components.a,{href:`/streamline/workflows`,children:`Workflows`}),` to streamline and automate daily tasks. Rather than manually performing a sync through the ArgoCD UI, you can automate syncs by leveraging the ArgoCD API in a Workflow.`]}),`\n`,_jsx(_components.p,{children:`This guide walks through a Workflow that will sync the ArgoCD application to the same cluster that ArgoCD is running, but to a different namespace, and will allow the user to choose options for the sync.`}),`\n`,_jsx(Heading,{level:`2`,id:`how-to-automate-an-argocd-sync-with-a-workflow-in-cortex`,children:`How to automate an ArgoCD sync with a Workflow in Cortex`}),`\n`,_jsx(Heading,{level:`3`,id:`prerequisites`,children:`Prerequisites`}),`\n`,_jsx(_components.p,{children:`Before getting started:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Create an `,_jsx(_components.a,{href:`https://argo-cd.readthedocs.io/en/stable/`,children:`API token in ArgoCD`}),`.`,`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`In ArgoCD, navigate to your account settings then click `,_jsx(_components.strong,{children:`Tokens > Generate New`}),`. Copy the token and store it in a secure location, as you will need it in the next steps.`,_jsx(`br`,{}),`\n`,_jsx(OptimizedImage,{src:`https://mintcdn.com/cortex-290c0c42/qRY2zZcIyXqFVeCq/guides/images/argocd-actions-1.jpeg?fit=max\u0026auto=format\u0026n=qRY2zZcIyXqFVeCq\u0026q=85\u0026s=90662d71050588b23eb9d58865d6341d`,alt:`argocd actions 1`,\"data-og-width\":`1451`,width:`1451`,\"data-og-height\":`633`,height:`633`,\"data-path\":`guides/images/argocd-actions-1.jpeg`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/cortex-290c0c42/qRY2zZcIyXqFVeCq/guides/images/argocd-actions-1.jpeg?w=280\u0026fit=max\u0026auto=format\u0026n=qRY2zZcIyXqFVeCq\u0026q=85\u0026s=6adaea53360749d162ee75213a1af63f 280w, https://mintcdn.com/cortex-290c0c42/qRY2zZcIyXqFVeCq/guides/images/argocd-actions-1.jpeg?w=560\u0026fit=max\u0026auto=format\u0026n=qRY2zZcIyXqFVeCq\u0026q=85\u0026s=f76389083e35454eaa4193a9134027d3 560w, https://mintcdn.com/cortex-290c0c42/qRY2zZcIyXqFVeCq/guides/images/argocd-actions-1.jpeg?w=840\u0026fit=max\u0026auto=format\u0026n=qRY2zZcIyXqFVeCq\u0026q=85\u0026s=0b5877cf94da09a2860c4caa5a9cef3c 840w, https://mintcdn.com/cortex-290c0c42/qRY2zZcIyXqFVeCq/guides/images/argocd-actions-1.jpeg?w=1100\u0026fit=max\u0026auto=format\u0026n=qRY2zZcIyXqFVeCq\u0026q=85\u0026s=08d38c3350e108336381fc69715b1c51 1100w, https://mintcdn.com/cortex-290c0c42/qRY2zZcIyXqFVeCq/guides/images/argocd-actions-1.jpeg?w=1650\u0026fit=max\u0026auto=format\u0026n=qRY2zZcIyXqFVeCq\u0026q=85\u0026s=2cda266d5b33f0bbd42726c8674db71f 1650w, https://mintcdn.com/cortex-290c0c42/qRY2zZcIyXqFVeCq/guides/images/argocd-actions-1.jpeg?w=2500\u0026fit=max\u0026auto=format\u0026n=qRY2zZcIyXqFVeCq\u0026q=85\u0026s=cf023a4603916b00ccac7ad395841fd4 2500w`}),`\n`]}),`\n`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`Create a secret in Cortex.`,`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Give the secret the name `,_jsx(_components.code,{children:`argocd`}),`.`]}),`\n`,_jsx(_components.li,{children:`For the secret value, enter the value of your ArgoCD API token.`}),`\n`]}),`\n`]}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`step-1-create-a-workflow`,children:`Step 1: Create a Workflow`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`In the main nav of Cortex, click `,_jsx(_components.strong,{children:`Workflows`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Follow the steps of the `,_jsx(_components.a,{href:`/streamline/workflows/create`,children:`Workflows documentation`}),` to start creating a Workflow from scratch and configure its settings.`,`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:`Give the Workflow a descriptive name such as “Create and sync application.”`}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[`In the `,_jsx(_components.strong,{children:`Response template`}),` field you can pass a blank response body or use `,_jsx(_components.a,{href:`https://mustache.github.io/`,children:`Mustache templating`}),` to create messages depending on what the user enters in each field.`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`For example, you may want to configure a response to confirm whether a sync was successful when the workflow is run. You could add the following to check the `,_jsx(_components.code,{children:`sync.status`}),` field. This example assumes you add an HTTP request action with the slug `,_jsx(_components.code,{children:`http-request`}),` in your Workflow:`]}),`\n`]}),`\n`,_jsx(CodeBlock,{numberOfLines:`7`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`7`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`{{#actions.http-request.outputs.body.status.sync.status}}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Successfully synced application!`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`{{/actions.http-request.outputs.body.status.sync.status}}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`{{^actions.http-request.outputs.body.status.sync.status}}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Unable to sync application. Are you sure this application exists in ArgoCD?`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`{{/actions.http-request.outputs.body.status.sync.status}}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`]}),`\n`]}),`\n`]}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`step-2-add-blocks-to-the-workflow`,children:`Step 2: Add blocks to the Workflow`}),`\n`,_jsxs(_components.p,{children:[`In your Workflow, you will add an HTTP request block to call the ArgoCD sync via the `,_jsx(_components.a,{href:`https://argoproj.github.io/argo-events/sensors/triggers/http-trigger/`,children:`ArgoCD API`}),`, and a user input block where you define inputs that map to the JSON body of the block. The inputs should be the same sync options shown under `,_jsx(_components.strong,{children:`Sync`}),` in your ArgoCD instance. The instructions below map `,_jsx(_components.code,{children:`REVISION`}),`, `,_jsx(_components.code,{children:`DRY RUN`}),`, and `,_jsx(_components.code,{children:`PRUNE`}),` as the sync options.`]}),`\n`,_jsxs(_components.p,{children:[`See the `,_jsx(_components.a,{href:`/streamline/workflows/blocks`,children:`Workflows documentation`}),` for more information on configuring blocks.`]}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`In the Workflow, click `,_jsx(_components.strong,{children:`+`}),` to add a block. Select `,_jsx(_components.strong,{children:`User input`}),`. Configure the block:`,`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Block name`}),`: Enter a name for the block (e.g., `,_jsx(_components.code,{children:`User input`}),`).`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Slug`}),`: The slug field is automatically populated based on the block name.`]}),`\n`,_jsxs(_components.li,{children:[`Under “User input fields,” click `,_jsx(_components.strong,{children:`Add input`}),`. Configure the input:`,`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Type`}),`: Select `,_jsx(_components.code,{children:`Text`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Name`}),`: Enter `,_jsx(_components.code,{children:`Revision`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Placeholder`}),`: Enter `,_jsx(_components.code,{children:`HEAD`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`At the bottom of the modal, click `,_jsx(_components.strong,{children:`Add input field`}),`.`]}),`\n`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`Under “User input fields,” click `,_jsx(_components.strong,{children:`Add input`}),`. Configure another input:`,`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Type`}),`: Select `,_jsx(_components.code,{children:`Toggle`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Name`}),`: Enter `,_jsx(_components.code,{children:`Dry run`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`At the bottom of the modal, click `,_jsx(_components.strong,{children:`Add input field`}),`.`]}),`\n`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`Under “User input fields,” click `,_jsx(_components.strong,{children:`Add input`}),`. Configure another input:`,`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Type`}),`: Select `,_jsx(_components.code,{children:`Toggle`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Name`}),`: Enter `,_jsx(_components.code,{children:`Prune`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`At the bottom of the modal, click `,_jsx(_components.strong,{children:`Add input field`}),`.`]}),`\n`]}),`\n`]}),`\n`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`Click `,_jsx(_components.strong,{children:`Save`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`In the Workflow, click `,_jsx(_components.strong,{children:`+`}),` to add another block. Select `,_jsx(_components.strong,{children:`HTTP request`}),`. Configure the block:`,`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Block name`}),`: Enter a name for the block (e.g., `,_jsx(_components.code,{children:`HTTP request`}),`).`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Slug`}),`: The slug field is automatically populated based on the block name.`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`HTTP method`}),`: Select `,_jsx(_components.code,{children:`POST`}),`.`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`URL`}),`: Enter the target URL.`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Headers`}),`: Enter the following key/value pairs:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Header Key`}),`: `,_jsx(_components.code,{children:`Authorization`}),`, `,_jsx(_components.strong,{children:`Header Value`}),`: `,_jsx(_components.code,{children:`Bearer {{{context.secrets.argocd}}}`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`If you used a different name for your secret, replace `,_jsx(_components.code,{children:`argocd`}),` with your secret’s name.`]}),`\n`]}),`\n`]}),`\n`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Payload`}),`: Enter the payload referencing the output of the “User input” block. The payload that you supply can be templated and can reference an entity that the Workflow is being run with.`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`In this example, you could enter:`}),`\n`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"prune\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`}),_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:`{context.actions.user-input.outputs.prune`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}},`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"dryRun\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`}),_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:`{context.actions.user-input.outputs.dry-run`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}},`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"revision\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"{{context.actions.user-input.outputs.revision}}\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`]}),`\n`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`Click `,_jsx(_components.strong,{children:`Save`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Click `,_jsx(_components.strong,{children:`Save Workflow`}),`.`]}),`\n`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{RecipeBadges,default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Automate a sync in ArgoCD","description":null,"href":"/guides/operational-readiness/argocd-workflow"}}},"mdxSourceWithNoJs":null,"noJsSplices":[[148,1123,")=>null;function _cr"]]},"mdxExtracts":{"tableOfContents":[{"title":"How to automate an ArgoCD sync with a Workflow in Cortex","slug":"how-to-automate-an-argocd-sync-with-a-workflow-in-cortex","depth":2,"children":[{"title":"Prerequisites","slug":"prerequisites","depth":3,"children":[]},{"title":"Step 1: Create a Workflow","slug":"step-1-create-a-workflow","depth":3,"children":[]},{"title":"Step 2: Add blocks to the Workflow","slug":"step-2-add-blocks-to-the-workflow","depth":3,"children":[]}]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/cortex-290c0c42/ed8d91d3153959c2/kapa.js","/_mintlify/custom/cortex-290c0c42/36b87f2caabcf780/status-tags.js","/_mintlify/custom/cortex-290c0c42/cc8557fef10c63cd/changelog-dates.js"],"dynamicCss":".mint-mb-6 {\n margin-bottom: 1.5rem\n}\n.mint-flex {\n display: flex\n}\n.mint-flex-wrap {\n flex-wrap: wrap\n}\n.mint-gap-2 {\n gap: 0.5rem\n}\n.mint-rounded-lg {\n border-radius: 0.5rem\n}\n.mint-px-2 {\n padding-left: 0.5rem;\n padding-right: 0.5rem\n}\n.mint-py-1 {\n padding-top: 0.25rem;\n padding-bottom: 0.25rem\n}\n.mint-text-xs {\n font-size: 0.75rem;\n line-height: 1rem\n}\n.mint-font-medium {\n font-weight: 500\n}","subdomain":"cortex-290c0c42","siteName":"Cortex","title":"Automate a sync in ArgoCD - Cortex","relatedPagesConfig":{"enabled":true,"limit":3,"mode":"automatic"},"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-10T23:58:33.907Z","gitLastModified":"2026-09-28T23:53:10.000Z","originalFileLocation":"guides/operational-readiness/argocd-workflow.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"application-name\" content=\"Cortex\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/cortex-290c0c42/GsIUSGAJ7s7HMHgE/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/cortex-290c0c42/GsIUSGAJ7s7HMHgE/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/cortex-290c0c42/GsIUSGAJ7s7HMHgE/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/cortex-290c0c42/GsIUSGAJ7s7HMHgE/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/cortex-290c0c42/GsIUSGAJ7s7HMHgE/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/cortex-290c0c42/GsIUSGAJ7s7HMHgE/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/cortex-290c0c42/GsIUSGAJ7s7HMHgE/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/cortex-290c0c42/GsIUSGAJ7s7HMHgE/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/cortex-290c0c42/GsIUSGAJ7s7HMHgE/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Automate a sync in ArgoCD - Cortex\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Cortex\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.cortex.io/guides/operational-readiness/argocd-workflow\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://cortex-290c0c42.mintlify.site/_mintlify/api/og/v2?division=Workflows\u0026amp;title=Automate+a+sync+in+ArgoCD\u0026amp;theme=99c32ff148ebb22d9370f9e9\u0026amp;signature=d8d983f8459af01962bb7ff87eeb4260bfc97120554e6790fd0c9fc03679b0e4\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Automate a sync in ArgoCD - Cortex\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://cortex-290c0c42.mintlify.site/_mintlify/api/og/v2?division=Workflows\u0026amp;title=Automate+a+sync+in+ArgoCD\u0026amp;theme=99c32ff148ebb22d9370f9e9\u0026amp;signature=d8d983f8459af01962bb7ff87eeb4260bfc97120554e6790fd0c9fc03679b0e4\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/cortex-290c0c42/GsIUSGAJ7s7HMHgE/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Cortex\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#653EE8\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.cortex.io/guides/operational-readiness/argocd-workflow\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/guides/operational-readiness/argocd-workflow.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.cortex.io/#organization\",\"name\":\"Cortex\",\"url\":\"https://docs.cortex.io\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/cortex-290c0c42/JcmXgfdiEzZzqS2M/logo/cortex-light.svg?fit=max\u0026auto=format\u0026n=JcmXgfdiEzZzqS2M\u0026q=85\u0026s=3d32dd91336a0de9463a57e04f9b8bb3\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.cortex.io#website\",\"name\":\"Cortex\",\"url\":\"https://docs.cortex.io\",\"publisher\":{\"@id\":\"https://docs.cortex.io/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.cortex.io/guides/operational-readiness/argocd-workflow#webpage\",\"url\":\"https://docs.cortex.io/guides/operational-readiness/argocd-workflow\",\"name\":\"Automate a sync in ArgoCD\",\"dateModified\":\"2026-09-28T23:53:10.000Z\",\"isPartOf\":{\"@id\":\"https://docs.cortex.io#website\"},\"breadcrumb\":{\"@id\":\"https://docs.cortex.io/guides/operational-readiness/argocd-workflow#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.cortex.io/guides/operational-readiness/argocd-workflow#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Product areas\",\"item\":\"https://docs.cortex.io/guides/operational-readiness/keep-your-catalog-up-to-date\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Workflows\",\"item\":\"https://docs.cortex.io/guides/product-areas/workflows\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Automate a sync in ArgoCD\",\"item\":\"https://docs.cortex.io/guides/operational-readiness/argocd-workflow\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.cortex.io/guides/operational-readiness/argocd-workflow#article\",\"headline\":\"Automate a sync in ArgoCD\",\"name\":\"Automate a sync in ArgoCD\",\"url\":\"https://docs.cortex.io/guides/operational-readiness/argocd-workflow\",\"mainEntityOfPage\":{\"@id\":\"https://docs.cortex.io/guides/operational-readiness/argocd-workflow#webpage\"},\"dateModified\":\"2026-09-28T23:53:10.000Z\",\"publisher\":{\"@id\":\"https://docs.cortex.io/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.cortex.io#website\"}}]}\u003c/script>","agentPointerHref":"/guides/operational-readiness/argocd-workflow.md","siteName":"Cortex","nav":{"global":null,"tabs":[{"tab":"Product Docs","icon":"books","pages":[{"title":"Product Docs","href":""}]},{"tab":"Cookbooks","icon":"hat-chef","groups":[{"group":" ","pages":[{"title":"Cookbooks","icon":"hat-chef","href":"/guides"}]},{"group":"Product areas","pages":[{"group":"Catalogs","root":{"title":"Catalogs","href":"/guides/product-areas/catalogs"},"pages":[{"title":"Keep your catalog up to date","href":"/guides/operational-readiness/keep-your-catalog-up-to-date"}]},{"group":"Scorecards","root":{"title":"Scorecards","href":"/guides/product-areas/scorecards"},"pages":[{"title":"Establish consistent AI security controls","href":"/guides/ai-excellence/establish-consistent-ai-security-controls"},{"title":"Set benchmarks for AI readiness","href":"/guides/ai-excellence/set-benchmarks-for-ai-readiness"},{"title":"Prepare for effective use of AI tools","href":"/guides/ai-excellence/prepare-for-effective-use-of-ai-tools"},{"title":"Seasonal readiness Scorecard","href":"/guides/production-readiness/seasonal-readiness-scorecard"},{"title":"Reduce MTTA","href":"/guides/incident-mgmt/reduce-mtta"},{"title":"Reduce MTTR","href":"/guides/incident-mgmt/reduce-mttr"},{"title":"Manage an Upcoming EOL for AWS","href":"/guides/migrations-and-modernization/manage-an-upcoming-eol-for-aws"},{"title":"Accelerate migration to K8s","href":"/guides/migrations-and-modernization/accelerate-migration-to-k8s"},{"title":"Ensure SOC 2 compliance","href":"/guides/compliance/soc2"},{"title":"Measure DORA progress","href":"/guides/dora/scorecard"},{"title":"Enforce security standards","href":"/guides/security/scorecard"},{"title":"Surface vulnerability data in failed Scorecard rules","href":"/guides/security/vulnerabilities-rules"},{"title":"Surface code coverage metrics from SonarQube in failed Scorecard rules","href":"/guides/security/code-coverage-rules"}]},{"group":"Workflows","root":{"title":"Workflows","href":"/guides/product-areas/workflows"},"pages":[{"title":"Scaffold an ML model project","href":"/guides/ai-excellence/scaffold-ml-model"},{"group":"Manage Terraform infrastructure","root":{"title":"Manage Terraform infrastructure","href":"/guides/production-readiness/terraform"},"pages":[{"title":"Provision EC2 instance with Terraform","href":"/guides/production-readiness/terraform/provision"},{"title":"Update EC2 instance","href":"/guides/production-readiness/terraform/update"},{"title":"Terraform destroy","href":"/guides/production-readiness/terraform/destroy"}]},{"title":"Standardize new service creation","href":"/guides/production-readiness/standardize-new-service-creation"},{"title":"Rollback a service during an incident","href":"/guides/incident-mgmt/workflow-rollback"},{"title":"Create ServiceNow incident","href":"/guides/incident-mgmt/servicenow"},{"title":"Automate new dev environment","href":"/guides/dev-onboarding/env-setup-workflow"},{"title":"Automate user access to GitHub, PagerDuty, and Jira","href":"/guides/dev-onboarding/automate-user-access-to-github-pagerduty-and-jira"},{"title":"Automate user access to Copilot","href":"/guides/dev-onboarding/automate-user-access-to-copilot"},{"title":"Kick off a Jenkins pipeline","href":"/guides/operational-readiness/jenkins-workflow"},{"title":"Call internal service endpoints in a Workflow","href":"/guides/operational-readiness/internal-endpoints"},{"title":"Run a Humanitec pipeline","href":"/guides/operational-readiness/humanitec-pipeline"},{"title":"Trigger internal Jenkins jobs","description":null,"href":"/guides/operational-readiness/jenkins-axon"},{"title":"Automate a sync in ArgoCD","href":"/guides/operational-readiness/argocd-workflow"},{"title":"Loop in a JavaScript block and return specified output","description":null,"href":"/guides/operational-readiness/javascript-looping"},{"title":"Link SOC 2 documents to entity","href":"/guides/compliance/link-soc2-docs"},{"title":"Bulk accept entity data verifications","href":"/guides/compliance/bulk-accept-entity-data-verifications"}]},{"group":"Eng Intelligence","root":{"title":"Eng Intelligence","href":"/guides/product-areas/eng-intelligence"},"pages":[{"title":"Measure AI impact","href":"/guides/ai-excellence/measure-ai-impact"},{"title":"Improve bottlenecks in your software development lifecycle","href":"/guides/production-readiness/improve-bottlenecks"},{"title":"Tracking cloud costs","href":"/guides/operational-readiness/tracking-cloud-costs"}]},{"group":"OpEx Review","root":{"title":"OpEx Review","tag":"PUBLIC BETA","href":"/guides/product-areas/opex-review"},"tag":"PUBLIC BETA","pages":[{"title":"Run OpEx reviews that end in decisions","tag":"PUBLIC BETA","href":"/guides/operational-readiness/run-effective-opex-reviews"}]},{"group":"Data verification","root":{"title":"Data verification","href":"/guides/product-areas/data-verification"},"pages":[{"title":"Verify services after AI-based auto-mapping","href":"/guides/ai-excellence/verify-auto-mappings"},{"title":"Validate data after migration","href":"/guides/migrations-and-modernization/validate-data"},{"title":"Data verifications for audit readiness","href":"/guides/compliance/data-verification"}]},{"group":"Plugins","root":{"title":"Plugins","href":"/guides/product-areas/plugins"},"pages":[{"title":"Visualizing custom data in a plugin","href":"/guides/operational-readiness/visualizing-custom-data-in-a-plugin"}]},{"group":"Cortex MCP","root":{"title":"Cortex MCP","href":"/guides/product-areas/cortex-mcp"},"pages":[{"title":"Put your Cortex data to work in your agents","href":"/guides/ai-excellence/put-your-cortex-data-to-work-in-your-agents"}]}]}]},{"tab":"API Reference","icon":"brain","pages":[{"title":"API Reference","href":"/api"}]},{"tab":"Changelog","icon":"clock-rotate-left","pages":[{"title":"Changelog","href":"/changelog"}]}]},"basePath":"","title":"Automate a sync in ArgoCD - Cortex","deploymentId":"dpl_57NA6NKtrcUBhuxv6Tm2hAi21TK4","buildId":"dpl_57NA6NKtrcUBhuxv6Tm2hAi21TK4","dynamics":["a74be98ba7"],"chunks":["zoom-image-lightbox-C5J5Gw3i.js","lightbox-handle-r17bVUz3.js"]}