You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Power Automate流程咨询:JSON转可读PowerAutomate-Items及CRM Doc_Config值填充Word文档显示原始文本的解决方法

Fix: Parse Raw Doc_Config Text into Usable Data for Power Automate & Word

Got it, let’s break down why your Word document is showing raw text instead of your intended data—and how to fix it quickly. The core issue is that your CRM’s Doc_Config value is being passed as plain text (even if it looks like JSON) instead of a structured object Power Automate can read and use to populate your template.

Root Cause

When you pass raw text directly to your "Convert json to readable PowerAutomate-Items" flow, Power Automate doesn’t recognize it as structured data—it just treats it as a single string. That’s why your Word doc ends up with the full raw text instead of the specific fields you want.

Step-by-Step Solutions

1. Parse the Raw Text into a Structured JSON Object

Add a Parse JSON action immediately after pulling Doc_Config from your CRM. This is the most reliable fix if your Doc_Config is valid JSON:

  • Insert the Parse JSON action right after your CRM data retrieval step.
  • Set the Content field to your Doc_Config dynamic content.
  • To generate the correct schema automatically:
    1. Copy a sample of your raw Doc_Config text (e.g., {"CustomerName":"Acme Corp","OrderID":"ORD-12345"}).
    2. Click Generate from sample in the Parse JSON action, paste the sample, and hit Done.
  • Now Power Automate will show each field from the JSON as selectable dynamic content—no more raw text!

2. Map Parsed Fields to Your Word Template

Instead of feeding the raw Doc_Config string into your Word fill step, pick the specific parsed fields from the Parse JSON output. For example:

  • If your Word template has a placeholder <<CustomerName>>, map it to the CustomerName field from the parsed JSON, not the full Doc_Config text.

3. Fallback: Manual Extraction for Non-JSON Raw Text

If your Doc_Config isn’t valid JSON (e.g., it’s a custom delimited string like CustomerName|Acme Corp|OrderID|ORD-12345), use Power Automate’s string tools to extract values:

  • Use the split() function to break the text into segments: split(outputs('Get_Doc_Config')?['body'], '|') (replace | with your actual delimiter).
  • Use first(), last(), or indexOf() to grab specific values: first(split(outputs('Get_Doc_Config')?['body'], '|')) to get the first segment.
  • Store extracted values in a Compose action for easy reuse in the Word fill step.

4. Clean Up Escaped/Extra Characters (If Needed)

Sometimes CRM adds extra quotes or escaped characters to the raw text. Use a Replace action to clean it up before parsing:

  • For example, use replace(outputs('Get_Doc_Config')?['body'], '\"', '') to remove escaped double quotes (adjust based on your specific raw text format).

Example Flow Structure

  1. Retrieve Doc_Config from CRM (Get the raw text value)
  2. Parse JSON (Convert text to structured data)
  3. Populate Word Template (Map parsed fields to placeholders)
  4. Finalize & Distribute Document

内容的提问来源于stack exchange,提问作者axbeit

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.29 10:19:07