Identify the desired operation: — Determine if the user wants to create, read, or edit a document.
2
Gather necessary information: — Collect the docid or URL of the document, the desired content (for editing), and the document type (for creation).
3
Construct the `wecom-cli` command: — Formulate the appropriate command with the correct tool name and JSON parameters.
4
Execute the command: — Run the `wecom-cli` command.
5
Handle the response: — Check the `errcode` and `errmsg` for errors. If successful, proceed to the next step. If an error occurs, display the error message to the user.
6
For `get_doc_content`, handle asynchronous polling: — If `task_done` is false, extract the `task_id` and repeat steps 3-5 until `task_done` is true.
7
Return the result: — Provide the requested document content, the URL and docid of the newly created document, or confirmation of the successful edit.
create a new wecom documentedit a wecom documentget content from a wecom documentmanage enterprise weixin documentsexport wecom document to markdowncreate a smart table in wecomupdate wecom document contentread a wecom document