Documentation - Flow.ai
  • Getting started
  • Triggers & Replies
  • Actions
  • Integrations
  • Guides
  • API

›Webviews

Actions

  • Overview
  • When and why
  • Code actions

    • Overview
    • Payload
    • Toolbelt
    • API Calls
    • Configuration
    • Triggering Events
    • Sending Replies
    • Params
    • Managing State
    • Debugging

    Webhook actions

    • Overview
    • Receiving calls
    • Sending Replies

    Zapier actions

    • Overview

    Payments

    • Overview
    • Stripe Single Purchase
    • Stripe Prepared Product Purchase
    • Examples of Stripe Purchases

    Webviews

    • Overview
    • Article
    • Date Picker
    • Radio select
    • Multiple Select
    • Terms

Terms

Display content and a button that triggers an event

You can use Markdown within the content to format text.

const url = await webview.terms.create({
  ref: 'terms',
  onSelect: {
    eventName: 'ACCEPTED'
  },
  title: 'Accept our terms of usage',
  tint: '#000',
  content: `
    # Title

    A simple paragraph with text

    ## Heading 2

    - List item 1
    - List item 2
    - List item 3
`
})

Reference

PropertyTypeExampleDescriptionRequired
refstringnews-articleIf provided, the webview will update it's content
tintstring#FF0000Tint color used for the button
titlestringSelect productDescriptive titles shown in the topYes
onSelect.eventNamestringACCEPTEDEvent name to trigger when terms are acceptedYes
contentstringLorem ipsum dolor...Markdown supported contentYes
button.labelstringI agree and acceptLabel of the confirmation button
← Multiple Select
  • Reference
Docs
Getting StartedBasic conceptsGuides
Platform
StatusSlack community
Resources
Blog
Copyright © 2021 Flow.ai