debt-collector-ai
is a Python-based application designed to automate the process of managing and collecting debts via integrating with Airtable and Stripe APIs. The application fetches new contacts from Airtable, creates Stripe customers and prices, generates or updates payment links, and updates the Airtable records accordingly.
- Fetch new contacts from Airtable with specific criteria.
- Create Stripe customers and prices.
- Generate or update Stripe payment links.
- Update the Airtable records with payment link and status.
- Check and operate only within business hours (Brisbane timezone by default, but can be customized).
- A Replit account.
- Python 3.6+ environment.
- Stripe and Airtable API keys.
- Go to your Replit account.
- Clone or fork the repository using the following URL:
https://github.com/VW3st/debt-collector-ai
- Open the cloned project in your Replit workspace.
Replit automatically handles dependency installation via the requirements.txt
file. However, if needed, you can manually install dependencies using:
pip install -r requirements.txt
Add the necessary environment variables in the Secrets tab within the Replit sidebar:
API_KEY
: Your Airtable API keyBASE_ID
: Your Airtable base IDCONTACTS_TABLE_ID
: Your Airtable contacts table IDSTRIPE_API_KEY
: Your Stripe API key
The application is set to operate based on Brisbane timezone by default. If you need to change the timezone, update the get_brisbane_time
function in main.py
:
def get_brisbane_time():
# Replace 'Australia/Brisbane' with your desired timezone
tz = pytz.timezone('Your/Timezone')
local_time = datetime.now(tz)
current_time_str = local_time.isoformat()
print(f"Current Local Time: {current_time_str}")
return local_time
You can run the application by clicking the "Run" button in the Replit interface or by executing the following command in the Replit shell:
python main.py
This will start the Flask server and begin processing contacts based on the specified business hours.
The application fetches new contacts from Airtable and processes them based on the specified criteria. It creates Stripe customers, prices, and payment links, and updates Airtable records accordingly.
- Fork the repository.
- Create a feature branch (
git checkout -b feature-xyz
). - Commit your changes (
git commit -m 'Add some feature'
). - Push to the branch (
git push origin feature-xyz
). - Open a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.
Created by VW3st. If you have any questions or suggestions, feel free to reach out to agencympire@gmail.com.