# ============ Template: LinkedIn Poster - Automation Engine Template ============
# Independent tools for each webhook in this template
# Total webhooks: 3
@mcp.tool()
async def linkedin_poster___automation_engine_template___linkedin__template1_image(caption: str, imageurl: str) -> str:
"""
Posts an image with a caption to your LinkedIn page.
Args:
caption: The text content that will appear with the image. (maps to 'caption')
imageurl: A direct, public URL to the image file (e.g., ending in .jpg, .png). (maps to 'imageUrl')
"""
import httpx
payload = {"caption": caption, "imageUrl": imageurl}
url = "https://webhook.latenode.com/48975/prod/linkedin_template1_image"
async with httpx.AsyncClient() as client:
try:
resp = await client.post(url, json=payload)
return f"Success: LinkedIn Poster - Automation Engine Template - Linkedin _Template1_Image returned {resp.status_code}"
except Exception as e:
return f"Error: {str(e)}"
@mcp.tool()
async def linkedin_poster___automation_engine_template___linkedin__template1_text(content: str) -> str:
"""
Posts a text-only update to your LinkedIn page.
Args:
content: The full text content of the LinkedIn post. (maps to 'content')
"""
import httpx
payload = {"content": content}
url = "https://webhook.latenode.com/48975/prod/linkedin_template1_text"
async with httpx.AsyncClient() as client:
try:
resp = await client.post(url, json=payload)
return f"Success: LinkedIn Poster - Automation Engine Template - Linkedin _Template1_Text returned {resp.status_code}"
except Exception as e:
return f"Error: {str(e)}"
@mcp.tool()
async def linkedin_poster___automation_engine_template___linkedin__template1_video(caption: str, videourl: str) -> str:
"""
Posts a video with a title and caption to your LinkedIn page.
Args:
caption: The text content that will appear with the video. (maps to 'caption')
videourl: A direct, public URL to the video file (e.g., ending in .mp4). (maps to 'videoUrl')
"""
import httpx
payload = {"caption": caption, "videoUrl": videourl}
url = "https://webhook.latenode.com/48975/prod/linkedin_template1_video"
async with httpx.AsyncClient() as client:
try:
resp = await client.post(url, json=payload)
return f"Success: LinkedIn Poster - Automation Engine Template - Linkedin _Template1_Video returned {resp.status_code}"
except Exception as e:
return f"Error: {str(e)}"