Recent searches
No recent searches
Import Articles from HTML or Markdown? Need to fix image URLs!
Posted May 11, 2023
We're trying to migrate knowledge base articles from a website, but there is some pushback on leaving the images hosted on Azure (doesn't make any sense to me, but 🤷) so I'm trying to find a solution to fix the image URLs in bulk.
Does the API workflow below work? Am I missing anything or overcomplicating it? Is there an easier solution? Our current KB is in Markdown language.
Possible API workflow:
a) Create/upload the unassociated attachments via API (build a list of file_name, content_url, id)
b) Use the content_url to update the old image URL in the article (replace based on file name using file list above, not with API)
c) Upload articles in bulk via API (build a list of article_id from API & filenames, id extracted from uploaded articles)
d) Use the Associate Attachments in Bulk to Article API to associate the unassociated images to the appropriate articles using the article/image list
I'm using Python to code this... so if you have any useful relevant Python code, feel free to share.
Thanks!
0
1
1 comment
Eric Nelson
From what I'm seeing here this looks like a smart way to approach this!
1