Writing a script in the form of a platform for automatic monitoring of Facebook advertising campaigns.
It is necessary to write a script that will automatically turn on and off ad sets of Facebook campaigns based on statistics from the tracker: KeyTaro provides statistics on the number of leads available in the ad group - Facebook provides statistics on expenses for the same group - then we match and the script decides whether to keep or turn off. There seem to be two ways to get statistics from Facebook, through a token and through the business manager, I don't remember exactly through the API.
Filtering will occur based on: cost per click, cost per lead, CPM. There should be access levels. Also, everyone works in different geos, so a suitable structure is needed. The price is discussed individually.
Below are more details:
TECHNICAL ASSIGNMENT
Facebook Ads Management System with Auto-Rules (MVP)
________________________________________
1. Project Goal
To develop a web system for centralized management of a large number of Facebook Ads accounts, focusing on:
• automatic application of auto-rules
• reducing budget waste
• controlling cost per lead
• partial automation without the risk of FB blocks
________________________________________
2. Integration Method
• Integration via Facebook Marketing API
• Authorization via Access Token
• Consideration of Facebook rate limits
• All actions (pause / enable) must be logged
________________________________________
3. Roles and Access Rights
Admin
• Full access to all accounts
• User and role management
• Setting global auto-rules
Team Lead
• Access only to attached buyers
• Management of auto-rules within their group
Buyer
• Sees only their advertising accounts
• View statistics
• Manual start / stop of ads
________________________________________
4. Data Structure
The system must receive and display:
• Advertising Account
o ID
o Name
• Campaign
o ID
o Name
• Ad Set
o ID
o Name
• Ad
o ID
o Name
Additionally (custom fields within the system):
• Internal account name
• Comment / note
• Account provider
• GEO
• Responsible buyer
________________________________________
5. Filters
Filtering by:
• buyer
• account provider
• GEO
• status (active / paused)
• spend
• CPL
________________________________________
6. Auto-Rules
(apply ONLY to ads, not to campaigns and ad sets)
General conditions for all auto-rules
• Metric checks are performed once every N minutes (configurable)
• No more than X pause/enable actions per hour for 1 advertising account
• Mandatory delay between actions
• All actions are recorded in logs
________________________________________
6.1. Auto-stop ad due to lack of leads
Conditions:
• Spend ≥ X
• Leads = 0
Action:
• The ad is paused
• The reason for stopping is recorded: no_leads
________________________________________
6.2. Auto-restart ad upon lead arrival (key rule)
Conditions for restart:
• The ad was stopped by the system
• A lead arrival is recorded (new lead after stopping)
Action:
• The ad is automatically switched to active
• The ad is marked with the status: restarted_after_lead
• CPL control is initiated (see item 6.3)
❗️ Limitation:
• One ad can be automatically restarted no more than N times in 24 hours
________________________________________
6.3. Control of cost per lead after restart
Conditions:
• The ad is in the status restarted_after_lead
• CPL > the set limit X
• Number of leads ≥ N
Action:
• The ad is paused
• Repeated automatic restart is prohibited
• Reason for stopping: high_cpl_after_restart
________________________________________
6.4. Auto-stop due to high cost per click (optional)
Conditions:
• CPC > X
• Spend ≥ Y
• Leads = 0
Action:
• The ad is paused
❗️ If there is ≥ 1 lead — the rule does not apply
________________________________________
6.5. Automatic start / stop by schedule
Functionality:
• Ability to set a schedule for ad operations
• Consideration of GMT +3 time zone
• Applies only to ads
________________________________________
7. Logs and Control
The system must maintain a log:
• Account ID
• Ad ID
• Action (pause / enable)
• Reason
• Auto-rule
• Date and time
• User / system
Logs must be accessible in the interface.
________________________________________
8. Interface (Web)
• Tabular view of data
• Filters
• Display of current statuses
• Action history
• Ability to enable / disable auto-rules
________________________________________
9. Limitations and Security
• Prohibition of mass actions without delays
• Dry-run mode (display only, without execution) — preferable
• Ability to temporarily disable auto-rules on the account
________________________________________
-
253 1 0 Hello! I have reviewed your technical specification. This is a professional task related to AdTech automation, which I will implement on a reliable stack of Python (Django/FastAPI) + PostgreSQL + Celery/Redis. I am ready to discuss the logic of lead "flight" and the database structure in a private chat. I guarantee clean code and a professional approach to MVP development.
-
615 3 0 Hello.
I have reviewed the technical specifications. Here I see not just a script, but an MVP platform for centralized control of Facebook Ads with a rule engine, logs, access roles, and secure application of auto-actions through the Facebook Marketing API.
The key technical point in this task is the correct mapping of statistics between Keitaro and Facebook, as well as reliable logic for auto-rules without the risk of mass dangerous actions. That is why I would suggest starting step by step: first, checking the mapping/business logic and testing a proof of concept, then implementing the MVP.
What I can deliver in the first release:
integration of Keitaro + Facebook Marketing API
data mapping by ad/bundle
… auto-rules for pause/restart/CPL control
logs of all actions
web interface with roles, filters, and dry-run mode
basic limitations on rate limits/delays/safe actions
After receiving the details, I am ready to first create a short test proof of concept for mapping and key business logic to establish the correct direction for implementation before the full launch. We can discuss all the details in private messages.
-
265 Hello.
I understand the task: we will retrieve leads and statuses from Keitaro, gather expenses and metrics from the Facebook Marketing API, match them by advertisement or by bundle, after which the system will make decisions to pause or activate based on rules, with limits on actions, delays, and complete logging. This can be done carefully to avoid hitting rate limits and without abrupt mass operations.
We will build an MVP as a web panel with roles (admin, team lead, buyer), filters by geo and suppliers, a status table, action history, a dry-run mode, and a schedule. We will implement auto-restart after reaching the limit correctly by storing the system's stop status and checking for new leads over time after the pause.
To quickly assess the timeline and price, I will clarify a couple of things: how do you match Keitaro leads with a specific Facebook advertisement, by ad_id in parameters, by UTM, by subid, or through postback? And secondly, are the rules strictly applied to Ads, or do they sometimes need to apply to Ad Sets as well?
If this is available, we will propose an architecture and can start immediately.
-
747 2 0 Hello! I have fully studied the project brief — the task is clear, I have implemented similar tools for media buying. I am ready to take it on.
What I see in this project:
This is not just about "creating an interface to the Facebook API" — the logic of auto-rules is important here, especially the chain: auto-stop → lead arrival → restart → CPL control. If this chain is implemented poorly, the system will either waste the budget or block normally functioning ads.
My tech stack for this project:
Backend — Python (FastAPI) + Celery for background tasks (checking metrics on a schedule), PostgreSQL for logs and states. Frontend — React with a tabular view, filters, and action history. Facebook Marketing API — I have worked with rate limits, I know how to properly build action queues to avoid getting banned by FB.
What I will implement strictly according to the project brief:
All 5 auto-rules including the limit of N restarts within 24 hours
Roles: Admin / Team Lead / Buyer with data isolation
… Complete logging of each system action (who, what, when, why)
Dry-run mode — first you see what the system will do, then you turn on the live mode
Rate limiting and delays between actions — so FB does not see the bot pattern
Deadlines and approach:
I work in iterations. First — a working MVP with auto-stop and logs (1-1.5 weeks), then — the other rules and interface. At each stage, testing and feedback can be provided.
I am ready to start with the brief — I will clarify a few details regarding the business logic that affect the architecture (for example, how exactly the "lead arrival" is recorded — webhook, polling FB API, or a third-party CRM?).
Write to me — we will discuss.
-
656 9 0 Good evening, Sasha!
In general, the task is clear, but for an accurate answer regarding the deadlines and price, I would like to clarify some questions that arose after analyzing your task.
Please write in private messages — we will discuss the details and your wishes.
-
172 1 1 Hello! I am ready to complete this project and have extensive experience in developing various applications.
-
1618 18 1 1 Hello.
I can complete the task. I have experience in this area. The deadlines and cost are approximate - we need to discuss the details.
Write to me, I will do everything quickly and efficiently.
-
1495 13 0 Hello! I can implement it. Write to me privately to discuss all the details. I will be glad to cooperate!
-
10352 129 0 Hello.
I have practical experience working with the Meta Marketing API and integration with Keitaro through the API. I have implemented data retrieval, data matching, and automation of actions based on metrics (CPC, CPL, Spend).
I am ready to discuss the architecture of the MVP and phased implementation.
-
1671 11 0 Good day
Interesting task, although I have no experience with Facebook API, but I have experience with Keytaro. I also have extensive experience in building complex and high-load advertising platforms.
This is definitely not a "script," but rather a quite complex web project that I am ready to implement using Go + Vue for the frontend.
I can provide deployment, debugging, and further support.
Cost is $20 per hour.
Feel free to contact me.
-
284 Hello! I am interested in your request for automation. I have experience working with Python and developing systems with clear business logic.
How I will implement your project:
Stack: Python (Celery for background tasks) + PostgreSQL for reliable logging.
Logic of "leads": I will implement it through constant monitoring of the delta of leads after stopping (comparing leads_at_pause with current API data).
Security: I will implement a Dry-run mode so you can test the operation of the rules without a real stop of the ads.
…
Interface: I will create a convenient table on Django with filters and action history for each account.
I am ready to discuss technical details and start working. I am in touch!
-
536 3 0 1 Greetings! I have reviewed the technical specifications. The task is clear: a flexible rule management system focused on security is needed.
What I will implement:
"Global Switch" system: the ability to instantly disable all auto-rules for both the entire system and individual accounts.
Dry-run Mode: simulation mode. The bot will calculate the logic and show the result without executing trades in reality. This will allow for strategy debugging without risk to the balance.
Safety Delays: I will implement a task queue with customizable delays between actions to avoid blocks from the exchange/service API.
Persistence: rule settings will be stored in the database, ensuring their preservation during server reboots.
I have experience working with Python (aiogram), API integration, and creating architectures for Telegram bots. I will make the code clean, extensible, and provide full support after launch. I am ready to discuss the details and get started.
-
738 4 0 Good day. I am ready to do it! I will write the backend in Go (fiber), it will work quickly and efficiently + web in js. I have done a similar project for Amazon. Feel free to contact me.
-
6802 56 1 2 Good day, I am ready to do it. Write to me in private messages and we will discuss in more detail....
Current freelance projects in the category Python
Application developmentI wish to create a mobile application for communication, the app should have audio and video calls, group chat creation, the ability to sync with phone contacts, account settings: email binding, 2FA, phone number, the ability to customize app notifications, change the app… Java, Python ∙ 4 hours 29 minutes back ∙ 6 proposals |
Setting up two-way integration of WhatsApp with Odoo CRMHello! We are looking for a specialist to implement a technical task for setting up a two-way integration of the WhatsApp messenger with the Odoo CRM system. ⚠️ Important technical clarification: The official WhatsApp Business API (WABA) is not considered. It is necessary to… Python, Web Programming ∙ 14 hours 24 minutes back ∙ 20 proposals |
Data parsing through mobile APILooking for a person with experience in data parsing through mobile API, for parsing e-commerce, rozetka and similar sites. Tasks: 1. Intercepting traffic from the mobile application (Android), setting up a proxy, analyzing requests. 2. Identifying the necessary API endpoints… Python, Data Parsing ∙ 2 days 11 hours back ∙ 30 proposals |
Find a product feed (Google Merchant XML) for a website on OpenCart
16 USD
It is necessary to find a direct link to the active product feed (XML) of a competitor for Google Merchant Center Platform (CMS): OpenCart / ocStore Find the original feedRequirements for the result: Working link to the XML file Python, Data Parsing ∙ 7 days 20 hours back ∙ 29 proposals |
Development of a TikTok farm (content factory)It is necessary to develop a system for centralized management of multiple TikTok accounts with automatic content publishing, using individual proxies and simulating natural account activity. Functional Requirements1. Account Management Adding and removing TikTok accounts.… Python, Bot Development ∙ 8 days 7 hours back ∙ 22 proposals |