AppFlowy icon

AppFlowy

Consume AppFlowy API

Actions6

Overview

This node interacts with the AppFlowy API to create or update rows in a specified database within a workspace. It supports both creating new rows and upserting (creating or updating) rows based on a unique hash calculated from a user-provided string. This functionality is useful for synchronizing data into AppFlowy databases, ensuring that rows are either added or updated without duplication.

Common scenarios include:

  • Importing or syncing data from external sources into an AppFlowy database.
  • Maintaining up-to-date records by automatically updating existing rows if they already exist.
  • Automating data entry workflows where row uniqueness is determined by a custom hash.

Example: Automatically add or update customer records in an AppFlowy database whenever new data arrives from a CRM system, using a unique identifier string to avoid duplicates.

Properties

Name Meaning
Workspace Name or ID The workspace where the target database resides. Choose from a list or specify dynamically via expression.
Database Name or ID The database within the workspace where the row will be created or updated. Choose from a list or specify dynamically via expression.
Database Row Pre-Hash A string used to calculate a unique hash for the row, which serves as its unique identifier for upsert operations.
Data to Send Method of specifying the row data: either "Map Manually" to define individual fields or "JSON" to provide the entire row data as JSON.
Properties to Send When mapping manually, a collection of fields with their values to send. Each field includes the property name/ID and value typed according to the field type (e.g., text, number, single select, multi-select, date/time).
JSON Data When sending data as JSON, the full set of columns and their values formatted as JSON.
Include Document Data Whether to include additional document data (Markdown content) for the row.
Document Data The Markdown content representing the document data of the row, required if including document data.

Details on "Properties to Send" field types:

  • RichText: Text content.
  • Number: Numeric value.
  • SingleSelect: Single option selected from predefined choices.
  • MultiSelect: Multiple options selected.
  • DateTime: Date/time value, optionally with range and timezone support.
  • URL: URL string.
  • Checkbox: Boolean indicating checked state.

Output

The node outputs an array of JSON objects representing the created or updated database rows. Each output item contains the full response from the AppFlowy API for the respective row operation.

If document data is included, it is embedded within the row's JSON under a document property.

No binary data output is produced by this node.

Dependencies

  • Requires an API key credential for authenticating with the AppFlowy API.
  • Uses the AppFlowy REST API endpoints to perform workspace, database, and row operations.
  • Relies on n8n's built-in methods for loading dynamic options such as workspace IDs, database IDs, database fields, select options, and timezones.

Troubleshooting

  • Missing Field Values Error: If "Map Manually" is selected but no fields are provided, the node throws an error. Ensure at least one field is mapped.
  • Missing Date Values: For DateTime fields, if a date or date range is expected but not provided, an error occurs. Provide valid ISO 8601 dates.
  • Invalid JSON: When using JSON input for row data, ensure the JSON is well-formed.
  • API Authentication Errors: Verify that the API key credential is correctly configured and has necessary permissions.
  • Upsert Failures: The pre-hash string must be unique and consistent to identify rows correctly; otherwise, duplicate rows may be created instead of updates.

Links and References

Discussion