{"id":444611,"date":"2026-04-13T02:03:55","date_gmt":"2026-04-13T00:03:55","guid":{"rendered":"https:\/\/www.kafinea.com\/documentation\/uncategorized\/ai-workflows\/"},"modified":"2026-04-13T02:03:55","modified_gmt":"2026-04-13T00:03:55","password":"","slug":"ai-workflows","status":"publish","type":"docs","link":"https:\/\/www.kafinea.com\/en\/help\/artificial-intelligence\/ai-workflows\/","title":{"rendered":"AI Workflows"},"content":{"rendered":"<hr>\n<h2>Introduction<\/h2>\n<p><strong>AI workflows<\/strong> enable the automation of intelligent processing on Kafinea records. By adding an <strong>AI Prompt<\/strong> task to a workflow, you can have data automatically analyzed, summarized, translated, or classified by an artificial intelligence model. <\/p>\n<hr>\n<h2>1. Create a workflow with an AI task<\/h2>\n<ol>\n<li>Access <strong>Settings &gt; Automation and Communication &gt; Workflows<\/strong><\/li>\n<li>Create a new workflow or edit an existing one<\/li>\n<li>Choose the target module (Contacts, Invoices, Quotes, etc.)<\/li>\n<li>Define the trigger conditions<\/li>\n<li>Add an <strong>AI Prompt<\/strong> task<\/li>\n<\/ol>\n<hr>\n<h2>2. Configure the AI Prompt task<\/h2>\n<p>The AI Prompt task consists of two parts:<\/p>\n<h3>The prompt (instruction)<\/h3>\n<p>This is the textual instruction sent to the AI model. You can include module variables to customize the request. <\/p>\n<p><strong>Prompt example:<\/strong><\/p>\n<pre><code>R\u00e9sume en 2 phrases le contenu de la description suivante : $description\nClassifie le niveau d'urgence du ticket parmi : faible, moyen, \u00e9lev\u00e9, critique.\n<\/code><\/pre>\n<h3>The return field mapping<\/h3>\n<p>For each field the AI needs to fill, you configure:<\/p>\n<ul>\n<li><strong>The target field<\/strong>: the record field to update<\/li>\n<li><strong>The specific instruction<\/strong>: what the AI should generate for this field<\/li>\n<\/ul>\n<blockquote class=\"bq-important\">\n<p><strong>Important:<\/strong> The AI&#8217;s response is expected in JSON format with field names as keys. The system automatically handles extraction even if the response contains text around the JSON. <\/p>\n<\/blockquote>\n<hr>\n<h2>3. Contextual data transmitted to the AI<\/h2>\n<p>The AI task automatically transmits the following to the model:<\/p>\n<div style=\"overflow-x:auto\">\n<table>\n<thead>\n<tr>\n<th>Data<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong>Record data<\/strong><\/td>\n<td>All fields of the current record<\/td>\n<\/tr>\n<tr>\n<td><strong>Parent records<\/strong><\/td>\n<td>Data from linked records (contact, account, etc.)<\/td>\n<\/tr>\n<tr>\n<td><strong>Module descriptions<\/strong><\/td>\n<td>Field names and types, picklist values<\/td>\n<\/tr>\n<tr>\n<td><strong>Detail lines<\/strong><\/td>\n<td>For inventory-type modules (invoices, quotes, orders)<\/td>\n<\/tr>\n<tr>\n<td><strong>Organization data<\/strong><\/td>\n<td>Company information linked to the record<\/td>\n<\/tr>\n<tr>\n<td><strong>Document content<\/strong><\/td>\n<td>If the module is Documents, the content of the attached file<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<hr>\n<h2>4. Usage examples<\/h2>\n<h3>Automatic ticket summary<\/h3>\n<ul>\n<li><strong>Module<\/strong>: HelpDesk<\/li>\n<li><strong>Trigger<\/strong>: On creation<\/li>\n<li><strong>Prompt<\/strong>: &#8220;Summarize this support ticket in one concise sentence.&#8221;<\/li>\n<li><strong>Target field<\/strong>: <code>cf_summary<\/code> \u2190 instruction: &#8220;A sentence summarizing the issue&#8221;<\/li>\n<\/ul>\n<h3>Contact classification<\/h3>\n<ul>\n<li><strong>Module<\/strong>: Contacts<\/li>\n<li><strong>Trigger<\/strong>: On save<\/li>\n<li><strong>Prompt<\/strong>: &#8220;Analyze this contact&#8217;s information and suggest a business segment.&#8221;<\/li>\n<li><strong>Target field<\/strong>: <code>cf_segment<\/code> \u2190 instruction: &#8220;The segment from: SMB, Mid-Market, Large Enterprise, Individual&#8221;<\/li>\n<\/ul>\n<h3>Product description translation<\/h3>\n<ul>\n<li><strong>Module<\/strong>: Products<\/li>\n<li><strong>Trigger<\/strong>: On save<\/li>\n<li><strong>Prompt<\/strong>: &#8220;Translate the product description into English.&#8221;<\/li>\n<li><strong>Target field<\/strong>: <code>cf_description_en<\/code> \u2190 instruction: &#8220;The English translation of the description&#8221;<\/li>\n<\/ul>\n<hr>\n<h2>5. Error management<\/h2>\n<p>If the AI does not return a valid response, the workflow continues without updating the fields. Errors are logged in the server logs: <\/p>\n<ul>\n<li><strong>Missing API key<\/strong>: check the AI gateway configuration<\/li>\n<li><strong>Empty response<\/strong>: the prompt may be too vague or the data insufficient<\/li>\n<li><strong>JSON parsing error<\/strong>: the system automatically attempts several extraction strategies<\/li>\n<\/ul>\n<blockquote class=\"bq-astuce\">\n<p><strong>Tip:<\/strong> Consult the PHP logs (<code>error_log<\/code>) to diagnose AI workflow execution issues.<\/p>\n<\/blockquote>\n<hr>\n<h2>6. Limitations<\/h2>\n<ul>\n<li>The prompt size is limited by the AI model used (generally 4,096 response tokens max).<\/li>\n<li>Large image files or very long documents may be truncated.<\/li>\n<li>The workflow runs synchronously: a slow AI call can slow down processing.<\/li>\n<\/ul>\n<hr>\n<h2>Related References<\/h2>\n<ul>\n<li><a href=\"\/200_automatisation\/020_le-planificateur.md\">The scheduler<\/a><\/li>\n<li><a href=\"https:\/\/www.kafinea.com\/en\/documentation\/artificial-intelligence\/ai-chat\/\">AI Chat<\/a><\/li>\n<li><a href=\"https:\/\/www.kafinea.com\/en\/documentation\/artificial-intelligence\/the-ai-text-assistant\/\">AI Text Assistant<\/a><\/li>\n<li><a href=\"https:\/\/www.kafinea.com\/en\/documentation\/artificial-intelligence\/connect-an-external-ai-mcp\/\">Connect an External AI (MCP)<\/a><\/li>\n<li><a href=\"https:\/\/www.kafinea.com\/en\/documentation\/artificial-intelligence\/ai-assisted-invoice-ocr\/\">AI-Assisted Invoice OCR<\/a><\/li>\n<li><a href=\"\/250_parametrage\/120_les-agents-ia.md\">AI agents<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Introduction AI workflows enable the automation of intelligent processing on Kafinea records. By adding an AI Prompt task to a workflow, you can have data automatically analyzed, summarized, translated, or classified by an artificial intelligence model. 1. Create a workflow with an AI task Access Settings &gt; Automation and Communication &gt; Workflows Create a new&#8230;<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_uag_custom_page_level_css":"","_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","footnotes":""},"doc_category":[764],"doc_tag":[],"class_list":["post-444611","docs","type-docs","status-publish","hentry","doc_category-artificial-intelligence"],"year_month":"2026-08","word_count":479,"total_views":"2","reactions":{"happy":"0","normal":"0","sad":"0"},"author_info":{"name":"David Valminos","author_nicename":"david","author_url":"https:\/\/www.kafinea.com\/en\/author\/david\/"},"doc_category_info":[{"term_name":"Artificial intelligence","term_url":"https:\/\/www.kafinea.com\/en\/help\/artificial-intelligence\/"}],"doc_tag_info":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Help - AI Workflows &#8226; Kafinea<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.kafinea.com\/en\/help\/artificial-intelligence\/ai-workflows\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Help - AI Workflows &#8226; Kafinea\" \/>\n<meta property=\"og:description\" content=\"Introduction AI workflows enable the automation of intelligent processing on Kafinea records. By adding an AI Prompt task to a workflow, you can have data automatically analyzed, summarized, translated, or classified by an artificial intelligence model. 1. Create a workflow with an AI task Access Settings &gt; Automation and Communication &gt; Workflows Create a new...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.kafinea.com\/en\/help\/artificial-intelligence\/ai-workflows\/\" \/>\n<meta property=\"og:site_name\" content=\"Kafinea\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.kafinea.com\\\/en\\\/help\\\/artificial-intelligence\\\/ai-workflows\\\/\",\"url\":\"https:\\\/\\\/www.kafinea.com\\\/en\\\/help\\\/artificial-intelligence\\\/ai-workflows\\\/\",\"name\":\"Help - AI Workflows &#8226; Kafinea\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.kafinea.com\\\/en\\\/#website\"},\"datePublished\":\"2026-04-13T00:03:55+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.kafinea.com\\\/en\\\/help\\\/artificial-intelligence\\\/ai-workflows\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.kafinea.com\\\/en\\\/help\\\/artificial-intelligence\\\/ai-workflows\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.kafinea.com\\\/en\\\/help\\\/artificial-intelligence\\\/ai-workflows\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\\\/\\\/www.kafinea.com\\\/en\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"AI Workflows\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.kafinea.com\\\/en\\\/#website\",\"url\":\"https:\\\/\\\/www.kafinea.com\\\/en\\\/\",\"name\":\"Kafinea\",\"description\":\"Une solution unique pour toutes vos ambitions\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.kafinea.com\\\/en\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.kafinea.com\\\/en\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.kafinea.com\\\/en\\\/#organization\",\"name\":\"Kafinea\",\"url\":\"https:\\\/\\\/www.kafinea.com\\\/en\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.kafinea.com\\\/en\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.kafinea.com\\\/wp-content\\\/uploads\\\/2024\\\/10\\\/Logo-Kafinea-SVG-orange-bleu.svg\",\"contentUrl\":\"https:\\\/\\\/www.kafinea.com\\\/wp-content\\\/uploads\\\/2024\\\/10\\\/Logo-Kafinea-SVG-orange-bleu.svg\",\"width\":296.31,\"height\":66.48,\"caption\":\"Kafinea\"},\"image\":{\"@id\":\"https:\\\/\\\/www.kafinea.com\\\/en\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.linkedin.com\\\/company\\\/kafinea\\\/\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Help - AI Workflows &#8226; Kafinea","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.kafinea.com\/en\/help\/artificial-intelligence\/ai-workflows\/","og_locale":"en_US","og_type":"article","og_title":"Help - AI Workflows &#8226; Kafinea","og_description":"Introduction AI workflows enable the automation of intelligent processing on Kafinea records. By adding an AI Prompt task to a workflow, you can have data automatically analyzed, summarized, translated, or classified by an artificial intelligence model. 1. Create a workflow with an AI task Access Settings &gt; Automation and Communication &gt; Workflows Create a new...","og_url":"https:\/\/www.kafinea.com\/en\/help\/artificial-intelligence\/ai-workflows\/","og_site_name":"Kafinea","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.kafinea.com\/en\/help\/artificial-intelligence\/ai-workflows\/","url":"https:\/\/www.kafinea.com\/en\/help\/artificial-intelligence\/ai-workflows\/","name":"Help - AI Workflows &#8226; Kafinea","isPartOf":{"@id":"https:\/\/www.kafinea.com\/en\/#website"},"datePublished":"2026-04-13T00:03:55+00:00","breadcrumb":{"@id":"https:\/\/www.kafinea.com\/en\/help\/artificial-intelligence\/ai-workflows\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.kafinea.com\/en\/help\/artificial-intelligence\/ai-workflows\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.kafinea.com\/en\/help\/artificial-intelligence\/ai-workflows\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.kafinea.com\/en\/"},{"@type":"ListItem","position":2,"name":"AI Workflows"}]},{"@type":"WebSite","@id":"https:\/\/www.kafinea.com\/en\/#website","url":"https:\/\/www.kafinea.com\/en\/","name":"Kafinea","description":"Une solution unique pour toutes vos ambitions","publisher":{"@id":"https:\/\/www.kafinea.com\/en\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.kafinea.com\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.kafinea.com\/en\/#organization","name":"Kafinea","url":"https:\/\/www.kafinea.com\/en\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.kafinea.com\/en\/#\/schema\/logo\/image\/","url":"https:\/\/www.kafinea.com\/wp-content\/uploads\/2024\/10\/Logo-Kafinea-SVG-orange-bleu.svg","contentUrl":"https:\/\/www.kafinea.com\/wp-content\/uploads\/2024\/10\/Logo-Kafinea-SVG-orange-bleu.svg","width":296.31,"height":66.48,"caption":"Kafinea"},"image":{"@id":"https:\/\/www.kafinea.com\/en\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.linkedin.com\/company\/kafinea\/"]}]}},"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false},"uagb_author_info":{"display_name":"David Valminos","author_link":"https:\/\/www.kafinea.com\/en\/author\/david\/"},"uagb_comment_info":0,"uagb_excerpt":"Introduction AI workflows enable the automation of intelligent processing on Kafinea records. By adding an AI Prompt task to a workflow, you can have data automatically analyzed, summarized, translated, or classified by an artificial intelligence model. 1. Create a workflow with an AI task Access Settings &gt; Automation and Communication &gt; Workflows Create a new...","_links":{"self":[{"href":"https:\/\/www.kafinea.com\/en\/wp-json\/wp\/v2\/docs\/444611","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kafinea.com\/en\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/www.kafinea.com\/en\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/www.kafinea.com\/en\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kafinea.com\/en\/wp-json\/wp\/v2\/comments?post=444611"}],"version-history":[{"count":0,"href":"https:\/\/www.kafinea.com\/en\/wp-json\/wp\/v2\/docs\/444611\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.kafinea.com\/en\/wp-json\/wp\/v2\/media?parent=444611"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/www.kafinea.com\/en\/wp-json\/wp\/v2\/doc_category?post=444611"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/www.kafinea.com\/en\/wp-json\/wp\/v2\/doc_tag?post=444611"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}