Genesys Cloud - Developer Community!

 View Only

Sign Up

  • 1.  Creating Knowledge Article with images via API

    Posted 27 days ago

    Hello, I am finding a way to create a knowledge article with APIs. I cannot find a way to be able to upload images onto knowledge base and use those images when creating an article. The issue is we have word documents with images and when we copy and paste the document into the content box, we have to save each image individually on the word document and insert one by one. Since there is no way of importing a doc file into knowledge base, I'm open to some suggestions on how to streamline this process.

    Thanks!


    #PlatformAPI

    ------------------------------
    Matthew
    Application Analyst
    ------------------------------


  • 2.  RE: Creating Knowledge Article with images via API

    Posted 27 days ago

    Hello Matthew,

    Images are handled separately from the article content.

    Images in an article need to be referenced using a URL. Currently, there isn't a documented Knowledge API for uploading images directly to the knowledge base.

    For Word documents, you could extract and host the images, then use their URLs when creating the article through the API. This process could also be automated to reduce the manual work.

    Knowledge API documentation

    Knowledge Workbench

    Hope that helps!



    ------------------------------
    Cameron
    Online Community Manager/Moderator
    ------------------------------



  • 3.  RE: Creating Knowledge Article with images via API

    Posted 11 days ago

    Hi Matthew,

    A few ideas that might be worth exploring to cut down that manual work, depending on what you're using the articles for.

    Idea 1, Response Assets for the images. From what I can see in the Workbench V2 docs, images you upload to an article end up in the Response Assets library (that's why the Response Assets > Asset permission is needed to upload them). Response Assets also have their own API under Response Management, so it may be possible to script it: extract the images from the Word file, upload each one as a response asset, take the URL it returns and reference it in the article body when creating it through the Knowledge API. I haven't seen this flow documented end to end, so I'd test it with a single article first and check the image renders wherever the article is used (agent view, messaging, etc.).

    Idea 2, skip the conversion altogether. If the main goal is for Copilot or virtual agents to use the content, the File Connector APIs let you sync .docx files directly as a knowledge source, including several files at once in a ZIP: https://help.genesys.cloud/faqs/how-to-sync-knowledge-sources-using-file-connector-apis/ Worth checking whether that fits your use case before building a converter.

    Idea 3, bulk import for the text. For a first load of Q&A content, the Workbench V2 import accepts CSV, JSON or XLSX, so you could convert the text in bulk and only handle the images separately.

    If you try any of these, it would be great to hear what worked.



    ------------------------------
    Ignacio
    Senior CX Advisory Consultant
    ------------------------------