Send HTTP request (add customer to a company)

Hello,

we want to use Shopify Flows to check if a user registered for b2b. (This allready works)
And then “Send HTTP request” to add this user to a company.

Our Settings:
URL …myshopify.com/admin/api/2025-04/graphql.json
headers Content-type application/json
X-Shopify-Access-Token shpat_…

Body:
{
“query”: “mutation companyContactCreate($input: CompanyContactCreateInput!) { companyContactCreate(input: $input) { companyContact { id } userErrors { field message } } }”,
“variables”: {
“input”: {
“companyId”: “gid://shopify/Company/8827568449”,
“customerId”: “{{ customer.id }}”
}
}
}

i dont know what i am doing wrong.
The First Trigger used in flows is “Customers tags added”

Greetings Thorsten

What error do you get? Is it permission, syntax or query related?

Use “Send Admin API request” as the action instead. It handles keys and mutation syntax for you…you just need to enter the JSON variables

2 Likes