Skip to main content

Caestudy DonationFlow - NationBuilder donation import CLI tool for external payment processors (CanadaHelps and PayPal)

Project description

cdflow-cli docs · index.md

cæstudy. DonationFlow CLI

A command-line bridge for importing external donation data into NationBuilder with auditable output, source-specific adapters, and safe rollback support.

Purpose

Move CanadaHelps and PayPal exports into NationBuilder without rebuilding your upstream payment workflow.

Architecture

Adapters map source exports, plugins encode organization rules, and job artifacts preserve an audit trail.

Operational Posture

Verbose logging, success and fail CSVs, and rollback tooling make import runs inspectable rather than opaque.

DonationFlow CLI is a command-line tool for importing donation data from external sources like CanadaHelps and PayPal into your NationBuilder account. It is designed to be a bridge for organizations that use payment processors not natively integrated with NationBuilder, or for those migrating from other CRM platforms.

DonationFlow CLI is extensible to other payment processor sources through an existing adapter template and a plugin architecture through which organization-specific business rules can be implemented.

DonationFlow CLI was originally developed to help a non-profit charitable organization successfully migrate their donation data from CiviCRM and integrate their existing PayPal and CanadaHelps workflows with NationBuilder.

System Profile

Core Capabilities
  • Import from External Sources: Import donation data from CanadaHelps and PayPal CSV exports.
  • Extensible Design: Adapt to other payment platforms using the generic adapter and plugin hooks.
  • Detailed Logging: Capture every import job operation for troubleshooting and auditing.
  • Rollback Capable: Remove imported transactions when a run needs to be reversed.
Typical Use Case

Use DonationFlow when your fundraising data originates outside NationBuilder but needs to land there with repeatable transforms, deterministic outputs, and a paper trail that operations staff can review later.

Prerequisites

  • Python 3.8+
  • A NationBuilder account with API access.
  • A configured NationBuilder OAuth application.
  • Donation data exported as CSV files from CanadaHelps or PayPal.

Installation

Create an environment and activate

python3 -m venv <my-environment-name>
source <my-environment-name>/bin/activate

Install using PIP

pip install cdflow-cli

For development installation, please see the Contribution Guide.

Quick Start

  1. Initialize configuration: Run cdflow init to create template files:

    • ~/.config/caestudy/local.yaml - Main configuration file (default location)
    • ~/.env/nb_local.env - OAuth environment variables template (non-configurable location)

  2. Configure OAuth credentials: Edit ~/.env/nb_local.env with your NationBuilder OAuth credentials, then load:

    Locate the load-secrets.sh script

    If you have installed via pip and have created your virtual environment:

    cd <path-to-venv-environment-directory>/lib/python3.13/site-packages/cdflow_cli/scripts/
    

    Execute the script using your .env file as the parameter

    source ./load-secrets.sh ~/.env/nb_local.env
    
  3. Update the import configuration: In your configuration file (e.g., local.yaml), update the cli_import section to point to your CSV file(s).

  4. Place your CSV file: Put your CanadaHelps or PayPal CSV file in the cli_source directory you specified in your configuration.

  5. Run the import:

    cdflow import --config /path/to/your/local.yaml
    

    Or with less verbose output

    cdflow import --config /path/to/your/local.yaml --log-level NOTICE
    

    Alternative: Override import settings via CLI flags

    You can override the import type and file path from the config using CLI flags:

    # Override with relative path
    cdflow import --type canadahelps --file donations/emergency.csv --config /path/to/your/local.yaml
    # Override with absolute path
    cdflow import --type paypal --file /tmp/paypal_donations.csv --config /path/to/your/local.yaml
    
  6. Review the results: The tool will provide real-time feedback in the console. After the import is complete, you can review the results in the output directory you specified in your configuration.

    • _success.csv: This file contains all the records that were successfully imported, along with the new NationBuilder Person ID and Donation ID.
    • _fail.csv: This file contains any records that failed to import, along with any error message(s) in the NB Error Message column.

  7. Verify in NationBuilder: Log in to your NationBuilder account and navigate to the Finances section. You should see the newly imported donations in your transaction list.

Documentation

For more detailed information on configuration, usage, and troubleshooting, please see our full documentation in the repo /docs directory.

Support

Customers and product evaluators can reach out for support at support@caestudy.com.

License

This project is licensed under the Business Source License 1.1 (BSL).

  • Current license: BSL 1.1 with production use restrictions
  • Converts to: Apache 2.0 License on 2029-09-01
  • Full terms: See the LICENSE file for complete details

Contributing

Contributions are welcome! Please note:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cdflow_cli-2.0.0.tar.gz (553.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cdflow_cli-2.0.0-py3-none-any.whl (581.3 kB view details)

Uploaded Python 3

File details

Details for the file cdflow_cli-2.0.0.tar.gz.

File metadata

  • Download URL: cdflow_cli-2.0.0.tar.gz
  • Upload date:
  • Size: 553.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for cdflow_cli-2.0.0.tar.gz
Algorithm Hash digest
SHA256 84c3e49658a5c0e44bcf339e1a8a889e4e2316cb6cca24da77969732496de84e
MD5 bd6a4f9172ffa62119cbf029425088bb
BLAKE2b-256 a3df3e98b1c1d91714af9d1c770af5e86e482d66fc58f9d7a0a7136c3578042c

See more details on using hashes here.

File details

Details for the file cdflow_cli-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: cdflow_cli-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 581.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for cdflow_cli-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 69fd03206f7f15b41eca1ecda0f7c50433c5bfc80e01655df6f163c947da272a
MD5 14b7d329240647d2929092c3c45c321e
BLAKE2b-256 60d9484dc27da27d3fa4f82b2d0e05422bf53f2d8df16b4b376391b0c7380ee7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page