I am currently trying to figure out what is required to update a rich text field, i have the api call setup and is sending data but when i send in rich text from my Zoho Creator form, it shows up as
Also how do we use the api to update a File field
I am currently trying to figure out what is required to update a rich text field, i have the api call setup and is sending data but when i send in rich text from my Zoho Creator form, it shows up as
Also how do we use the api to update a File field
How is the rich text being âsentâ?
Check out the guide
Looks like the rich text field in Zoho returns the text as this,
If I understand the problem, it seems like the issue is that ZoHo is sending html, and Fibery is expecting markdown
Yeah is there anyway work around for this?
Iâm not a zoho or zapier expert, so Iâm not sure.
What are the API call(s) you are using? Can you show the code here?
{
âcommandâ: âcreate-or-update-documentsâ,
âargsâ: [
{
âsecretâ: âxxxxxxxxxâ, //secret of specific description field
âcontentâ: âxxxxxâ // this would be the variable that stores the rich text from zoho
}
]
}
I tried that and it worked for normal text now, but if i add in rich text items in Zoho, it will send back for instance <ul> and <ol>
for bulleted list which will cause nothing to be shown on fibery side
That doesnât sound right
Did you verify that the content being sent is valid HTML?
Here is the html from zoho
I think you will need to engage Fibery Support for help with this issue, since only they can see what data has been passed to Fibery
I did a quick test with Fibery scripting
const fibery = context.getService('fibery');
for (const entity of args.currentEntities) {
const content = '<div>Description<br/></div><ul dir="ltr"><li>Bullet 1<br/></li><li>Bullet 2</li></ul><div><br/></div>';
await fibery.setDocumentContent(entity['Description']['Secret'], content, 'html');
}
and the output was rendered pretty much as I would expect:
I also tested via a POST to the documents API:
https://acme.fibery.io/api/documents/commands?format=html
{
"command": "create-or-update-documents",
"args": [
{
"secret": "91dc8478-1a3c-4b1a-9ba1-2d57a32ad6b1",
"content": "<div>Description<br/></div><ul dir=\"ltr\"><li>Bullet 1<br/></li><li>Bullet 2</li></ul><div><br/></div>"
}
]
}
and the result was the same.
However, note that I had to escape the double quote in the <ul dir="ltr">
part since JSON does not like double quotes in a string.
I suggest you check if the content is being correctly JSON encoded.
Note that it is also valid HTML to use single-quotes instead of double-quotes for parameter values - hopefully Fibery can handle this variation.
E.g.,
"content": "<div>Description<br/></div><ul dir='ltr'> ..."
This worked for me, using single quotes