Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.
TypeScript agentaiai-agentsall-in-onecrmcrm-systememaillinearmcpmessagingnotesnotionofficerustslackslack-alternativestartupstartup-toolstypescriptworkspace
Document Text Extractor
This lambda is responsible for extracting text from documents and storing it in a database.
Prerequisites
- Install and setup Rust ecosystem on your machine.
- Cargo lambda
- sqlx-cli installed with
cargo install sqlx-cli. - just installed with
cargo install just
Building for deployment
DO NOT try and build this lambda from this directory for deployment.
# from the repository root
just services/document_text_extractor/build
Local Development
- Start local macrodb postgres instance
# from the root of the project
just run_dbs -d
just initialize_dbs # initializes the database if needed
- Create and fill in your
.envfile based on the.env.sample
cp .env.sample .env
- Start the lambda locally
#using just
just local
# cargo on linux
cargo lambda watch
# cargo on mac
cargo lambda watch --features macos
- Invoke the lambda using the sample input
# using just
just invoke data_file="sample_input.json"
# using cargo
cargo lambda invoke document-text-extractor --data-file sample_input.json
Testing
You must have the macrodb up and running locally to perform testing.
just test or cargo test to run tests