Error with template: Email Invoice PDF to a client from one's own email as soon as it's created on Invoice Ninja

Hello,

I’m quite new to Make and I’m encountering an issue with the ‘Get a Client’ module while using a template for Invoice Ninja. Despite following the basic instructions and setting up webhook and API connections, I’m receiving an error that reads ‘DataError’ (the module expects an Object but finds a String).

Steps I’ve tried:

  • Checking the connections
  • Reconnecting the services.

I’m trying to automate the emailing of invoices and have included a screenshot showing the error. Thanks in advance for your help!

Welcome to the Make community!

1. Screenshots of module fields and filters

Please share screenshots of relevant module fields and filters in question? It would really help other community members to see what you’re looking at.

You can upload images here using the Upload icon in the text editor:
Screenshot_2023-10-07_111039

2. Scenario blueprint

Please export the scenario blueprint file to allow others to view the mappings and settings. At the bottom of the scenario editor, you can click on the three dots to find the Export Blueprint menu item.

Screenshot_2023-08-24_230826
(Note: Exporting your scenario will not include private information or keys to your connections)

Uploading it here will look like this:

blueprint.json (12.3 KB)

3. And most importantly, Output bundles

Please provide the output bundles of the modules by running the scenario, then click the white speech bubble on the top-right of each module and select “Download output bundles”.
Screenshot_2023-10-06_141025

A.

Save the bundle contents in your text editor as a bundle.txt file, and upload it here into this discussion thread.

Uploading it here will look like this:

bundle.txt (12.3 KB)

B.

If you are unable to upload files on this forum, alternatively you can paste the formatted output bundle in this manner:

  • Either add three backticks ``` before and after the code, like this:

    ```
    input/output bundle content goes here
    ```

  • Or use the format code button in the editor:
    Screenshot_2023-10-02_191027

Providing the output bundles will allow others to replicate what is going on in the scenario even if they do not use the external service.

Following these steps will allow others to assist you here. Thanks!

2 Likes

Hi @samliew :wave:t3:

Here they are:

blueprint.json (15.4 KB)

There is no output bundle:
[
null
]

Can someone help me?

You’ll need to provide the output bundles of all the modules, not just the one that failed.

2 Likes
[
    {
        "id": "mbkZVBYNaz",
        "user_id": "JxboYmnAeg",
        "project_id": "",
        "assigned_user_id": "",
        "amount": 500,
        "balance": 500,
        "client_id": "mepY4yQpaM",
        "vendor_id": "",
        "status_id": "2",
        "design_id": "APdRoy0eGy",
        "recurring_id": "",
        "created_at": "2024-01-05T09:33:13.000Z",
        "updated_at": "2024-01-05T09:33:13.000Z",
        "archived_at": 0,
        "is_deleted": false,
        "number": "0009",
        "discount": 0,
        "po_number": "",
        "date": "2024-01-05",
        "last_sent_date": "",
        "next_send_date": "",
        "due_date": "2024-01-12",
        "terms": "<p><strong>Paiement</strong> : Les factures sont dues et payables dans les 15 jours suivant la date de reception de la facture, sauf accord contraire écrit.</p>\n<p><strong>Retard de Paiement</strong> : En cas de retard de paiement, des intérêts de retard peuvent être appliqués au taux légal en vigueur.</p>\n<p><strong>Réclamations</strong> : Toute réclamation concernant les factures doit être soumise par écrit dans les 7 jours suivant la réception de la facture.</p>\n<p><strong>Confidentialité</strong> : Les informations de facturation sont traitées avec confidentialité et en conformité avec les lois sur la protection des données.</p>",
        "public_notes": "",
        "private_notes": "",
        "uses_inclusive_taxes": false,
        "tax_name1": "TVA (0%)",
        "tax_rate1": 0,
        "tax_name2": "",
        "tax_rate2": 0,
        "tax_name3": "",
        "tax_rate3": 0,
        "total_taxes": 0,
        "is_amount_discount": false,
        "footer": "<p><strong>MERCI DE VOTRE CONFIANCE</strong></p>",
        "partial": 0,
        "partial_due_date": "",
        "custom_value1": "",
        "custom_value2": "",
        "custom_value3": "",
        "custom_value4": "",
        "has_tasks": false,
        "has_expenses": false,
        "custom_surcharge1": 0,
        "custom_surcharge2": 0,
        "custom_surcharge3": 0,
        "custom_surcharge4": 0,
        "exchange_rate": 1,
        "custom_surcharge_tax1": false,
        "custom_surcharge_tax2": false,
        "custom_surcharge_tax3": false,
        "custom_surcharge_tax4": false,
        "line_items": [
            {
                "product_key": "Prestation DJ",
                "notes": "",
                "cost": 500,
                "product_cost": 0,
                "quantity": 1,
                "tax_name1": "",
                "tax_rate1": 0,
                "tax_name2": "",
                "tax_rate2": 0,
                "tax_name3": "",
                "tax_rate3": 0,
                "custom_value1": "",
                "custom_value2": "",
                "custom_value3": "",
                "custom_value4": "",
                "discount": 0,
                "tax_id": "1",
                "type_id": "1",
                "createdAt": null,
                "is_amount_discount": false,
                "sort_id": "0",
                "line_total": "500.00",
                "gross_line_total": 500,
                "tax_amount": 0,
                "date": "",
                "task_id": "",
                "expense_id": ""
            }
        ],
        "entity_type": "invoice",
        "reminder1_sent": "",
        "reminder2_sent": "",
        "reminder3_sent": "",
        "reminder_last_sent": "",
        "paid_to_date": 0,
        "subscription_id": "",
        "auto_bill_enabled": false,
        "tax_info": {},
        "invitations": [
            {
                "id": "Le32Mkx9d6",
                "client_contact_id": "rb2vv06jbW",
                "key": "Wpmbk5ezJn-fm7wrpTSeAS1TIuXUrF2xuTIrlnUgaTj",
                "link": "https://dejonghe-ps.invoicing.co/client/invoice/Wpmbk5ezJn-fm7wrpTSeAS1TIuXUrF2xuTIrlnUgaTj",
                "sent_date": "2024-01-05T08:33:13.000Z",
                "viewed_date": "",
                "opened_date": "",
                "updated_at": "2024-01-05T09:33:13.000Z",
                "archived_at": 0,
                "created_at": "2024-01-05T09:33:13.000Z",
                "email_status": "",
                "email_error": "",
                "message_id": ""
            }
        ],
        "documents": [],
        "client": {
            "id": "mepY4yQpaM",
            "user_id": "JxboYmnAeg",
            "assigned_user_id": "JxboYmnAeg",
            "name": "TEST ARNAUD",
            "website": "",
            "private_notes": "",
            "balance": 500,
            "group_settings_id": "",
            "paid_to_date": -500,
            "payment_balance": 0,
            "credit_balance": 0,
            "last_login": "2024-01-04T12:32:31.000Z",
            "size_id": "",
            "public_notes": "",
            "client_hash": "WQQQsSsaQeMlEK6THnHm85uBFkzpnHBOtS8suP6T",
            "address1": "Avenue du Prince héritier",
            "address2": "17",
            "phone": "+32491988599",
            "city": "Woluwé St Lambert",
            "state": "Bruxelles",
            "postal_code": "1200",
            "country_id": "56",
            "industry_id": "",
            "custom_value1": "",
            "custom_value2": "",
            "custom_value3": "",
            "custom_value4": "",
            "shipping_address1": "",
            "shipping_address2": "",
            "shipping_city": "",
            "shipping_state": "",
            "shipping_postal_code": "",
            "shipping_country_id": "",
            "settings": {
                "currency_id": "3",
                "language_id": "4",
                "payment_terms": "7",
                "valid_until": "30",
                "send_reminders": true,
                "entity": "App\\Models\\Client",
                "id_number": null,
                "vat_number": null,
                "name": null,
                "website": null,
                "email": null,
                "phone": null,
                "classification": null
            },
            "is_deleted": false,
            "vat_number": "699912390712893",
            "id_number": "",
            "updated_at": "2024-01-05T09:33:13.000Z",
            "archived_at": 0,
            "created_at": "2023-12-19T15:25:43.000Z",
            "display_name": "TEST ARNAUD",
            "number": "0002",
            "has_valid_vat_number": false,
            "is_tax_exempt": false,
            "routing_id": "",
            "tax_info": {},
            "classification": "individual",
            "contacts": [
                {
                    "id": "rb2vv06jbW",
                    "first_name": "Arnaud",
                    "last_name": "Le Jeune",
                    "email": "arnauddejonghe@gmail.com",
                    "created_at": "2023-12-19T15:25:43.000Z",
                    "updated_at": "2024-01-04T12:32:31.000Z",
                    "archived_at": 0,
                    "is_primary": true,
                    "is_locked": false,
                    "phone": "+32491988599",
                    "custom_value1": "",
                    "custom_value2": "",
                    "custom_value3": "",
                    "custom_value4": "",
                    "contact_key": "OwftGZskymtoNJhitKeLifqsXyxhM7Qp",
                    "send_email": true,
                    "last_login": "2024-01-04T12:32:31.000Z",
                    "password": "",
                    "link": "https://dejonghe-ps.invoicing.co/client/key_login/OwftGZskymtoNJhitKeLifqsXyxhM7Qp"
                }
            ],
            "documents": [],
            "gateway_tokens": []
        }
    }
]

Looks like the error message “DataError” needs to be further investigated by customer support.

For quicker assistance with bugs and technical problems, you may want to contact support directly. They respond very quickly and update you frequently on the status of their investigation.


By the way, the contact email address is already included in your “Watch New Invoice” module, so you can already send off an email to them!

Use {{5.client.contacts[].email}}

You’ll just need to scroll down and expand Client > Contacts

2 Likes