n8n nodes for FriendGrid (SendGrid) and AIML API image generation
npm install n8n-nodes-aiml-imagefriendGrid
bash
npm run build
npm link
`
2. Link into your n8n custom directory (create if missing):
- Windows: %USERPROFILE%\.n8n\custom
- macOS/Linux: ~/.n8n/custom
`bash
cd ~/.n8n/custom
npm init -y
npm link n8n-nodes-awesome-n8n
`
3. Start n8n:
`bash
n8n start
`
4. In the editor, search for “FriendGrid”.
Operations
- Resource: Contact
- Operation: Create
- Creates/updates a marketing contact in SendGrid
- HTTP: PUT https://api.sendgrid.com/v3/marketing/contacts
$3
- Email (string, required): Email address of the contact.
- Additional Fields (collection, optional):
- First Name (first_name)
- Last Name (last_name)
The node supports multiple input items using getInputData() and will send each item’s contact in the contacts array as described in the docs Step 3.5 – Add operations.
Credentials
- FriendGrid API (API Key)
- Header: Authorization: Bearer
- Test request: GET https://api.sendgrid.com/v3/marketing/contacts
Create the credential in n8n and select it on the node.
Usage
1. Add the FriendGrid node.
2. Set Resource = Contact, Operation = Create.
3. Enter Email or map it from previous nodes.
4. Optionally set Additional Fields.
5. Execute the workflow.
Compatibility
- Node.js >= 20
- n8n 1.x
Development
`bash
npm run dev # tsc --watch
npm run build # compile to dist and copy icons
npm run lint # check
npm run lintfix # fix
`
If the icon doesn’t show, ensure the node’s icon points to an SVG present in the same folder (nodes/FriendGrid/sendGrid.svg), then rebuild.
Troubleshooting
- The node doesn’t appear in the editor:
- Ensure you searched for the node name “FriendGrid”, not the package name.
- Verify the link in your custom directory: npm link n8n-nodes-awesome-n8n.
- Restart n8n after rebuilding.
- Icon shows a broken image:
- Ensure icon: { light: 'file:sendGrid.svg', dark: 'file:sendGrid.svg' } and the SVG exists.
- Multiple items processing:
- The node loops over input items using getInputData()` per the official guide.