Future method cannot be called from a future or batch method: slackv2.invokePostMessage.makePostMessageRequest(String)

Anyone give any guidance into why this error would be occuring, code is pasted below.

public class RampOtherCostsBatch implements Schedulable {
public void execute(SchedulableContext SC) {
    makeCallout();
} 

@future(callout=true)
public static void makeCallout() {
    Ramp_Token__c rampTokenSetting = Ramp_Token__c.getValues('Ramp Token');
    //String rampToken = rampTokenSetting.Ramp_Token__c: null ? rampTokenSetting != null;
    String rampToken = rampTokenSetting != null ? rampTokenSetting.Ramp_Token__c: null;
    System.debug('------- security token--- '+rampToken);
    
    if (rampToken != null) {
        HTTP h1 = new HTTP();
        HTTPRequest req1 = new HTTPRequest();
        req1.setEndpoint('https://2nzuzzpdkdldfe3eh77gyq3fiy0ewkrv.lambda-url.us-east-1.on.aws'); 
        req1.setMethod('GET');
        req1.setHeader('Authorization', rampToken); 
        HttpResponse response1;   
        try {
            
            response1 = new Http().send(req1);
            
            if (response1.getStatusCode() == 200) {
                Map<String, Object> parsedData = (Map<String, Object>)JSON.deserializeUntyped(response1.getBody());
                List<Object> dataArray = (List<Object>)parsedData.get('data');
                List<Other_Cost__c> otherCostList = new List<Other_Cost__c>();
                
                Set<String> rampIds = new Set<String>(); // To store Ramp_ID__c values already processed
                
                for (Object dataObj : dataArray) {
                    Map<String, Object> dataMap = (Map<String, Object>)dataObj;
                    
                    String rampId = (String)dataMap.get('id');
                    
                    // Check if the Ramp_ID__c value already exists
                    if (!rampIds.contains(rampId)) {
                        String memo = (String)dataMap.get('memo');   
                        String createdAt = (String)dataMap.get('created_at');
  
                        Other_Cost__c oc = new Other_Cost__c();
                        oc.Subject__c = (String)dataMap.get('merchant');
                        oc.Ramp_Submitter__c = (String)dataMap.get('user_full_name');
                        oc.Date__c = Date.today();
                        oc.Ramp_ID__c = rampId;
                        oc.Ramp_Integration_Id__c = rampId;
                        oc.Ramp_Status__c = (String)dataMap.get('state');
                        oc.Description__c = (String)dataMap.get('memo');
                        oc.Ramp_Amount__c = (Decimal)dataMap.get('amount');
                        otherCostList.add(oc);
                        
                        // Add the Ramp_ID__c to the set to avoid duplicates
                        rampIds.add(rampId);
                    }
                }
                
                if(!otherCostList.isEmpty()){
                    //insert otherCostList;
                    Database.upsert(otherCostList, Other_Cost__c.Fields.Ramp_Integration_Id__c, false);
                    
                    // Insert Other_Cost_Line__c records
                    List<Other_Cost_Line__c> otherCostLineList = new List<Other_Cost_Line__c>();
                    for(Other_Cost__c oc : otherCostList) {
                        Other_Cost_Line__c ocLine = new Other_Cost_Line__c();       
                        ocLine.Other_Cost__c = oc.Id;
                        ocLine.Quantity__c = 1;
                        ocLine.Cost_Amount__c = oc.Ramp_Amount__c;
                        ocLine.Billable_Amount__c = oc.Ramp_Amount__c;
                        ocLine.Description__c = oc.Description__c;
                        ocLine.Ramp_Integration_Id__c = oc.Ramp_Integration_Id__c;

                        otherCostLineList.add(ocLine);
                    }
                    if(!otherCostLineList.isEmpty()) {
                        Database.upsert(otherCostLineList, Other_Cost_Line__c.Fields.Ramp_Integration_Id__c, false);
                    }
                }
            } else {
                System.debug('HTTP Request failed with status code: ' + response1.getStatusCode());
                System.debug('Response body: ' + response1.getBody());
            }
        } catch (Exception e) {
            System.debug('Exception: ' + e.getMessage());
        }
    } else {
        System.debug('Ramp Token is not available. Please check the custom setting.');
    }
}

}

This is the class the error is referring to, below is the trigger that is also within the error message,
trigger slack_Other_Cost on Other_Cost__c (after insert, after update, before delete) {
if(trigger.isAfter && trigger.isInsert || trigger.isAfter && trigger.isUpdate || trigger.isBefore && trigger.isDelete) {
slackv2__.utilities.startSubscriptionQueue(trigger.newMap, trigger.oldMap, trigger.operationType, ‘Other_Cost__c’);
}
}

Tried integrating the trigger into the overall class as well as removing the future. The future

needs to be there to get code coverage as well. This is supposed to be a Ramp integration in which it isn’t working on production while seeming to work in sandbox. Any suggestions would be welcome.

New contributor

Amritpal Rajput is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật