0

Is there an Example for insertion live app into Quip document via API

Edit API

Content-Type: application/x-www-form-urlencoded
Authorization: Bearer {{access_token}}
User-Agent: PostmanRuntime/7.26.7
Accept: */*
Cache-Control: no-cache
Postman-Token: 896f63df-27ba-43dc-8328-62261456e276
Host: platform.quip.com
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Content-Length: 230
content=%3Cdiv%20id%20%3D'New%20Div'%20data-live-app%20type%3D%22salesforce_record%22%3E%20This%20is%20a%20new%20Div%20%3C%2Fdiv%3E&thread_id=bRhJA1JTE8BH&data=%7Borg_id%3A00D6g000000EZuvEAG%2Crecord_id%3A00Q6g000009ltzQEAQ%7D
HTTP/1.1 400 Bad Request
Date: Fri, 23 Oct 2020 17:19:44 GMT
Content-Type: application/json; charset=UTF-8
Content-Length: 98
Connection: keep-alive
Server: nginx
Vary: Accept-Encoding
X-Ratelimit-Limit: 100
X-Ratelimit-Remaining: 99
X-Ratelimit-Reset: 1603473600
Retry-After: 17
Content-Encoding: gzip
X-Frame-Options: SAMEORIGIN
X-Xss-Protection: 1; mode=block
X-Content-Type-Options: nosniff
X-Download-Options: noopen
Strict-Transport-Security: max-age=31536000; includeSubDomains
Referrer-Policy: origin-when-cross-origin
{"error":"application_error","error_code":400,"error_description":"`data-live-app` json decode error"}

for Create API

Content-Type: application/x-www-form-urlencoded
Authorization: Bearer {{access_token}}
User-Agent: PostmanRuntime/7.26.7
Accept: */*
Cache-Control: no-cache
Postman-Token: 7a6a3c4f-791f-43aa-8d8c-07b9237a548a
Host: platform.quip.com
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Content-Length: 223
content=%3Cdiv%20id%20%3D'New%20Div'%20data-live-app%20type%3D%22salesforce_record%22%3E%20This%20is%20a%20new%20Div%20%3C%2Fdiv%3E&data=%7Borg_id%3A00D6g000000EZuvEAG%2Crecord_id%3A00Q6g000009ltzQEAQ%7D&title=New%20Doc
HTTP/1.1 500 Internal Server Error
Date: Fri, 23 Oct 2020 17:22:01 GMT
Content-Type: application/json; charset=UTF-8
Content-Length: 57
Connection: keep-alive
Server: nginx
Vary: Accept-Encoding
X-Ratelimit-Limit: 100
X-Ratelimit-Remaining: 99
X-Ratelimit-Reset: 1603473780
Retry-After: 60
Content-Encoding: gzip
X-Frame-Options: SAMEORIGIN
X-Xss-Protection: 1; mode=block
X-Content-Type-Options: nosniff
X-Download-Options: noopen
Strict-Transport-Security: max-age=31536000; includeSubDomains
Referrer-Policy: origin-when-cross-origin
{"error":"application_error","error_code":500}
0

We've recently updated our docs to include an example of inserting live apps, along with an example of the initialization parameters we support for some apps:

https://corp.quip.com/dev/automation/documentation#edit-a-document

Relevant excerpt:

You can insert a Live App into a document via a div tag with the following attributes:

  • data-live-app-id: The id of Live App you want to insert. eg. XdJAjAN5Jbi
  • data-live-app-payload: JSON string containing all the details of the Live App to insert.

See below for examples. eg. <div data-live-app-id='XXXXX' data-live-app-payload='{"record_id":"YYYYY","org_id":"ZZZZZ"}' />

Salesforce Record Live App

  • data-live-app-id: XdJAjAN5Jbi
  • data-live-app-payload
    • record_id: The Salesforce record ID to insert.
    • org_id: The Salesforce org ID.

Salesforce List Live App

  • data-live-app-id: QYUAjAGNxIo
  • data-live-app-payload
    • Record List
      • list_id: The Salesforce list ID to insert.
      • object_type: Type of Object
      • org_id: The Salesforce org ID.
    • Related List
      • record_id: The record ID.
      • related_list_type: The related list view's object type associated to the record.
      • org_id: The Salesforce org ID.

We return the updated thread in the format specified in Get Thread

2
  • Thank you :), I have one question though is there a way in quip to add Salesforce report ? Programattically? – Nithin Balaji Nov 23 '20 at 5:46
  • No, reports are not live apps, and we don’t currently have a way to insert them via the API. – Jesse Nov 24 '20 at 6:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.