Skip to main content

I want to calculate the total cost of a Card while it's open.

So, I tried to use Automations > [When a card is created] > [Apply a formula].

The formula I need is: (Hourly Value Field * 8 hours) * (Due Date - Today's Date) but I couldn't insert Today's Date.


Hi Cibelle,

You're on the right track with using Pipefy's "Apply a formula" automation—but you’ve hit a current limitation: Pipefy formulas don't support dynamic functions like TODAY() or NOW() directly inside the formula field.

🚧 Why it's not working

Pipefy's built-in formula feature works with static fields only—meaning it can't dynamically calculate differences using the current date unless you store the current date somewhere in the card first.

✅ Workaround: Make it work with “Today’s Date”

Here’s how you can calculate total cost based on how many days are left until the due date, using a workaround:

Step-by-step setup

  1. Create an automation to store "Today's Date" in a field

    • Create a Date Field in your pipe: Today

    • Use an automation:

      • Trigger: When card is created or enters a phase

      • Action: Set field Today to {{current_date}}

    ✅ {{current_date}} is a built-in Pipefy variable that inserts the current date in a date field.

  2. Create a Number field for Hourly Rate
    e.g., Hourly Value

  3. Create a Formula field for Total Cost
    Example formula:

    ({{Hourly Value}} * 8) * ({{Due Date}} - {{Today}})

    This will multiply the hourly value by 8 (assuming 8 hours per day), and then multiply that by the number of days until the due date.

⚠️ Important Notes

  • Due Date and Today must both be date-type fields.

  • Pipefy supports basic math in formula fields, but no advanced time/date functions. So this workaround is the only way to make it dynamic.

🛠️ Alternative with Advanced Logic

If you need more dynamic or real-time calculation (e.g., updated daily), you could use:

  • Pipefy API + Webhook + external script (via n8n, Make.com, Zapier, etc.) to calculate daily and update a field.

  • Or, use a Pipefy AI Agent (if available in your plan) to calculate costs in bulk and summarize results via automation.

 


Reply